/* harryfilming — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&display=swap');

:root {
  --bg: #000;
  --fg: #f2f2f2;
  --muted: #8a8a8a;
  --line: #222;
  --max: 1180px;
  --display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;  /* was JetBrains Mono; swapped 21 Nov */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
video { display: block; width: 100%; height: auto; }

/* ---------- Header / menu ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px clamp(16px, 4vw, 40px);
  mix-blend-mode: difference;
}
.site-header .mark {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none;
  opacity: 0; transition: opacity .3s;
}
body.scrolled .site-header .mark, body.inner .site-header .mark { opacity: 1; }
.menu-btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  background: none; border: 1px solid currentColor; color: #fff;
  padding: 8px 14px; cursor: pointer;
}
.menu-btn:hover { background: #fff; color: #000; }

.menu {
  position: fixed; inset: 0; z-index: 60; background: #000;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(20px, 6vw, 80px);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.menu.open { opacity: 1; pointer-events: auto; }
.menu .close { position: absolute; top: 20px; right: clamp(16px, 4vw, 40px); }
.menu nav a {
  display: block; text-decoration: none;
  font-weight: 900; font-stretch: 75%; text-transform: uppercase;
  font-size: clamp(48px, 10vw, 120px); line-height: .95;
  color: #333; transition: color .2s, transform .2s;
}
.menu nav a:hover, .menu nav a[aria-current="page"] { color: #fff; }
.menu nav a:hover { transform: translateX(10px); }
.menu nav a span { font-family: var(--mono); font-size: 13px; font-weight: 400; vertical-align: top; margin-right: 12px; color: var(--muted); }

/* ---------- Layout ---------- */
main { padding-top: 90px; }
.wrap { width: min(var(--max), 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
section { margin-bottom: clamp(80px, 12vw, 160px); }
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; margin-bottom: 14px;
}

/* ---------- Glitch wordmark ---------- */
.wordmark {
  position: relative; text-align: center; user-select: none;
  padding: clamp(20px, 4vw, 48px) 0;
}
.wordmark h1 {
  position: relative; display: inline-block;
  font-weight: 900; font-stretch: 80%;
  font-size: clamp(44px, 11.5vw, 150px); line-height: .9;
  letter-spacing: -.01em; text-transform: uppercase;
}
/* the two sliced ghost copies above/below, like the storyboard */
.wordmark h1::before, .wordmark h1::after {
  content: attr(data-text);
  position: absolute; left: 0; right: 0;
  color: #fff;
}
.wordmark h1::before {
  top: -0.7em;
  clip-path: polygon(0 52%, 100% 52%, 100% 64%, 0 64%, 0 72%, 100% 72%, 100% 80%, 0 80%);
  opacity: .9;
  animation: slice-a 3.2s steps(1) infinite;
}
.wordmark h1::after {
  top: 0.7em;
  clip-path: polygon(0 18%, 100% 18%, 100% 28%, 0 28%, 0 36%, 100% 36%, 100% 46%, 0 46%);
  opacity: .9;
  animation: slice-b 2.7s steps(1) infinite;
}
.wordmark h1 .core { position: relative; display: inline-block; animation: core-jit 4s steps(1) infinite; }
@keyframes slice-a {
  0%, 100% { transform: translateX(0); }
  8%  { transform: translateX(-6px); }
  10% { transform: translateX(4px); }
  12% { transform: translateX(0); }
  61% { transform: translateX(8px); clip-path: polygon(0 40%, 100% 40%, 100% 60%, 0 60%, 0 70%, 100% 70%, 100% 82%, 0 82%); }
  64% { transform: translateX(0); }
}
@keyframes slice-b {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(7px); }
  25% { transform: translateX(-3px); }
  27% { transform: translateX(0); }
  78% { transform: translateX(-9px); clip-path: polygon(0 10%, 100% 10%, 100% 30%, 0 30%, 0 40%, 100% 40%, 100% 52%, 0 52%); }
  81% { transform: translateX(0); }
}
@keyframes core-jit {
  0%, 100% { transform: none; text-shadow: none; }
  45% { transform: translateX(2px); text-shadow: -3px 0 rgba(255,255,255,.35); }
  47% { transform: none; text-shadow: none; }
}
.wordmark .sub {
  margin-top: clamp(28px, 4vw, 44px);
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Showreel ---------- */
.reel { position: relative; background: #0a0a0a; }
.reel video { aspect-ratio: 16 / 9; object-fit: cover; }
.sound-btn {
  position: absolute; left: 50%; bottom: clamp(14px, 3vw, 28px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.6);
  padding: 11px 18px; cursor: pointer; backdrop-filter: blur(6px);
  transition: background .2s, color .2s;
}
.sound-btn:hover { background: #fff; color: #000; }
.sound-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff2a2a; animation: blink 1.2s steps(1) infinite; }
.sound-btn.on .dot { animation: none; background: #3ddc84; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Intro text ---------- */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: end; }
.intro h2 {
  font-weight: 900; font-stretch: 80%; text-transform: uppercase;
  font-size: clamp(34px, 4.4vw, 60px); line-height: .95;
}
.intro p { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: #cfcfcf; max-width: 46ch; }
.intro p + p { margin-top: 14px; }
.intro .meta { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 22px; }

/* ---------- Carousel ---------- */
.carousel { overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.track { display: flex; gap: clamp(12px, 1.6vw, 20px); width: max-content; animation: marquee 40s linear infinite; }
.carousel:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - clamp(12px, 1.6vw, 20px) / 2)); } }
.card { width: clamp(180px, 20vw, 260px); flex: none; }
.card video { aspect-ratio: 9 / 16; object-fit: cover; background: #111; }
.card figcaption {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  margin-top: 10px; color: var(--muted);
}
.card figcaption b { color: var(--fg); font-weight: 500; }

.cta-row { margin-top: clamp(32px, 4vw, 48px); display: flex; justify-content: center; }
.cta {
  font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px;
  transition: letter-spacing .25s;
}
.cta:hover { letter-spacing: .22em; }

/* ---------- Footer ---------- */
footer {
  border-top: 0; padding: 28px 0 40px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

/* ---------- Inner placeholder pages ---------- */
.page-title {
  font-weight: 900; font-stretch: 80%; text-transform: uppercase;
  font-size: clamp(56px, 12vw, 160px); line-height: .9; margin: 40px 0 24px;
}
.placeholder { color: var(--muted); font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  main { padding-top: 70px; }
  .intro { grid-template-columns: 1fr; }
  .card { width: 46vw; }
  .card figcaption span, .hide-mobile { display: none; }
  .sound-btn { left: auto; right: 10px; bottom: 10px; transform: none; padding: 7px 10px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .track, .wordmark h1::before, .wordmark h1::after, .wordmark h1 .core { animation: none; }
  .carousel { overflow-x: auto; }
}

/* ---------- Work page: full-screen melt row ---------- */
.work-main {
  height: 100vh; height: 100svh; padding-top: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.work-top { text-align: center; padding-top: 74px; }
.work-title {
  font-weight: 900; font-stretch: 80%; text-transform: uppercase;
  font-size: clamp(26px, 2.8vw, 40px); line-height: 1; letter-spacing: .01em;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.melt-stage, #melt-fallback { flex: 1; min-height: 0; width: 100%; background: #000; }
#melt-fallback { display: flex; align-items: center; }
#melt-fallback[hidden], .melt-stage[hidden] { display: none; }
/* soft fade top/bottom: insurance so nothing ever shows a hard edge */
.melt-stage {
  -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent);
}
/* ---------- Cinema seats ---------- */
@property --spill { syntax: '<color>'; inherits: true; initial-value: rgb(170, 180, 195); }
.work-main { position: relative; --spill: rgb(170, 180, 195); transition: --spill .8s ease; }
.work-main .melt-stage, .work-main #melt-fallback { margin-bottom: calc(var(--seats-h) * .7); }
.work-main { --seats-h: clamp(150px, 30vh, 330px); }
.seats {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--seats-h);
  pointer-events: none; z-index: 2;
}
.seats svg { position: relative; display: block; width: 100%; height: 100%; }
/* screen light spilling onto the floor between rows, fading in from nothing at the top */
.seats::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 55% 85% at 50% 35%,
              color-mix(in srgb, var(--spill) 16%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(transparent, #000 45%);
          mask-image: linear-gradient(transparent, #000 45%);
}
.work-hint {
  margin-top: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.work-hint .hint-touch { display: none; }
@media (hover: none) { .work-hint .hint-mouse { display: none; } .work-hint .hint-touch { display: inline; } }
.melt-row { position: relative; overflow: hidden; }
.melt-row__canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
/* real links + source videos: present for keyboard/SEO/decoding, not visible */
.melt-row__links, .melt-row__videos {
  position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; margin: 0; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; list-style: none;
  pointer-events: none;
}
.melt-row__videos video { width: 1px; height: 1px; }
.melt-row__links a:focus { outline: none; }

/* ---------- Case study pages ---------- */
.case-page .back {
  display: inline-block; margin-top: 24px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.case-page .back:hover { color: var(--fg); }
.case-hero video { width: min(360px, 100%); aspect-ratio: 9 / 16; object-fit: cover; background: #111; }

@media (max-width: 760px) {
  .work-top { padding-top: 70px; }
  .work-hint { font-size: 9.5px; }
  .work-main { --seats-h: clamp(120px, 22vh, 200px); }
}

/* ---------- Top tabs (replace the Menu button) ---------- */
.site-header { mix-blend-mode: normal; background: linear-gradient(rgba(0,0,0,.85), rgba(0,0,0,0)); }
.site-header .mark { opacity: 1; }
.site-nav { display: flex; gap: clamp(22px, 4vw, 60px); }
.site-nav a { font-family: var(--mono); font-size: clamp(13px, 1.05vw, 16px); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: #cfcfcf; padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
@media (max-width: 600px) {
  .site-header .mark { display: none; }
  .site-header { justify-content: center; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 10.5px; letter-spacing: .1em; }
}

/* ---------- Work page type v2 (21 Nov): clean Helvetica instead of block caps + mono ---------- */
.work-title {
  font-family: var(--display); font-weight: 600; font-stretch: 100%;
  text-transform: none; letter-spacing: -.02em; font-size: clamp(26px, 2.6vw, 38px);
}
.work-hint {
  margin-top: 8px; font-family: var(--display); font-weight: 400;
  font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--muted);
}
@media (max-width: 760px) { .work-hint { font-size: 13px; } }

/* ---------- Header logo = the HARRYFILMING wordmark, small (21 Nov) ---------- */
.site-header .mark { font-family: var(--display); font-weight: 900; font-stretch: 80%; font-size: clamp(17px, 1.5vw, 22px);
  letter-spacing: -.005em; text-transform: uppercase; line-height: 1; }
.site-header { align-items: center; }

/* ---------- Small text in Archivo, clean sentence case (21 Nov) ---------- */
.site-nav a { text-transform: none; letter-spacing: .02em; font-weight: 500; font-size: clamp(14px, 1.1vw, 17px); }
.wordmark .sub, .label, .cta, footer, .intro .meta, .sound-btn, .item .go, .desk .go { letter-spacing: .03em; }
.wordmark .sub, .cta, footer, footer a { text-transform: none; }
.wordmark .sub { font-size: clamp(13px, 1.05vw, 15px); }
.intro .meta { text-transform: none; font-size: 14px; font-weight: 500; }
.cta { font-weight: 500; font-size: 15px; }
footer { font-size: 13px; }

/* Work / landing card labels (fallback carousel): same Archivo as the melt-row labels + nav (21 Nov) */
.card figcaption { font-family: var(--display); font-size: 14px; letter-spacing: 0; text-transform: none; }
.card figcaption span { font-weight: 400; }

/* ---------- QA fixes 21 Nov ---------- */
/* Solid header: text and photos no longer slide under the tabs */
.site-header { background: #000; }
/* Leftover caps → sentence case, same Archivo as the rest */
.sound-btn, .menu-btn, .label, .placeholder, .case-page .back, .work-hint { text-transform: none; letter-spacing: .03em; }
.sound-btn { font-weight: 500; }

/* Work page melt row: no browser swipe-back while scrubbing the row sideways (29 Nov) */
.melt-row__canvas { overscroll-behavior-x: none; }
html:has(.work-main) , html:has(.work-main) body { overscroll-behavior-x: none; }

/* Footer icons (29 Nov): small line icons before Contact / Instagram */
footer a { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.ficon { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ficon .dot { fill: currentColor; stroke: none; }

/* ---------- Custom cursor: viewfinder focus corners (2 Dec). Mouse/trackpad only; built in site.js ---------- */
@media (hover: hover) and (pointer: fine) {
  html.vf-cursor, html.vf-cursor * { cursor: none !important; }
  html.vf-cursor input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
  html.vf-cursor textarea, html.vf-cursor [contenteditable] { cursor: text !important; }
}
.vf-cur { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none;
  width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0;
  transition: width .18s ease, height .18s ease, margin .18s ease, opacity .15s ease; }
.vf-cur.on { opacity: 1; }
.vf-cur i { position: absolute; width: 9px; height: 9px; border: 0 solid #fff; transition: border-color .18s; }
.vf-cur i:nth-child(1) { left: 0;  top: 0;    border-width: 1.5px 0 0 1.5px; }
.vf-cur i:nth-child(2) { right: 0; top: 0;    border-width: 1.5px 1.5px 0 0; }
.vf-cur i:nth-child(3) { left: 0;  bottom: 0; border-width: 0 0 1.5px 1.5px; }
.vf-cur i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }
.vf-cur b { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: #fff; transition: background .18s; }
.vf-cur.hot { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.vf-cur.hot i { border-color: #ff3b30; } .vf-cur.hot b { background: #ff3b30; }
.vf-cur.down { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
/* soft shadow so it still shows on white photos */
.vf-cur i, .vf-cur b { filter: drop-shadow(0 0 1px rgba(0,0,0,.7)); }
