/* ══════════════════════════════════════════════════════════════════════════
   ktnov.com — style.css
   Dark-first. Deep night blue-black, warm ivory text, soft gold accent.
   No framework, no build step. Icons are inline Bootstrap Icons SVG only.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, OFL) ─────────────────────────────────────────────
   Variable files: one woff2 covers the whole declared weight range. */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/great-vibes-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/great-vibes-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/fonts/cormorant-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/fonts/cormorant-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/cormorant-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/cormorant-italic-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrains-mono-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --night: #060a14;
  --night-2: #0a1020;
  --ivory: #ede5d3;
  --ivory-dim: rgba(237, 229, 211, 0.62);
  --ivory-faint: rgba(237, 229, 211, 0.38);
  --gold: #d9b36a;
  --gold-soft: rgba(217, 179, 106, 0.55);
  --line: rgba(237, 229, 211, 0.14);
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(20px, 5vw, 72px);
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--night);
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

:focus-visible { outline: 1px solid var(--gold-soft); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
button:active { transform: scale(0.98); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.62em;
  letter-spacing: 0.14em;
  text-transform: lowercase;
}
.script { font-family: var(--font-script); font-weight: 400; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.ic { width: 1em; height: 1em; flex: none; }

/* Static sky for the no-canvas tiers: tiled star layers at co-prime sizes
   so the repeats never read as a grid. (No background-attachment: fixed;
   iOS ignores it.) */
body {
  background-color: var(--night);
  background-image:
    radial-gradient(1px 1px at 22% 31%, rgba(237,229,211,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 9%, rgba(237,229,211,0.38) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 63%, rgba(217,179,106,0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 9% 77%, rgba(237,229,211,0.32) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 47%, rgba(237,229,211,0.42) 50%, transparent 51%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 60%, var(--night) 100%);
  background-size: 460px 460px, 610px 610px, 530px 530px, 710px 710px, 390px 390px, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, no-repeat;
}
.js:not(.lowpower):not(.reduced) body {
  background-image: linear-gradient(180deg, var(--night), var(--night-2) 60%, var(--night));
  background-size: auto;
  background-repeat: no-repeat;
}

#sky {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  display: none;
}
.js:not(.lowpower):not(.reduced) #sky { display: block; }

.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; display: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.js:not(.lowpower):not(.reduced) .grain { display: block; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--pad);
  background: linear-gradient(180deg, rgba(6,10,20,0.85), rgba(6,10,20,0));
}
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--ivory);
}
.nav-mono { width: 15px; height: 15px; color: var(--gold); }
.nav-name {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.22em;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-decoration: none;
  color: var(--ivory-dim);
  transition: color 0.25s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--gold); }
.nav-clock {
  font-size: 11px; color: var(--gold); letter-spacing: 0.1em;
  text-shadow: 0 1px 10px rgba(6, 10, 20, 0.95);
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-clock { margin-left: auto; }
}

/* ── Hero: the split sky ────────────────────────────────────────────────── */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 0 var(--pad);
  overflow: hidden;
}

/* Film panel, revealed through a fixed diagonal clip. The clip edge runs
   (72%,0) → (46%,100%). Widening on scroll = translate the clipped layer
   left while the inner content counter-translates right: the film holds
   still, only the edge moves. Compositor-only. */
.hero-film {
  position: absolute; inset: 0;
  clip-path: polygon(72% 0, 100% 0, 100% 100%, 46% 100%);
  will-change: transform;
}
.hero-film-inner {
  position: absolute; inset: 0;
  will-change: transform;
}
.hero-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.js:not(.reduced) .hero-poster { animation: breathe 16s ease-in-out infinite alternate; }
@keyframes breathe {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}
.hero-film-tint {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(6,10,20,0.85) 0%, rgba(6,10,20,0.25) 45%, rgba(6,10,20,0.35) 100%);
}
.hero-film iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 560px;
  padding: 120px 0 90px;
  will-change: transform, opacity;
}

.monogram {
  width: clamp(88px, 10vw, 124px); height: auto;
  color: var(--ivory);
  margin-bottom: 26px;
}
.mg-letter {
  font-family: var(--font-script);
  font-size: 56px;
  fill: currentColor;
}
.mg-heart { fill: var(--gold); }
.monogram-sm { width: 72px; }
.monogram-sm .mg-letter { font-size: 56px; }

.hero-title {
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.15;
  font-weight: 400;
  color: var(--ivory);
}
.hero-title { text-shadow: 0 2px 30px rgba(6, 10, 20, 0.8); }

.hero-quote { margin-top: 22px; max-width: 42ch; }
.hero-quote p {
  font-style: italic;
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ivory-dim);
}
.hero-quote cite {
  display: block; margin-top: 8px;
  font-style: normal;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold-soft);
}

.hero-play {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 38px;
  color: var(--ivory);
  transition: color 0.3s ease;
}
.hero-play .mono { font-size: 12px; letter-spacing: 0.18em; color: var(--ivory-dim); transition: color 0.3s ease; }
.hero-play:hover, .hero-play:focus-visible { color: var(--gold); }
.hero-play:hover .mono, .hero-play:focus-visible .mono { color: var(--gold); }
.play-ring {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(6, 10, 20, 0.45);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.hero-play .mono { text-shadow: 0 1px 8px rgba(6, 10, 20, 0.9); }
.play-ring svg { width: 18px; height: 18px; margin-left: 2px; }
.hero-play:hover .play-ring { border-color: var(--gold-soft); transform: scale(1.06); }

@media (max-width: 860px) {
  .hero-film { clip-path: polygon(0 62%, 100% 40%, 100% 100%, 0 100%); }
  .hero-film-tint { background: linear-gradient(180deg, rgba(6,10,20,0.9) 0%, rgba(6,10,20,0.3) 60%); }
  .hero-content { padding: 110px 0 46vh; }
}

/* ── Sections shared ────────────────────────────────────────────────────── */
section, .contact { position: relative; z-index: 1; }

.kicker {
  font-size: 12px; letter-spacing: 0.26em;
  color: var(--gold);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400; line-height: 1.2;
  margin-bottom: 12px;
}

/* Reveal-on-scroll: opacity/transform only; visible by default, .js arms it. */
.js:not(.reduced) .rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}
.js:not(.reduced) .rv.in { opacity: 1; transform: none; }

/* ── The Date ───────────────────────────────────────────────────────────── */
.date {
  padding: clamp(110px, 16vh, 180px) var(--pad);
  text-align: center;
}
.date-line {
  font-weight: 400;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.date-since {
  font-size: clamp(40px, 5.5vw, 68px);
  color: var(--gold);
  line-height: 1;
}
.date-value {
  font-size: clamp(30px, 4.4vw, 56px);
  letter-spacing: 0.04em;
}

.counter {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(18px, 4vw, 46px);
  margin: 52px auto 0;
  max-width: 900px;
}
.count-unit { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 74px; }
.count-num {
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: 0.02em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.count-unit:nth-child(1) .count-num { color: var(--gold); }
.count-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ivory-faint);
}

.date-next {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 46px;
  padding: 10px 22px;
  border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ivory-dim);
}
.date-next .ic { color: var(--gold); width: 14px; height: 14px; }

/* ── The Film ───────────────────────────────────────────────────────────── */
.film {
  padding: clamp(90px, 14vh, 160px) var(--pad);
  text-align: center;
}
.film .section-title { margin-bottom: 40px; color: var(--ivory); }
.film .section-title .script { color: var(--ivory); }

.cinema {
  max-width: 1040px; margin: 0 auto;
  will-change: transform;
}
.cinema .yt-facade {
  border-radius: 6px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line);
}
.cinema-caption {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 22px;
  color: var(--ivory-dim);
  font-size: 0.95em;
}
.cinema-caption .mono { font-size: 11px; color: var(--gold-soft); }

/* YouTube facade: poster + play badge, iframe injected only on click. */
.yt-facade {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: 4px;
  background: var(--night-2);
}
.yt-facade img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.yt-facade:hover img, .yt-facade:focus-visible img { transform: scale(1.04); }
.reduced .yt-facade:hover img { transform: none; }
.yt-facade::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,10,20,0) 55%, rgba(6,10,20,0.55));
}
.play-badge {
  position: absolute; z-index: 2;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: clamp(52px, 6vw, 68px); height: clamp(52px, 6vw, 68px);
  border-radius: 50%;
  background: rgba(6, 10, 20, 0.6);
  border: 1px solid rgba(237, 229, 211, 0.35);
  backdrop-filter: blur(4px);
  color: var(--ivory);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.lowpower .play-badge { backdrop-filter: none; }
.play-badge svg { width: 40%; height: 40%; margin-left: 3px; }
.yt-facade:hover .play-badge, .yt-facade:focus-visible .play-badge {
  background: rgba(217, 179, 106, 0.25);
  border-color: var(--gold);
  transform: translate(-50%, -50%) scale(1.08);
}
.yt-facade iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

/* ── The Work ───────────────────────────────────────────────────────────── */
.work {
  padding: clamp(90px, 14vh, 160px) var(--pad);
  max-width: 1240px; margin: 0 auto;
}
.work-intro { max-width: 52ch; color: var(--ivory-dim); margin-bottom: 70px; }

.pillar { margin-bottom: clamp(70px, 10vh, 110px); }
.pillar:last-child { margin-bottom: 0; }
.pillar-head {
  display: flex; align-items: baseline; gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px; margin-bottom: 30px;
}
.pillar-head .ic { width: 20px; height: 20px; color: var(--gold); align-self: center; }
.pillar-head h3 {
  font-family: var(--font-script);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 400; line-height: 1;
}
.pillar-head p {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ivory-faint);
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 2.5vw, 30px);
}
.card-row-wide { grid-template-columns: minmax(0, 720px); justify-content: center; }

/* Sky: featured reel large on the left, the two parish films stacked right. */
@media (min-width: 861px) {
  .card-row-sky { grid-template-columns: 1.8fr 1fr; grid-template-rows: auto auto; }
  .card-feature { grid-row: span 2; display: flex; flex-direction: column; }
  .card-feature .yt-facade { flex: 1; aspect-ratio: auto; min-height: 0; }
}
.card h4 {
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 500; margin-top: 16px;
}
.card-sub { font-size: 11px; color: var(--ivory-faint); margin-top: 4px; letter-spacing: 0.12em; }

/* Moments: 5 slots, one featured 2x2 for rhythm; fills exactly two rows. */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.moment-tile.moment-tile-feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.moment-tile.moment-tile-feature .ic { width: 30px; height: 30px; }
@media (max-width: 640px) {
  .moments-grid { grid-template-columns: repeat(2, 1fr); }
  .moment-tile.moment-tile-feature { aspect-ratio: 3 / 2; }
}
.moment-tile {
  aspect-ratio: 1;
  display: grid; place-items: center;
  border: 1px dashed var(--line); border-radius: 4px;
  color: var(--ivory-faint);
  background: linear-gradient(160deg, rgba(237,229,211,0.03), rgba(217,179,106,0.04));
}
.moment-tile .ic { width: 22px; height: 22px; opacity: 0.5; }

/* ── The Decisive Moment (pinned word-fill) ─────────────────────────────── */
.decisive { padding: 0 var(--pad); }
.js:not(.reduced):not(.lowpower) .decisive { height: 260vh; }
.decisive-stage {
  max-width: 880px; margin: 0 auto;
  padding: clamp(110px, 18vh, 200px) 0;
  text-align: center;
}
.js:not(.reduced):not(.lowpower) .decisive-stage {
  position: sticky; top: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 0;
}
.decisive-quote p {
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.5;
  font-weight: 400;
}
.decisive .fw { color: var(--ivory-faint); transition: color 0.5s ease; }
.decisive .fw.on { color: var(--ivory); }
.decisive .fw.hot { color: var(--gold); }
.reduced .decisive .fw, .lowpower .decisive .fw { color: var(--ivory); }
.decisive-cite {
  display: block; margin-top: 30px;
  font-style: normal;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.decisive.end .decisive-cite, .reduced .decisive-cite, .lowpower .decisive-cite,
html:not(.js) .decisive-cite { opacity: 1; }

/* ── Contact ────────────────────────────────────────────────────────────── */
.contact {
  padding: clamp(100px, 16vh, 180px) var(--pad) 60px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  border-top: 1px solid var(--line);
}
.contact .monogram { margin-bottom: 12px; color: var(--ivory-dim); }
.contact-line {
  font-size: clamp(44px, 6vw, 72px);
  color: var(--ivory);
  line-height: 1.1;
  margin-bottom: 40px;
}
.contact-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
}
.contact-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  border: 1px solid var(--line); border-radius: 100px;
  text-decoration: none;
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ivory-dim);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.contact-link .ic { width: 15px; height: 15px; color: var(--gold-soft); transition: color 0.3s ease; }
.contact-link:hover, .contact-link:focus-visible {
  color: var(--ivory); border-color: var(--gold-soft);
  transform: translateY(-2px);
}
.reduced .contact-link:hover { transform: none; }
.contact-link:hover .ic { color: var(--gold); }

.footer-note {
  margin-top: 70px;
  font-size: 11px; letter-spacing: 0.16em;
  color: var(--ivory-faint);
}

/* ── Reduced motion: everything visible, nothing scrubbed ───────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-poster, .hero-scroll svg { animation: none !important; }
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
}
