/* Furqan · Table of Wisdom — editorial portfolio */

:root {
  --ink: #14110f;
  --ink-soft: #2a2420;
  --paper: #f3ece2;
  --paper-deep: #e8dfd0;
  --saffron: #d4842a;
  --saffron-hot: #e89b35;
  --teal: #2a9d8f;
  --teal-deep: #1f7a6f;
  --rust: #8b3a2a;
  --muted: #6b5f54;
  --line: rgba(20, 17, 15, 0.12);
  --radius: 14px;
  --radius-lg: 28px;
  --font-display: "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

h1, h2, h3, h4, .hero-title, .stat-pill span {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  overflow: visible;
}

.hero-title {
  font-weight: 800;
  line-height: 1.12;
  padding-bottom: 0.06em;
}

.about-copy h2,
.work-copy h2,
.story-head h2,
.k-chapter h3,
.story-book-header h2,
.gallery-head h2,
.contact-inner h2 {
  font-weight: 700;
  line-height: 1.35;
  padding-bottom: 0.08em;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--saffron));
  transform-origin: left;
  transition: width 0.1s linear;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-deep);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 9999;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Grain overlay */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header — invisible on landing until you scroll */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: transparent;
  border: none;
  box-shadow: none;
  transition:
    background 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(20, 17, 15, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.logo-text {
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .logo-text {
    display: none;
  }
}

.nav {
  display: none;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--saffron);
  transition: width 0.35s var(--ease-out);
}

.nav a:hover::after {
  width: 100%;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-family: var(--font-display);
  font-size: 2rem;
}

.mobile-nav a {
  text-decoration: none;
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(20, 17, 15, 0.2);
    color: var(--paper);
  }
}

.btn-ghost {
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: auto;
  padding: calc(var(--header-h) + 3.5rem) clamp(1.5rem, 5vw, 3.5rem) clamp(4rem, 8vh, 6rem);
  display: grid;
  gap: clamp(3rem, 7vw, 5rem);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  overflow: visible;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 36rem;
}

.hero-intro {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.hero-blobs {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: blob-drift 18s ease-in-out infinite alternate;
}

.blob-a {
  width: 55%;
  height: 45%;
  top: 5%;
  right: 0;
  background: rgba(42, 157, 143, 0.35);
}

.blob-b {
  width: 40%;
  height: 40%;
  bottom: 10%;
  left: -5%;
  background: rgba(212, 132, 42, 0.28);
  animation-delay: -6s;
}

.blob-c {
  width: 30%;
  height: 30%;
  top: 40%;
  left: 35%;
  background: rgba(20, 17, 15, 0.08);
  animation-delay: -12s;
}

@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -18px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.08fr 0.92fr;
    gap: clamp(3.5rem, 6vw, 6rem);
    min-height: min(100svh, 1080px);
    padding-top: calc(var(--header-h) + 5rem);
    padding-bottom: clamp(5rem, 10vh, 7rem);
  }

  .hero-copy {
    max-width: 40rem;
  }
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.hero-title {
  font-size: clamp(2.75rem, 7.5vw, 5.25rem);
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.hero-title .line {
  display: block;
  padding-bottom: 0.1em;
  overflow: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .hero.is-loaded .hero-title .line {
    animation: hero-line-in 0.85s var(--ease-out) backwards;
  }

  .hero.is-loaded .hero-title .line:nth-child(2) {
    animation-delay: 0.1s;
  }
}

@keyframes hero-line-in {
  from {
    opacity: 0;
    transform: translateY(0.15em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title .accent {
  color: var(--saffron);
  font-weight: 700;
}

.hero-title .dim {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.72em;
}

.hero-lede {
  font-family: var(--font-body);
  max-width: 34rem;
  margin: 0 0 clamp(2rem, 4vw, 2.75rem);
  font-size: clamp(1.0625rem, 2vw, 1.2rem);
  line-height: 1.75;
  color: var(--ink-soft);
}

.hero-lede-br {
  display: none;
}

@media (min-width: 520px) {
  .hero-lede-br {
    display: block;
  }
}

.hero-lede strong {
  font-weight: 600;
  color: var(--ink);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.25rem);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 clamp(1.25rem, 4vw, 2.5rem);
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  border-top: 1px solid var(--line);
}

.hero-stat {
  margin: 0;
  flex: 1;
  min-width: 5.5rem;
  padding: 0.35rem clamp(0.75rem, 2.5vw, 1.5rem);
  background: none;
  border: none;
}

.hero-stat:not(:first-child) {
  border-left: 1px solid var(--line);
}

@media (max-width: 520px) {
  .hero-stats {
    flex-direction: column;
    gap: 0;
  }

  .hero-stat {
    flex: none;
    width: 100%;
    padding: 0.85rem 0;
  }

  .hero-stat:not(:first-child) {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}

.hero-stats dt {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.1em;
}

.hero-stats .stat-suffix {
  font-family: var(--font-display);
  font-size: 0.72em;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  padding-top: 0.5rem;
}

@media (max-width: 959px) {
  .hero-visual {
    margin-bottom: 0.5rem;
  }
}

.hero-portrait {
  position: relative;
  margin: 0;
  max-width: min(440px, 88vw);
  margin-inline: auto;
  padding: 0.5rem;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  border: none;
  outline: none;
  box-shadow: 0 20px 44px rgba(20, 17, 15, 0.14);
  image-rendering: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-visual {
    transition: transform 0.2s ease-out;
  }
}

/* Marquee */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  padding: 1.35rem 0;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 2.75rem;
  width: max-content;
  animation: marquee 32s linear infinite;
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-track span:not(:nth-child(2n)) {
  opacity: 0.92;
}

.marquee-track span:nth-child(2n) {
  opacity: 0.45;
  font-weight: 400;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    padding: 0 1rem;
  }
}

/* Sections */
.section {
  padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 1320px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* About */
.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 4rem;
  }
}

.about-img {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(20, 17, 15, 0.12);
  background: #12100e;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
}

.about-copy h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0 0 1.25rem;
}

.about-copy p {
  margin: 0 0 1rem;
}

.about-copy .muted {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Story timeline */
.story-head {
  max-width: 52ch;
  margin-bottom: 3.5rem;
}

.story-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.story-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
  margin-left: 0.5rem;
}

/* Timeline chapters */
.chapter {
  display: grid;
  gap: 1.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.chapter::before {
  content: "";
  position: absolute;
  left: -1.62rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--saffron);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--saffron);
}

.chapter-marker span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-deep);
  font-weight: 600;
}

.chapter-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0.35rem 0 0.75rem;
  line-height: 1.2;
}

.chapter-body p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

.chapter-media--grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}

.chapter-media--grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.chapter-media--cover,
.chapter-media--stack figure,
.frame-contain {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1a1816;
}

.chapter-media--cover {
  aspect-ratio: 4/3;
  max-height: 400px;
}

.chapter-media--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-media--stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.frame-contain {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.frame-contain img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .chapter {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .chapter-marker,
  .chapter-body {
    grid-column: 1;
  }
  .chapter-media {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* Shared image frames */
.frame-landscape {
  display: flex;
  justify-content: center;
  background: #0f0e0d;
  padding: 0.75rem;
  border-radius: var(--radius);
}

.frame-landscape img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.t-card {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .t-card {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .t-card--flip .t-card-body {
    order: -1;
  }
}

.t-card-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.t-card-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  image-rendering: auto;
}

.t-card-media--cover {
  aspect-ratio: 4 / 3;
  max-height: 420px;
}

.t-card-media--cover img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.t-card-media--contain {
  padding: 1rem;
  background: #1c1916;
  min-height: auto;
}

.t-card-media--contain img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  margin-inline: auto;
}

.t-card-media.collage {
  background: #12100e;
}

.t-year {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-deep);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.t-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.t-card-body p {
  margin: 0;
  color: var(--ink-soft);
}

.t-card--lift .t-card-media {
  transform: rotate(-1.5deg);
}

/* K2K */
.k2k {
  position: relative;
  max-width: none;
  padding-inline: 0;
}

.k2k > *:not(.k2k-bg) {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.k2k-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(212, 132, 42, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(42, 157, 143, 0.12), transparent),
    var(--ink);
  z-index: -1;
}

.k2k .section-label,
.k2k-intro,
.k2k-spine,
.k2k-stats,
.k2k-gallery,
.k2k-closer,
.k2k-chapters {
  color: var(--paper);
}

.k2k-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.k2k-lede {
  color: rgba(243, 236, 226, 0.78);
  max-width: 58ch;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.k2k-lede strong {
  color: var(--saffron-hot);
}

.k2k-quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--saffron-hot);
  max-width: 40ch;
  margin: 0;
  border-left: 3px solid var(--saffron);
  padding-left: 1.25rem;
}

.k2k-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 3rem 0;
}

.stat-pill {
  background: rgba(243, 236, 226, 0.08);
  border: 1px solid rgba(243, 236, 226, 0.15);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  min-width: 140px;
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .stat-pill:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 132, 42, 0.45);
  }
}

.k2k-stats.is-visible .stat-pill {
  animation: stat-pop 0.55s var(--ease-out) backwards;
}

.k2k-stats.is-visible .stat-pill:nth-child(1) { animation-delay: 0.05s; }
.k2k-stats.is-visible .stat-pill:nth-child(2) { animation-delay: 0.12s; }
.k2k-stats.is-visible .stat-pill:nth-child(3) { animation-delay: 0.19s; }
.k2k-stats.is-visible .stat-pill:nth-child(4) { animation-delay: 0.26s; }

@keyframes stat-pop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stat-pill span {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-pill small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: rgba(243, 236, 226, 0.65);
}

.k2k-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin: 3rem auto 2rem;
}

.g-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  grid-column: span 6;
  background: rgba(0, 0, 0, 0.25);
  transition: transform 0.4s var(--ease-out);
}

html.motion-ready .g-item.is-visible {
  animation: gallery-in 0.7s var(--ease-out) backwards;
  animation-delay: calc(var(--d, 0) * 0.07s);
}

@keyframes gallery-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .g-item:hover {
    transform: translateY(-4px);
  }
}

.g-item-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #12100e;
  padding: 0.75rem;
  overflow: hidden;
}

.g-item-frame--wide {
  min-height: 200px;
}

.g-item-frame--portrait {
  min-height: 280px;
  max-height: 520px;
}

.g-item-frame--hero {
  max-height: 560px;
}

.g-item-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  transition: transform 0.55s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .g-item:hover .g-item-frame img {
    transform: scale(1.02);
  }
}

.g-item figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  color: rgba(243, 236, 226, 0.7);
  background: rgba(0, 0, 0, 0.4);
}

.g-item--wide {
  grid-column: span 12;
}

.g-item--portrait {
  grid-column: span 6;
}

.g-item--tall .g-item-frame--portrait {
  max-height: 640px;
}

.g-item--tall {
  grid-row: span 2;
}

@media (min-width: 700px) {
  .g-item,
  .g-item--portrait {
    grid-column: span 4;
  }
  .g-item--wide {
    grid-column: span 8;
  }
  .g-item--tall {
    grid-column: span 4;
  }
}

.k2k-closer {
  margin: 4rem auto 6rem;
  padding: 2rem;
  background: rgba(243, 236, 226, 0.06);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(243, 236, 226, 0.1);
}

.k2k-closer p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.5;
  font-weight: 300;
}

/* K2K story spine */
.k2k-spine {
  margin: 2rem 0 2.5rem;
  padding: 1.25rem 1rem;
  background: rgba(243, 236, 226, 0.05);
  border: 1px solid rgba(243, 236, 226, 0.12);
  border-radius: var(--radius-lg);
}

.k2k-spine-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 720px) {
  .k2k-spine-list {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

.k2k-spine-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.5rem;
  align-items: start;
  padding: 0.5rem 0.35rem;
}

@media (min-width: 720px) {
  .k2k-spine-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.35rem 0.25rem;
  }
}

.spine-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(243, 236, 226, 0.35);
  margin-top: 0.35rem;
  grid-row: 1 / span 2;
}

.spine-dot--start {
  background: var(--saffron);
  box-shadow: 0 0 0 4px rgba(212, 132, 42, 0.25);
}

.spine-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--paper);
}

.spine-when {
  font-size: 0.72rem;
  color: rgba(243, 236, 226, 0.55);
  grid-column: 2;
}

@media (min-width: 720px) {
  .spine-when {
    grid-column: auto;
  }
}

/* K2K narrative chapters */
.k2k-chapters {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 3rem 0;
  border-left: 2px solid rgba(243, 236, 226, 0.12);
  padding-left: clamp(1rem, 3vw, 1.75rem);
}

.k-chapter {
  position: relative;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(243, 236, 226, 0.08);
}

.k-chapter:last-of-type {
  border-bottom: none;
}

.k-chapter::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(1rem, 3vw, 1.75rem) - 5px);
  top: 2.85rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid rgba(243, 236, 226, 0.35);
}

.k-chapter--flag::before {
  background: var(--saffron);
  border-color: var(--saffron-hot);
  box-shadow: 0 0 0 4px rgba(212, 132, 42, 0.2);
}

.k-chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.k-chapter-act {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron-hot);
}

.k-chapter-date {
  font-size: 0.8rem;
  color: rgba(243, 236, 226, 0.55);
}

.k-chapter h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 1rem;
  color: var(--paper);
}

.k-chapter p {
  color: rgba(243, 236, 226, 0.82);
  max-width: 62ch;
  margin: 0 0 1rem;
}

.k-chapter-bridge {
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(212, 132, 42, 0.9);
  border-left: 2px solid rgba(212, 132, 42, 0.4);
  padding-left: 1rem;
  margin-top: 0.25rem;
}

.k-chapter--flag {
  padding: 2rem clamp(1rem, 3vw, 1.5rem);
  margin-left: calc(-1 * clamp(1rem, 3vw, 1.75rem));
  padding-left: clamp(1rem, 3vw, 1.75rem);
  background: rgba(212, 132, 42, 0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(212, 132, 42, 0.22);
}

.k-chapter-imgs {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .k-chapter-imgs {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Finale */
.finale {
  margin: 4rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(243, 236, 226, 0.12);
}

.finale-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--saffron-hot);
  margin: 0 0 0.5rem;
}

.finale-lede {
  color: rgba(243, 236, 226, 0.75);
  font-weight: 500;
  margin: 0 0 2rem;
}

.finale-hero--landscape {
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0908;
  padding: 1rem;
}

.finale-hero--landscape img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: none;
}

.finale-hero figcaption {
  padding: 0.75rem 0 0;
  font-size: 0.85rem;
  color: rgba(243, 236, 226, 0.65);
  text-align: center;
}

.finale-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.finale-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.finale-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 480px;
  margin: 0 auto;
  padding: 0.5rem;
}

.finale-card figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: rgba(243, 236, 226, 0.7);
  background: rgba(0, 0, 0, 0.35);
}

.finale-card--wide {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .finale-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .finale-card--wide {
    grid-column: span 2;
  }
}

/* Gallery */
.gallery-sec {
  background: var(--paper-deep);
  max-width: none;
}

.gallery-sec > * {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.gallery-head {
  max-width: 48ch;
  margin-bottom: 2rem;
}

.gallery-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  min-height: 200px;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

.gallery-actions {
  display: flex;
  justify-content: center;
  padding: 2rem 0 4rem;
}

.gallery-actions:has(#gallery-load-more[hidden]) {
  display: none;
}

.gallery-sentinel {
  height: 1px;
  width: 100%;
}

.gal-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 1;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 35ms);
}

.gal-card.is-in {
  opacity: 1;
  transform: translateY(0);
}

.gal-card--wide {
  grid-column: span 2;
}

.gal-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: none;
  background: #1a1816;
  cursor: pointer;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  min-height: 140px;
}

.gal-card--wide .gal-card-btn {
  aspect-ratio: 16/9;
  min-height: 120px;
}

.gal-card-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.45s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .gal-card-btn:hover img {
    transform: scale(1.04);
  }
  .gal-card-overlay {
    opacity: 0;
  }
  .gal-card-btn:hover .gal-card-overlay {
    opacity: 1;
  }
}

.gal-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 17, 15, 0.92), transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.65rem;
  text-align: left;
  color: var(--paper);
  font-size: 0.72rem;
  transition: opacity 0.3s ease;
}

.gal-card-overlay strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.gal-card-overlay em {
  font-style: normal;
  opacity: 0.85;
  line-height: 1.3;
}

/* Lightbox */
body.modal-open {
  overflow: hidden;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 17, 15, 0.92);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.gallery-modal-inner {
  margin: 0;
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-modal-inner img {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.gallery-modal-inner figcaption {
  margin-top: 1rem;
  color: var(--paper);
  text-align: center;
  max-width: 50ch;
}

.gallery-modal-inner figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.work-aside {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1rem 0 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--teal);
}

/* Work / Table of Wisdom */
.work {
  background: var(--paper-deep);
  max-width: none;
  padding-block: clamp(5rem, 12vw, 9rem);
}

.work > * {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.work-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.work-copy h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 1rem;
}

.work-list {
  margin: 1.5rem 0 2rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.work-list li {
  margin-bottom: 0.5rem;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.work-visual {
  position: relative;
  min-height: 380px;
}

.reel-stack {
  position: relative;
  width: min(100%, 380px);
  margin: 0 auto;
  aspect-ratio: 3/4;
}

.reel-card {
  position: absolute;
  width: 72%;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(20, 17, 15, 0.2);
  object-fit: cover;
  aspect-ratio: 9/16;
}

.reel-card--1 {
  top: 0;
  left: 0;
  transform: rotate(-8deg);
  z-index: 1;
}

.reel-card--2 {
  top: 12%;
  right: 0;
  transform: rotate(6deg);
  z-index: 2;
}

.reel-card--3 {
  bottom: 0;
  left: 18%;
  width: 64%;
  transform: rotate(-2deg);
  z-index: 3;
  border-radius: 50%;
  aspect-ratio: 1;
  object-fit: cover;
}

.reel-card--logo {
  border: 3px solid var(--teal);
}

/* Contact */
.contact {
  text-align: center;
  padding-bottom: 6rem;
}

.contact-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.75rem;
}

.contact-inner p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.contact-links a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--saffron);
}

/* Footer */
.site-footer {
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-fine {
  margin: 0;
}

.back-top {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}

/* Scroll reveals — visible until motion JS ready */
.reveal {
  opacity: 1;
  transform: none;
  overflow: visible;
}

html.motion-ready .reveal:not(.gallery-head) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--delay, 0) * 1ms);
}

html.motion-ready .hero-intro,
html.motion-ready .hero-intro .hero-title,
html.motion-ready .hero-intro .hero-title .line {
  opacity: 1;
  transform: none;
}

/* Gallery cards are injected later — never hide them with .reveal */
html.motion-ready .gallery-grid .gal-card {
  opacity: 1;
}

html.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: var(--saffron);
  margin-right: 0.75rem;
  vertical-align: middle;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.section-label.is-visible::before {
  transform: scaleX(1);
}

.t-card.is-visible .t-card-media {
  animation: card-media-in 0.8s var(--ease-out) backwards;
}

@keyframes card-media-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.mobile-nav[hidden] {
  display: none !important;
}

/* Bento highlights — roomy 2×2, not four skinny strips */
.bento {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3.5rem) clamp(4.5rem, 10vw, 6.5rem);
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.25rem);
  }
}

.bento-card {
  font-family: var(--font-body);
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.75rem, 3vw, 2.25rem);
  min-height: clamp(11rem, 22vw, 13.5rem);
  border-radius: var(--radius-lg);
  border: none;
  background: var(--paper);
  box-shadow: 0 2px 12px rgba(20, 17, 15, 0.06);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
}

@media (hover: hover) and (pointer: fine) {
  .bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(20, 17, 15, 0.12);
  }
}

.bento-card--route { background: linear-gradient(145deg, #1a1816, #2a2420); color: var(--paper); }
.bento-card--stat { background: linear-gradient(145deg, var(--saffron), var(--saffron-hot)); color: var(--ink); }
.bento-card--start { background: var(--paper-deep); }
.bento-card--tow { background: linear-gradient(145deg, var(--teal-deep), var(--teal)); color: var(--paper); }

.bento-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin: 0 0 0.25rem;
}

.bento-value {
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 2.8vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}

.bento-note {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.92;
  line-height: 1.6;
  max-width: 36ch;
}

.bento-card--route .bento-label,
.bento-card--tow .bento-label {
  opacity: 0.7;
}

.bento-card--stat .bento-note {
  color: var(--ink-soft);
}

.bento-card--route .bento-note,
.bento-card--tow .bento-note {
  max-width: none;
}

/* Full story — seamless scroll reader (no PDF chrome) */
.story-book {
  background: var(--ink);
  color: var(--paper);
  max-width: none;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 4vw, 3rem);
}

.story-book-header {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.story-book .section-label {
  color: rgba(243, 236, 226, 0.55);
}

.story-book-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 1rem;
  color: var(--paper);
}

.story-book-header p {
  color: rgba(243, 236, 226, 0.75);
  margin: 0 auto 1.25rem;
  max-width: 42ch;
  line-height: 1.65;
}

.story-book-quiet {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--saffron-hot);
  text-decoration: none;
}

.story-book-quiet:hover {
  color: var(--paper);
  text-decoration: underline;
}

.story-reader {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem) clamp(2.5rem, 6vw, 4rem);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.story-reader-loading {
  margin: 2rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.story-reader-loading a {
  color: var(--teal-deep);
  font-weight: 600;
}

.story-reader-pages {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.story-page {
  margin: 0;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(20, 17, 15, 0.08);
}

.story-page canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.story-reader.is-ready .story-reader-loading {
  display: none;
}

/* Hero portrait — glow only (no ring mask = no square artifact) */
.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 35%,
    rgba(42, 157, 143, 0.18),
    transparent 70%
  );
  z-index: -1;
  filter: blur(28px);
  pointer-events: none;
}

/* Button polish */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover::after {
    transform: translateX(120%);
  }
}

/* Section rhythm */
.section {
  scroll-margin-top: 96px;
}

.timeline-sec {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stat-pill.is-visible,
  .g-item.is-visible,
  html.motion-ready .g-item.is-visible,
  .gal-card,
  .blob,
  .hero-portrait::before {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

/* Landing: no boxy chrome at top */
#home {
  background: transparent;
}

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