/* ==========================================================================
   Jono Hart — creative director portfolio
   Design system ported from the D8 London build: editorial restraint,
   motion craft, warm monochrome. Bold grotesque identity kept intact.
   ========================================================================== */

:root {
  --ink: #08080a;
  --panel: #101013;
  --panel-2: #17171b;
  --fg: #f3efe8;
  --muted: #b7b1a6;
  --faint: #7d766b;
  --line: rgb(255 255 255 / 0.09);
  --sand: #cdb389;         /* warm stage-light accent, used sparingly */
  --sand-soft: rgb(205 179 137 / 0.5);

  --sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1360px;
  --pad: clamp(20px, 5vw, 60px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--sand); color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

a:focus-visible, button:focus-visible, .field:focus-visible, summary:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 3px;
}

/* Editorial micro-type ----------------------------------------------------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--sand-soft);
}
.eyebrow em { font-family: var(--serif); font-style: italic; letter-spacing: 0; text-transform: none; color: var(--sand); font-size: 1.35em; }

.serif-accent { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ==========================================================================
   Intro veil — wordmark on true black, lifts like a curtain (once/session)
   ========================================================================== */
#veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  transition: transform 1.05s cubic-bezier(0.76, 0, 0.24, 1) 1.55s, visibility 0s linear 2.7s;
}
#veil .veil-mark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 3rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0;
  animation: veil-in 1.3s var(--ease) 0.15s both;
}
@keyframes veil-in {
  from { opacity: 0; letter-spacing: 0.6em; filter: blur(6px); }
  to { opacity: 1; letter-spacing: 0.34em; filter: blur(0); }
}
html.veil-done #veil, html.no-veil #veil { transform: translateY(-100%); visibility: hidden; }
html.no-veil #veil { transition: none; }
html.no-veil #veil .veil-mark { animation: none; }

/* ==========================================================================
   Header — hides on scroll down, returns on up, frosts after scroll
   ========================================================================== */
#site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition: transform 0.55s var(--ease), background-color 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  background: rgb(8 8 10 / 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
#site-header.nav-hidden { transform: translateY(-100%); }

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
}
.brand {
  font-weight: 800;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  font-size: 13px;
  text-transform: uppercase;
}
.nav-main { display: none; gap: 34px; }
.nav-link {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover, .nav-link.on { color: var(--fg); }
.nav-link:hover::after, .nav-link.on::after { transform: scaleX(1); }

.header-cta {
  display: none;
  border: 1px solid rgb(243 239 232 / 0.35);
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.header-cta:hover { background: var(--sand); border-color: var(--sand); color: var(--ink); }

@media (min-width: 1000px) {
  .nav-main { display: flex; }
  .header-cta { display: inline-block; }
}

/* Mobile menu toggle + overlay */
#menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 40px; height: 40px;
}
#menu-toggle .bar { display: block; width: 24px; height: 1.5px; background: var(--fg); transition: transform 0.35s var(--ease); }
@media (min-width: 1000px) { #menu-toggle { display: none; } }

#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 var(--pad);
  background: rgb(8 8 10 / 0.98);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
#menu-overlay.open { opacity: 1; visibility: visible; transition: opacity 0.5s ease; }
#menu-overlay .menu-item {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.4rem, 11vw, 4rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease);
}
#menu-overlay.open .menu-item { opacity: 1; transform: none; }
#menu-overlay .menu-item:hover { color: var(--sand); }
#menu-overlay .menu-sub { margin-top: 2.5rem; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }

/* ==========================================================================
   Reveal system — mask lines, fades, drawn hairlines
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

.mask-line { display: block; overflow: hidden; padding-block: 0.08em; margin-block: -0.08em; }
.mask-line > span { display: block; transform: translateY(118%); transition: transform 1.1s var(--ease) var(--d, 0s); }
.is-visible .mask-line > span, .mask-line.is-visible > span { transform: none; }

.draw-line { height: 1px; background: linear-gradient(to right, var(--sand-soft), rgb(205 179 137 / 0.05)); transform: scaleX(0); transform-origin: left; transition: transform 1.5s var(--ease) var(--d, 0s); }
.is-visible .draw-line, .draw-line.is-visible { transform: scaleX(1); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); }
.hero-media { position: absolute; inset: 0; width: 100%; height: 108%; object-fit: cover; z-index: 0; filter: brightness(0.5) grayscale(0.2) contrast(1.05); will-change: transform; animation: hero-media-in 2.4s var(--ease) both; }
@keyframes hero-media-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
.hero-grade { position: absolute; inset: 0; z-index: 1; background: radial-gradient(130% 100% at 25% 30%, transparent, rgb(8 8 10 / 0.35) 55%, rgb(8 8 10 / 0.94)); }
.hero-grain { position: absolute; inset: 0; z-index: 1; opacity: 0.05; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) clamp(3rem, 8svh, 6rem); }
.hero-kicker { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1rem, 2.2vw, 1.5rem); color: var(--sand); margin-bottom: 0.9rem; opacity: 0; }
.hero-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(64px, 15vw, 220px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hero-title .ln { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-title .c { display: inline-block; will-change: transform; }
.hero-tag { margin-top: clamp(1.4rem, 3vw, 2.2rem); font-size: clamp(12px, 1.5vw, 16px); letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); opacity: 0; }
@media (max-width: 600px) { .hero-tag { letter-spacing: 0.16em; } }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: clamp(2rem, 4vw, 3rem); flex-wrap: wrap; opacity: 0; }
.hero-scroll { position: absolute; left: var(--pad); bottom: 1.8rem; z-index: 2; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; opacity: 0; }
.hero-scroll .rule { display: block; width: 46px; height: 1px; background: var(--muted); transform-origin: left; animation: scroll-rule 2.4s ease-in-out infinite; }
@keyframes scroll-rule { 0%,100% { transform: scaleX(0.35); opacity: 0.5; } 50% { transform: scaleX(1); opacity: 1; } }

/* Buttons ------------------------------------------------------------------ */
.cta {
  position: relative;
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border: 1px solid rgb(243 239 232 / 0.7);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  isolation: isolate;
  overflow: hidden;
  transition: color 0.5s ease, border-color 0.5s ease;
}
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--sand); transform: scaleY(0); transform-origin: bottom; transition: transform 0.55s var(--ease); }
.cta:hover { color: var(--ink); border-color: var(--sand); }
.cta:hover::before { transform: scaleY(1); }
.cta--solid { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.cta--solid::before { background: var(--fg); }
.cta--solid:hover { color: var(--ink); }

.text-link { position: relative; color: var(--fg); }
.text-link::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: var(--sand-soft); transform: scaleX(1); transform-origin: right; transition: transform 0.4s var(--ease); }
.text-link:hover::after { transform: scaleX(0); }

/* Shimmer sweep on the ghost CTA (behind the label) */
.cta::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 40%, rgb(255 255 255 / 0.38) 50%, transparent 60%);
  transform: translateX(-125%);
}
.cta:hover::after { transform: translateX(125%); transition: transform 0.85s ease; }
.cta::before { z-index: -2; }

/* Inline arrow that nudges on hover */
.ar { display: inline-block; margin-left: 0.55em; transition: transform 0.4s var(--ease); }
.cta:hover .ar, .text-link:hover .ar, a:hover > .ar { transform: translateX(5px); }

/* Split-text reveal primitives (JS fills these) */
html.js [data-anim] { opacity: 0; }
.sp-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.sp-c, .sp-wi { display: inline-block; will-change: transform; }
.sp-wi { padding-bottom: 0.1em; margin-bottom: -0.1em; }

/* ==========================================================================
   Work — featured + grid
   ========================================================================== */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }

.feature { position: relative; display: block; aspect-ratio: 21 / 9; overflow: hidden; background: var(--panel); }
@media (max-width: 700px) { .feature { aspect-ratio: 4 / 5; } }
.feature-img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; filter: grayscale(0.2) brightness(0.72); transition: filter 0.6s ease, transform 1.6s var(--ease); will-change: transform; }
.feature:hover .feature-img { filter: grayscale(0) brightness(0.62); transform: scale(1.04); }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgb(8 8 10 / 0.9), rgb(8 8 10 / 0.1) 60%, transparent); }
.feature-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(24px, 4vw, 52px); }
.feature-index { font-size: 11px; letter-spacing: 0.24em; color: var(--sand); }
.feature-role { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.feature-title { font-family: var(--sans); font-weight: 800; font-size: clamp(30px, 5vw, 68px); line-height: 0.98; letter-spacing: -0.025em; margin-top: 8px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 940px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.tile { position: relative; display: block; overflow: hidden; background: var(--panel); aspect-ratio: 16 / 11; }
.tile-img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; filter: grayscale(0.35) brightness(0.72); transition: filter 0.5s ease, transform 1.4s var(--ease); will-change: transform; }
.tile:hover .tile-img { filter: grayscale(0) brightness(0.6); transform: scale(1.05); }
.tile-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgb(8 8 10 / 0.92), rgb(8 8 10 / 0.05) 62%, transparent); }
.tile-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 20px 20px; }
.tile-num { position: absolute; top: 16px; left: 20px; z-index: 2; font-size: 11px; letter-spacing: 0.18em; color: var(--sand); mix-blend-mode: difference; }
.tile-go { position: absolute; top: 16px; right: 18px; z-index: 2; font-size: 12px; letter-spacing: 0.2em; color: var(--fg); opacity: 0; transform: translateX(-6px); transition: 0.35s var(--ease); }
.tile:hover .tile-go { opacity: 1; transform: none; }
.tile-role { font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); min-height: 12px; }
.tile-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin-top: 6px; }

/* Typographic tile (no thumbnail) */
.tile--type { display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, var(--panel) 0%, var(--panel-2) 100%); }
.tile--type .tile-mark { font-family: var(--serif); font-style: italic; font-size: clamp(2.4rem, 7vw, 3.6rem); color: rgb(205 179 137 / 0.28); }
.tile--type .tile-shade { background: linear-gradient(to top, rgb(8 8 10 / 0.6), transparent 60%); }

/* ==========================================================================
   Editorial statement blocks (about teaser, contact)
   ========================================================================== */
.statement { max-width: 22ch; font-family: var(--sans); font-weight: 800; font-size: clamp(30px, 5.5vw, 74px); line-height: 1.02; letter-spacing: -0.025em; }
.statement em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; color: var(--sand); }
.lede { color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.75; max-width: 62ch; margin-top: 1.6rem; }

.contact-block { text-align: left; }
.contact-h { font-family: var(--sans); font-weight: 800; font-size: clamp(34px, 8vw, 96px); line-height: 0.98; letter-spacing: -0.03em; }
.contact-email { display: inline-block; margin-top: 1.2rem; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 4vw, 44px); color: var(--sand); }
.mgmt { margin-top: 2.4rem; color: var(--muted); font-size: 14px; line-height: 1.9; letter-spacing: 0.02em; }
.mgmt strong { color: var(--fg); font-weight: 600; }

/* ==========================================================================
   Project page
   ========================================================================== */
.phead { padding: clamp(6rem, 12vh, 9rem) 0 2rem; }
.back { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); transition: color 0.3s, gap 0.3s; }
.back:hover { color: var(--fg); gap: 16px; }
.ptitle { font-family: var(--sans); font-weight: 800; font-size: clamp(34px, 7.5vw, 92px); line-height: 0.94; letter-spacing: -0.03em; margin-top: 1.6rem; text-transform: none; }
.prole { margin-top: 1.3rem; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--sand); }

.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-still { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); }
.player-still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.85); }

.pbody { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 64px); padding: clamp(2.5rem, 5vw, 4rem) 0 0; }
@media (max-width: 780px) { .pbody { grid-template-columns: 1fr; gap: 1rem; } }
.pmeta { align-self: start; }
@media (min-width: 781px) { .pmeta { position: sticky; top: 120px; } }
.pmeta .k { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--faint); }
.pmeta .credits { margin-top: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.pmeta .credit { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.ptext p { font-size: clamp(16px, 1.9vw, 20px); line-height: 1.75; color: #e6e3dc; margin-bottom: 1.3rem; max-width: 64ch; }

.pnav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: clamp(4rem, 8vw, 6rem); padding-top: 1.8rem; }
.pnav a { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); transition: color 0.3s; }
.pnav a:hover { color: var(--fg); }
.pnav a.next { text-align: right; align-items: flex-end; }
.pnav .dir { color: var(--faint); font-size: 10px; letter-spacing: 0.24em; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); background: var(--ink); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--pad) 3rem; }
.footer-mark { font-family: var(--sans); font-weight: 800; font-size: clamp(48px, 13vw, 180px); line-height: 0.86; letter-spacing: -0.04em; text-transform: uppercase; color: var(--fg); }
.footer-mark .dot { color: var(--sand); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); padding-top: 2rem; }
.footer-copy { font-size: 12px; letter-spacing: 0.08em; color: var(--faint); }
.socials { display: flex; gap: 24px; }
.socials a { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); transition: color 0.3s; }
.socials a:hover { color: var(--sand); }

/* ==========================================================================
   Cursor dot (fine pointers only)
   ========================================================================== */
#cursor-dot { position: fixed; z-index: 90; top: 0; left: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--sand); pointer-events: none; opacity: 0; mix-blend-mode: difference; transition: scale 0.3s ease, opacity 0.3s ease; }
@media (hover: none), (pointer: coarse) { #cursor-dot { display: none; } }

/* Preview ribbon */
.preview-ribbon { position: relative; z-index: 51; background: var(--panel-2); color: var(--faint); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; text-align: center; padding: 7px; border-bottom: 1px solid var(--line); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #veil { display: none; }
  .reveal, .mask-line > span, .draw-line { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-media { animation: none; }
  .hero-kicker, .hero-tag, .hero-actions, .hero-scroll { opacity: 1 !important; }
  #cursor-dot { display: none; }
  #menu-overlay .menu-item { transition: none; opacity: 1; transform: none; }
  .hero-scroll .rule { animation: none; }
}
