/*
Theme Name: Ian Burr
Description: Film and photo portfolio for Ian Burr Creative.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ianburr
*/

:root {
  --orange: #FF5A1F;
  --ink: #0B0A09;
  --paper: #F4F0E8;
  --gutter: clamp(16px, 2vw, 28px);
  --header: 48px;
  --display: 'Big Shoulders Display', Impact, 'Arial Narrow', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: var(--header); }
html:has(dialog[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  html, .strip { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--orange);
  color: var(--ink);
  font-family: Archivo, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.photos :focus-visible, .viewer :focus-visible { outline-color: var(--paper); }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 30;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--orange);
}
.skip:focus { top: 4px; }

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: .9;
  text-transform: uppercase;
}
.display-md { font-size: clamp(48px, 7vw, 112px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 24px;
  padding: 2px var(--gutter);
  background: var(--orange);
  font-size: 14px;
  font-weight: 600;
}
.site-header nav { display: flex; gap: 20px; }
.site-header a { min-height: 44px; display: flex; align-items: center; }
.site-header a:hover, .site-header a[aria-current="true"] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Hero */
.hero { padding: clamp(12px, 2vw, 28px) var(--gutter) clamp(20px, 3vw, 44px); }
.hero h1 {
  font-size: clamp(64px, 15.5vw, 260px);
  line-height: .84;
  letter-spacing: -.01em;
}

/* Films */
.films {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px var(--gutter);
  padding: 0 var(--gutter) clamp(48px, 6vw, 88px);
}
.preview {
  position: sticky;
  top: calc(var(--header) + 12px);
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preview-frame { display: block; background: var(--ink); }
.preview-frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.preview-note { margin: 0; min-height: 3em; font-size: 15px; line-height: 1.4; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; }
.pill { min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); }
.pill:hover, .pill[aria-pressed="true"] { background: var(--ink); color: var(--orange); }

.film-list {
  flex: 999 1 560px;
  min-width: 0;
  border-bottom: 2px solid var(--ink);
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 6px 8px 4px;
  border-top: 2px solid var(--ink);
  transition: background .12s, color .12s;
}
.row[hidden] { display: none; }
.row:hover, .row:focus-visible, .row.is-current {
  background: var(--ink);
  color: var(--orange);
  outline: none;
}
.row-title {
  min-width: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(38px, 6.4vw, 104px);
  line-height: .94;
  text-transform: uppercase;
}
.row-type { flex: none; font-size: 13px; font-weight: 600; }

/* Photos */
.photos {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3vw, 40px) 0;
  background: var(--ink);
  color: var(--orange);
}
.credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px clamp(24px, 4vw, 64px);
  padding: clamp(40px, 5vw, 72px) clamp(16px, 4vw, 56px);
  background: #F7F3EA;
  color: #0A0908;
  font-family: 'Bodoni Moda', Didot, Georgia, serif;
  font-size: clamp(22px, 2.6vw, 38px);
  font-weight: 600;
}
.photos-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 0 var(--gutter);
}
.strip-controls { display: flex; gap: 8px; }
.arrow {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--orange);
}
.arrow:hover:not(:disabled) { background: var(--orange); color: var(--ink); }
.arrow:disabled { opacity: .35; cursor: default; }
.strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--gutter);
  padding: 0 var(--gutter) 12px;
  scrollbar-color: var(--orange) transparent;
}
.shot {
  flex: 0 0 auto;
  height: clamp(320px, 38vw, 560px);
  scroll-snap-align: start;
  background: #1a1816;
}
.shot img { height: 100%; width: auto; max-width: none; transition: opacity .2s; }
.shot:hover img { opacity: .8; }

/* About */
.about {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 28px var(--gutter);
  padding: clamp(48px, 6vw, 88px) var(--gutter);
}
.about-copy {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-copy p {
  margin: 0;
  max-width: 36em;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.35;
  text-wrap: pretty;
}
.about-img {
  flex: 1 1 340px;
  min-width: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Contact */
.contact {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 3vw, 40px) var(--gutter) 24px;
  border-top: 2px solid var(--ink);
}
.email { font-size: min(8.6vw, 176px); white-space: nowrap; }
.email:hover {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}
.contact-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  font-weight: 600;
}
.socials { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.socials a { min-height: 44px; display: flex; align-items: center; }
.contact-meta > span { min-height: 44px; display: flex; align-items: center; }
.socials a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Film and photo viewer */
.viewer {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer-bar {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 4px var(--gutter);
}
.viewer-title { min-width: 0; }
.viewer-count { font-variant-numeric: tabular-nums; }
.viewer-nav { display: flex; gap: 12px; }
.ctl { min-width: 44px; min-height: 44px; }
.ctl:hover { color: var(--orange); }
.viewer-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-stage img { width: 100%; height: 100%; object-fit: contain; }
.viewer-stage iframe {
  display: block;
  border: 0;
  background: #000;
  aspect-ratio: 16 / 9;
  width: min(100%, calc((100dvh - 112px) * 16 / 9));
}

/* Keeps the header on one row on a phone */
@media (max-width: 480px) {
  .brand-extra { display: none; }
  .site-header { flex-wrap: nowrap; }
  .site-header nav { gap: 14px; }
}

/* Hover previews mean nothing on touch or narrow screens, so the list leads */
@media (max-width: 900px) {
  .films { flex-direction: column; align-items: stretch; }
  .preview { position: static; flex: none; }
  .preview-frame, .preview-note { display: none; }
  .film-list { flex: none; }
}

/* Logged-in WordPress toolbar sits above the sticky header */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Blog posts and pages kept from the previous site */
.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 50vh;
  padding: clamp(24px, 3vw, 44px) var(--gutter) clamp(48px, 6vw, 88px);
}
.content article { display: flex; flex-direction: column; gap: 16px; }
.content h1 { overflow-wrap: anywhere; }
.content-date { margin: 0; font-size: 14px; font-weight: 600; }
.content-body { max-width: 1100px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; }
.content-body > * { max-width: 100%; }
.content-body img, .content-body video, .content-body iframe { max-width: 100%; }
.content-body img { height: auto; }
.content-body a { text-decoration: underline; text-underline-offset: 3px; }
.content-body h2, .content-body h3 { font-family: var(--display); font-weight: 900; line-height: 1; text-transform: uppercase; }
.content-body h2 { font-size: clamp(32px, 4vw, 56px); }
.content-body h3 { font-size: clamp(26px, 3vw, 40px); }
.post-title { font-size: clamp(28px, 3.6vw, 56px); }
.comments input:not([type="checkbox"]):not([type="submit"]), .comments textarea { width: 100%; max-width: 640px; padding: 10px; border: 2px solid var(--ink); background: transparent; font: inherit; }
.comments input[type="submit"] { min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); background: var(--ink); color: var(--orange); font: inherit; cursor: pointer; }
