:root {
  --bg: #fdf7f2;
  --bg-dark: #160e22;
  --ink: #1c1430;
  --ink-soft: #6b6280;
  --line: #efe2e8;
  --accent: #ff4d5e;        /* electric coral */
  --accent-2: #00c2b2;      /* vivid teal */
  --accent-3: #7b3ff2;      /* violet */
  --accent-4: #ffb020;      /* amber */
  --paper: #ffffff;
  --maxw: 1180px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Smooth scrolling is owned by the JS inertia scroller (script.js).
   Falls back to instant native scrolling where that's disabled. */
html { scroll-behavior: auto; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* hero eyebrow reads as a deliberate, anchored label via a leading accent tick */
.hero-inner .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.hero-inner .eyebrow::before {
  content: "";
  flex: none;
  width: 32px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
}

h1, h2, h3 { font-weight: 500; line-height: 1.08; }

/* "Coming soon" pill next to an eyebrow label */
.eyebrow .soon-tag {
  -webkit-text-fill-color: var(--accent-3); /* opt out of the eyebrow's gradient clip */
  color: var(--accent-3);
  background: rgba(123, 63, 242, 0.10);
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 10px;
  font-size: 9px;
  letter-spacing: 0.16em;
  vertical-align: middle;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 242, 238, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.brand-mark { font-size: 20px; letter-spacing: 0.28em; text-indent: 0.28em; font-weight: 600; }
.brand-sub { font-size: 9px; letter-spacing: 0.42em; text-indent: 0.42em; font-weight: 500; color: var(--ink-soft); margin-top: 4px; }

.nav-list { display: flex; gap: 34px; list-style: none; }
.nav-list a {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width 0.25s ease;
}
.nav-list a:hover { color: var(--ink); }
.nav-list a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: 0.3s; }

/* Hero */
.hero {
  padding: 130px 0 120px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 88% -10%, rgba(123, 63, 242, 0.20) 0%, transparent 55%),
    radial-gradient(70% 70% at 5% 110%, rgba(0, 194, 178, 0.20) 0%, transparent 55%),
    radial-gradient(60% 60% at 60% 50%, rgba(255, 77, 94, 0.10) 0%, transparent 60%),
    var(--bg);
}
.hero-inner { max-width: 860px; }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(58px, 11vw, 142px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.022em;
}
/* "We create" sits quiet and dark; the accent line carries the color */
.hero-title em {
  font-style: italic;
  background: linear-gradient(110deg, var(--accent-3) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lede {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.5;
  color: #4b4460;
  max-width: 500px;
  margin: 30px 0 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 15px 30px;
  border-radius: 2px;
  transition: 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(110deg, var(--accent), var(--accent-3));
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 77, 94, 0.32);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(123, 63, 242, 0.36); }
.btn-ghost { border-color: var(--accent-3); color: var(--accent-3); }
.btn-ghost:hover { background: var(--accent-3); color: #fff; transform: translateY(-2px); }

/* Sections */
.section { padding: 110px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2,
.split-text h2,
.contact-inner h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 5.5vw, 58px);
}
.section-lede { color: var(--ink-soft); font-size: 18px; margin-top: 18px; }

/* Practice — expanding editorial list */
.practice { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.practice-list {
  position: relative;
  border-top: 1px solid var(--line);
}
/* cursor spotlight that follows the pointer down the list */
.practice-list::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%),
    rgba(123, 63, 242, 0.12), transparent 72%);
}
.practice-list:hover::after { opacity: 1; }

.prac {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px) clamp(16px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: color 0.4s ease;
}
/* gradient fill that blooms on hover */
.prac::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, rgb(var(--c)), rgb(var(--c2)));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.prac:hover::before { opacity: 1; }
.prac:hover { color: #fff; }

.prac__num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1;
  background: linear-gradient(120deg, rgb(var(--c)), rgb(var(--c2)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: -webkit-text-fill-color 0.4s ease;
}
.prac:hover .prac__num { -webkit-text-fill-color: rgba(255, 255, 255, 0.92); }

.prac__main h3 {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 500;
  line-height: 1.18;
}
.prac__desc {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  font-size: clamp(15px, 1.5vw, 17px);
  color: inherit;
  transition: max-height 0.45s ease, opacity 0.4s ease, margin-top 0.4s ease;
}
.prac:hover .prac__desc { max-height: 90px; margin-top: 11px; opacity: 1; }
.prac__main h3,
.prac:not(:hover) .prac__desc { transition: color 0.4s ease; }

.prac__arrow {
  font-size: 24px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.prac:hover .prac__arrow { opacity: 1; transform: none; }

/* touch / no-hover: show everything, keep gradient numbers, no fill */
@media (hover: none) {
  .prac__desc { max-height: none; margin-top: 11px; opacity: 1; color: var(--ink-soft); }
  .prac__arrow { display: none; }
}


/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .split-media { order: -1; }
.split-text h2 { margin-bottom: 22px; }
.split-text p { color: var(--ink-soft); font-size: 17px; margin-bottom: 28px; }
.split-media {
  aspect-ratio: 5 / 4;
  background: linear-gradient(135deg, #2a2620, #16140f);
  border-radius: 4px;
  position: relative;
}
.split-media::after {
  content: attr(data-label);
  position: absolute;
  left: 28px; bottom: 24px;
  font-family: var(--serif);
  font-size: 24px;
  color: rgba(244, 242, 238, 0.5);
}
.workshops { background: var(--paper); }
.lab { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Workshop cards (rendered from workshops.json) */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 12px;
}
.ws-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.22,0.61,0.36,1),
    transform 0.8s cubic-bezier(0.22,0.61,0.36,1), box-shadow 0.35s ease;
}
.ws-card.in { opacity: 1; transform: none; }
.ws-card:hover {
  box-shadow: 0 26px 54px rgba(28, 20, 48, 0.13);
  transform: translateY(-5px);
}
.ws-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.ws-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.ws-card:hover .ws-card__media img { transform: scale(1.05); }
.ws-card__accent { height: 4px; background: linear-gradient(90deg, rgb(var(--c)), rgba(var(--c), 0.45)); }
.ws-card__body { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 26px; flex: 1; }
.ws-card__level {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: rgb(var(--c));
}
.ws-card__body h3 { font-family: var(--serif); font-size: 27px; line-height: 1.1; }
.ws-card__body > p { color: var(--ink-soft); font-size: 15px; flex: 1; }
.ws-card__dates { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.ws-card__dates li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: 9px;
}
.ws-card__dates .spots { font-size: 12px; font-weight: 600; color: rgb(var(--c)); }
.ws-card__book { margin-top: 6px; text-align: center; }
.ws-foot { text-align: center; margin-top: 40px; color: var(--ink-soft); font-size: 16px; }
.ws-foot a { color: var(--accent-3); }
.ws-foot a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .ws-grid { grid-template-columns: 1fr; max-width: 460px; margin: 12px auto 0; }
}

/* Contact */
.contact {
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(80% 90% at 15% 10%, rgba(255, 77, 94, 0.55) 0%, transparent 55%),
    radial-gradient(80% 90% at 90% 90%, rgba(0, 194, 178, 0.5) 0%, transparent 55%),
    linear-gradient(135deg, #2a1259 0%, #160e22 60%);
}
.contact .eyebrow { -webkit-text-fill-color: initial; background: none; color: var(--accent-4); }
.contact-inner { max-width: 720px; margin: 0 auto; position: relative; }
.contact .section-lede { color: rgba(255,255,255,0.78); margin: 0 auto 38px; }
.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 46px);
  color: #fff;
  border-bottom: 2px solid var(--accent-4);
  padding-bottom: 6px;
  transition: color 0.2s;
}
.contact-email:hover { color: var(--accent-4); }
.contact-loc { color: rgba(255,255,255,0.6); margin-top: 26px; font-size: 14px; letter-spacing: 0.05em; }

/* Contact form (dark section) */
.contact-form { max-width: 600px; margin: 42px auto 0; text-align: left; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.cf-field label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 13px 15px;
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255, 255, 255, 0.34); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-3);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(123, 63, 242, 0.2);
}
.contact-form textarea { resize: vertical; min-height: 112px; }
.contact-form select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.contact-form select option { color: #1c1430; } /* readable in the native dropdown */
/* honeypot — visually hidden, off-screen */
.cf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cf-submit { display: block; width: 100%; margin-top: 6px; border: 0; cursor: pointer; }
.cf-status { margin-top: 14px; font-size: 14px; min-height: 1.4em; color: rgba(255, 255, 255, 0.8); }
.cf-status.ok { color: var(--accent-2); }
.cf-status.err { color: var(--accent-4); }
.contact-alt { margin-top: 28px; font-size: 14px; color: rgba(255, 255, 255, 0.6); }
.contact-alt a { color: #fff; border-bottom: 1px solid var(--accent-4); }
.contact-alt a:hover { color: var(--accent-4); }
@media (max-width: 600px) { .cf-row { grid-template-columns: 1fr; gap: 0; } }

/* Footer */
.site-footer { background: var(--bg-dark); color: rgba(244,242,238,0.7); border-top: 1px solid rgba(255,255,255,0.08); padding: 50px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }

/* Newsletter subscribe (footer) */
.footer-subscribe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 40px;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-subscribe__text h3 { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); color: #fff; }
.footer-subscribe__text p { color: rgba(244, 242, 238, 0.55); font-size: 14px; margin-top: 6px; max-width: 44ch; }
.subscribe-form { display: flex; gap: 10px; flex: none; }
.subscribe-form input[type="email"] {
  width: clamp(200px, 30vw, 300px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.subscribe-form input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.34); }
.subscribe-form input[type="email"]:focus { border-color: var(--accent-3); box-shadow: 0 0 0 3px rgba(123, 63, 242, 0.2); }
.subscribe-form button {
  flex: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 12px 24px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(110deg, var(--accent), var(--accent-3));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.subscribe-form button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.subscribe-form button:disabled { opacity: 0.6; cursor: default; }
.subscribe-status { width: 100%; margin-top: 14px; font-size: 14px; min-height: 1.3em; color: rgba(244, 242, 238, 0.7); }
.subscribe-status.ok { color: var(--accent-2); }
.subscribe-status.err { color: var(--accent-4); }
@media (max-width: 640px) {
  .footer-subscribe { flex-direction: column; align-items: flex-start; }
  .subscribe-form { width: 100%; }
  .subscribe-form input[type="email"] { flex: 1; width: auto; }
}
.footer-brand .brand-mark { color: var(--paper); }
.footer-brand p { margin-top: 10px; font-size: 14px; }
.social { display: flex; gap: 24px; list-style: none; }
.social a { font-size: 13px; letter-spacing: 0.05em; transition: color 0.2s; }
.social a:hover { color: var(--paper); }
.copyright { font-size: 12px; width: 100%; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); letter-spacing: 0.04em; }

/* Responsive */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-list.is-open { max-height: 320px; }
  .nav-list li { border-top: 1px solid var(--line); }
  .nav-list a { display: block; padding: 16px 28px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
  .section { padding: 76px 0; }
  .hero { padding: 90px 0 80px; }
}

/* ============================================================
   MOTION — Tier 1
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* Scroll-reveal: elements rise, fade, and sharpen into place */
  [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
    transition:
      opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
      filter 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform, filter;
  }
  [data-reveal].in {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }

  /* Living gradient on the hero accent word */
  .hero-title em {
    background-size: 220% auto;
    animation: hueShift 7s ease-in-out infinite alternate;
  }
  @keyframes hueShift {
    to { background-position: 100% center; }
  }

  /* Ambient drifting color orbs behind the hero */
  .hero::before,
  .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    pointer-events: none;
  }
  .hero::before {
    width: 460px; height: 460px;
    top: -120px; right: -60px;
    background: radial-gradient(circle, rgba(123, 63, 242, 0.30), transparent 65%);
    animation: drift1 16s ease-in-out infinite alternate;
  }
  .hero::after {
    width: 380px; height: 380px;
    bottom: -140px; left: -40px;
    background: radial-gradient(circle, rgba(0, 194, 178, 0.28), transparent 65%);
    animation: drift2 19s ease-in-out infinite alternate;
  }
  @keyframes drift1 {
    to { transform: translate(-70px, 60px) scale(1.15); }
  }
  @keyframes drift2 {
    to { transform: translate(60px, -50px) scale(1.1); }
  }
}

/* keep hero content above the orbs */
.hero-inner { position: relative; z-index: 1; }

/* Frosted veil: grounds the text on the left (calm, softly frosted, lightly
   tinted), fading to fully clear on the right where the vivid scene shows. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(253, 247, 242, 0.88) 0%,
    rgba(253, 247, 242, 0.72) 26%,
    rgba(253, 247, 242, 0.34) 46%,
    rgba(253, 247, 242, 0) 64%
  );
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  /* limit the frost to the left (text) zone, fading it out to the right */
  -webkit-mask-image: linear-gradient(100deg, #000 0%, #000 38%, transparent 62%);
  mask-image: linear-gradient(100deg, #000 0%, #000 38%, transparent 62%);
}
@media (max-width: 760px) {
  /* on narrow screens the text runs top-to-bottom, so frost the TOP (text) zone
     and clear it below — a vertical mask keeps the lower spheres crisp instead
     of blurring the whole hero (which looked inconsistent with desktop/iPad) */
  .hero-veil {
    background: linear-gradient(180deg, rgba(253,247,242,0.86) 0%, rgba(253,247,242,0.55) 40%, rgba(253,247,242,0) 66%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 66%);
    mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 66%);
  }
}

/* Interactive headline — per-letter spring + cursor-driven gradient */
.hero-title .ltr {
  display: inline-block;
  will-change: transform;
}
.hero-title em { position: relative; }
.hero-title em .ltr {
  /* palindrome gradient so it tiles seamlessly when the position is shifted;
     saturated violet<->coral only (no pale teal, so it pops off the veil) */
  background-image: linear-gradient(110deg,
    var(--accent-3), var(--accent), var(--accent-3));
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* enlarge the paint box on all sides so italic ascenders, descenders and
     the dot of "i" aren't clipped by background-clip:text (margin keeps layout) */
  padding: 0.32em 0.18em;
  margin: -0.32em -0.18em;
}

/* Hero headline must not clip (italic overhang + per-letter padding),
   so it uses a gentle fade-rise entrance instead of the hard mask-wipe. */
.hero-title .line { overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .hero-title .line > * {
    transform: translateY(0.7em);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  }
  .hero-title.in .line > * { transform: none; opacity: 1; }
}

/* Film-grain overlay — monochrome SVG noise over the whole hero */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%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(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-grain { animation: grainShift 0.55s steps(3) infinite; }
}
@keyframes grainShift {
  0%   { background-position: 0 0; }
  25%  { background-position: -40px 30px; }
  50%  { background-position: 35px -35px; }
  75%  { background-position: -25px -20px; }
  100% { background-position: 30px 25px; }
}

/* Floating sculptural forms (between the fluid field and the text) */
.hero-forms {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.form-wrap { position: absolute; will-change: transform; }
.form { display: block; width: 100%; height: 100%; will-change: transform; }

/* Volumetric orb — colour set per-instance via --c (rgb triplet) */
.form--orb {
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255,255,255,0.62), rgba(255,255,255,0) 58%),
    radial-gradient(circle at 60% 63%, rgba(var(--c, 123,63,242), 0.7), rgba(var(--c, 123,63,242), 0) 74%);
  mix-blend-mode: screen;
}
.form--ring {
  border-radius: 50%;
  border: 2px solid rgba(var(--c, 123,63,242), 0.3);
}
@keyframes formFloatA {
  0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); }
  33% { transform: translate(10.5%, -13.5%) rotate(10.5deg) scale(1.12); }
  66% { transform: translate(-7.5%, 7.5%) rotate(-7.5deg) scale(0.94); }
}
@keyframes formFloatB {
  0%, 100% { transform: translate(0,0) scale(1); }
  40% { transform: translate(-12%, 10.5%) scale(1.15); }
  70% { transform: translate(9%, -9%) scale(0.91); }
}
@keyframes formSpin { to { transform: rotate(360deg); } }

/* WebGL fluid gradient field (replaces the CSS orbs when active) */
.hero-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
.hero.gl-active::before,
.hero.gl-active::after { display: none; }
.hero.gl-active { background: var(--bg); }

/* Smart header: condenses on scroll */
.site-header { transition: background 0.3s ease, box-shadow 0.3s ease; }
.header-inner { transition: height 0.35s cubic-bezier(0.22, 0.61, 0.36, 1); }
.site-header.scrolled {
  background: rgba(253, 247, 242, 0.92);
  box-shadow: 0 8px 30px rgba(28, 20, 48, 0.08);
}
.site-header.scrolled .header-inner { height: 60px; }

/* ============================================================
   MOTION — Tier 2 (signature interactions)
   ============================================================ */

/* ---- Custom cursor (fine-pointer devices only) ---- */
@media (hover: hover) and (pointer: fine) {
  .cursor-dot,
  .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5000; /* topmost — stays visible over the chat and other panels */
    mix-blend-mode: normal;
  }
  .cursor-dot {
    width: 7px; height: 7px;
    background: var(--accent-3);
    transform: translate(-50%, -50%);
  }
  .cursor-ring {
    width: 38px; height: 38px;
    border: 1.5px solid rgba(123, 63, 242, 0.45);
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease,
      background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  }
  .cursor-ring.is-hover {
    width: 64px; height: 64px;
    background: rgba(123, 63, 242, 0.08);
    border-color: var(--accent);
  }
  body.cursor-ready,
  body.cursor-ready a,
  body.cursor-ready button { cursor: none; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---- Floating label-spheres band (drift right → left) ---- */
.marquee {
  overflow: hidden;
  /* match the white sections directly above & below so the band is seamless
     (no visible panel edge, no divider lines) — just the spheres */
  background: var(--paper);
  padding: 36px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(36px, 6vw, 110px); /* responsive spacing between spheres */
  width: max-content;
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 46s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

.bubble {
  position: relative;
  flex: 0 0 auto;
  width: var(--size, 140px);
  height: var(--size, 140px);
  animation-name: bubbleBob;
  animation-duration: var(--bob, 6s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes bubbleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.bubble__orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* feathered colour + blur so the edge dissolves like the hero/loader spheres */
  background:
    radial-gradient(circle at 36% 30%, rgba(255,255,255,0.55), rgba(255,255,255,0) 46%),
    radial-gradient(circle at 60% 64%, rgba(var(--c, 123,63,242), 0.85) 0%, rgba(var(--c, 123,63,242), 0.5) 46%, rgba(var(--c, 123,63,242), 0) 78%);
  filter: blur(7px);
}
.bubble__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 14%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink); /* dark ink — readable on the light orbs / white band */
  font-size: calc(var(--size, 140px) * 0.145);
}
@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; }
}

/* ============================================================
   MOTION — Tier 3 (polish)
   ============================================================ */

/* ---- Page-load curtain (wordmark hands off to header logo) ----
   The curtain and the wordmark are independent: the curtain lifts while the
   wordmark flies to the header logo (driven by script.js). */
.loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none; /* let the cursor reach the hero so the field/spheres react under the glass */
}
.loader-curtain {
  position: absolute;
  inset: 0;
  /* frosted veil over the hero's living field + spheres (rendered behind) —
     same world as the landing page, just softened, then it peels away */
  background: rgba(253, 247, 242, 0.5);
  -webkit-backdrop-filter: blur(13px) saturate(1.2);
  backdrop-filter: blur(13px) saturate(1.2);
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
/* grain on the curtain so it shares the hero's surface as it lifts */
.loader-curtain::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.10;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='lg'%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(%23lg)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.loader.lift .loader-curtain { transform: translateY(-100%); }

.loader-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Orbiting spheres around the wordmark (crisp, brand-palette) */
.loader-orbits {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}
.loader.handoff .loader-orbits { opacity: 0; } /* fade out as the wordmark flies off */
.orbit {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  animation-name: orbitSpin;
  animation-duration: var(--dur, 7s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.orbit > .loader-sphere {
  position: absolute;
  top: 0;
  left: var(--r, 110px);
  transform: translate(-50%, -50%);
}
.loader-sphere {
  border-radius: 50%;
  /* feathered: the colour fades to transparent at the rim, then a soft blur
     dissolves the edge so the orb blends into the frosted background */
  background:
    radial-gradient(circle at 34% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0) 50%),
    radial-gradient(circle at 60% 62%, rgba(var(--c, 123,63,242), 0.92) 0%, rgba(var(--c, 123,63,242), 0.7) 48%, rgba(var(--c, 123,63,242), 0) 100%);
  filter: blur(var(--blur, 5px));
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .orbit { animation: none; }
}
.loader-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  transform-origin: top left; /* set by JS for the flip to the header logo */
  opacity: 0;
  animation: loaderFadeIn 0.7s ease forwards;
}
.loader-mark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(30px, 6vw, 54px);
  letter-spacing: 0.28em;
  text-indent: 0.28em; /* offset trailing letter-spacing so it reads centred */
  color: var(--ink); /* same ink as the header logo */
}
.loader-sub {
  font-family: var(--sans);
  font-weight: 500;
  /* keep the same sub:mark proportion as the header logo so the flip maps exactly */
  font-size: clamp(13px, 2.7vw, 24px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--ink-soft);
  margin-top: clamp(6px, 1.1vw, 11px);
}
@keyframes loaderFadeIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
}

/* ---- Stats band with animated counters ---- */
.stats {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 64px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat:nth-child(1) .stat-num { background-image: linear-gradient(120deg, var(--accent), var(--accent-3)); }
.stat:nth-child(2) .stat-num { background-image: linear-gradient(120deg, var(--accent-2), #0098d4); }
.stat:nth-child(3) .stat-num { background-image: linear-gradient(120deg, var(--accent-3), #ff4d9e); }
.stat:nth-child(4) .stat-num { background-image: linear-gradient(120deg, var(--accent-4), var(--accent)); }
.stat-label {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
}

/* ============================================================
   BUCKET A — Lusion-inspired premium pack
   ============================================================ */

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  z-index: 2500;
  pointer-events: none;
}

/* ---- "Scroll to explore" cue ---- */
.scroll-cue {
  position: absolute;
  bottom: 36px; left: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 1;
}
.scroll-cue__line {
  position: relative;
  width: 56px; height: 1px;
  background: rgba(28, 20, 48, 0.18);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue__line::after { animation: cueSlide 1.9s ease-in-out infinite; }
}
@keyframes cueSlide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(240%); }
}

/* ---- Line-by-line mask reveals ---- */
[data-reveal="mask"] {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
.line { display: block; overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .line > * {
    display: block;
    transform: translateY(110%);
    transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  [data-reveal="mask"].in .line > * { transform: none; }
}

/* ---- Full-screen menu overlay (mobile) ---- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 0 32px;
  background: linear-gradient(160deg, #221643 0%, #160e22 70%);
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition: clip-path 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}
.menu-overlay.open {
  clip-path: inset(0 0 0% 0);
  pointer-events: auto;
}
.menu-nav a {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 11vw, 72px);
  line-height: 1.08;
  color: #fff;
  padding: 4px 0;
  overflow: hidden;
}
.menu-nav a > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.25s ease;
}
.menu-overlay.open .menu-nav a > span { transform: none; }
.menu-overlay.open .menu-nav a:nth-child(1) > span { transition-delay: 0.12s; }
.menu-overlay.open .menu-nav a:nth-child(2) > span { transition-delay: 0.18s; }
.menu-overlay.open .menu-nav a:nth-child(3) > span { transition-delay: 0.24s; }
.menu-overlay.open .menu-nav a:nth-child(4) > span { transition-delay: 0.30s; }
.menu-overlay.open .menu-nav a:nth-child(5) > span { transition-delay: 0.36s; }
.menu-overlay.open .menu-nav a:nth-child(6) > span { transition-delay: 0.42s; }
.menu-nav a:hover > span { color: var(--accent-3); }
.menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
.menu-foot a { color: rgba(255, 255, 255, 0.85); }
.menu-foot a:hover { color: #fff; }
.menu-social { display: flex; gap: 22px; }

/* hamburger → X + colour while menu open */
.nav-toggle span { transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease; transform-origin: center; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { z-index: 1600; }
body.menu-open .nav-toggle span { background: #fff; }

/* ---- Contextual cursor labels ---- */
@media (hover: hover) and (pointer: fine) {
  .cursor-ring {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cursor-text {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
  }
  .cursor-ring.is-label {
    width: 88px; height: 88px;
    background: var(--accent-3);
    border-color: transparent;
  }
  .cursor-ring.is-label .cursor-text { opacity: 1; }
  body.cursor-label-active .cursor-dot { opacity: 0; }
}

/* ============================================================
   BUCKET B — Pinned process scrub
   ============================================================ */
.process {
  position: relative;
  height: 300vh;            /* scroll track: pins for ~2 viewports */
  background: var(--bg-dark);
  color: #fff;
}
.process-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.process-bg-num {
  position: absolute;
  right: 2%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(220px, 40vw, 560px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  user-select: none;
  transition: color 0.4s ease;
}
.process-inner { position: relative; z-index: 1; width: 100%; }
.process-head { margin-bottom: 56px; }
.process-head .eyebrow {
  color: var(--accent-4);
  -webkit-text-fill-color: initial;
  background: none;
}
.process-head h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 5.5vw, 60px);
  max-width: 13ch;
}
.process-stages { position: relative; min-height: 230px; }
.process-stage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.process-stage.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.process-index {
  font-family: var(--serif);
  font-size: clamp(58px, 8vw, 98px);
  line-height: 0.9;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.process-stage h3 {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 500;
  margin-bottom: 16px;
}
.process-stage p {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 46ch;
}
/* Per-stage image placeholders, revealed cumulatively as you scroll */
.process-thumbs {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: 50px;
  min-height: 90px; /* reserve space so the rail doesn't jump as thumbs appear */
}
.process-thumb {
  flex: 0 0 132px;
  opacity: 0;
  transform: translateY(18px) scale(0.93);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.process-thumb.is-active { opacity: 1; transform: none; }
.process-thumb__media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.process-thumb__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.process-thumb.is-current .process-thumb__media { transform: translateY(-5px); }
.process-thumb:nth-child(1).is-current .process-thumb__media { border-color: var(--accent);   box-shadow: 0 14px 34px rgba(255, 77, 94, 0.28); }
.process-thumb:nth-child(2).is-current .process-thumb__media { border-color: var(--accent-2); box-shadow: 0 14px 34px rgba(0, 194, 178, 0.28); }
.process-thumb:nth-child(3).is-current .process-thumb__media { border-color: var(--accent-3); box-shadow: 0 14px 34px rgba(123, 63, 242, 0.30); }
.process-thumb:nth-child(4).is-current .process-thumb__media { border-color: var(--accent-4); box-shadow: 0 14px 34px rgba(255, 176, 32, 0.28); }
@media (max-width: 760px) {
  .process-thumbs { gap: 8px; min-height: 64px; }
  .process-thumb { flex-basis: 0; flex-grow: 1; }
}

.process-rail {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 30px;
}
.process-rail__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
}
.process-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}
.process-tick {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
}
.process-tick.is-active { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .process-stage { transition: none; }
}
@media (max-width: 760px) {
  .process-stage { grid-template-columns: 1fr; gap: 10px; }
  .process-stages { min-height: 320px; }
  .process-ticks .process-tick { font-size: 9px; letter-spacing: 0.06em; }
}

/* ============================================================
   BUCKET B — Vertical-drives-horizontal editorial gallery
   ============================================================ */
.hgallery { position: relative; background: var(--paper); }

.hgallery-sticky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 42px;
}
.hgallery.is-pinned .hgallery-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hgallery-head { padding: 0 6vw; }
.hgallery-head .eyebrow { margin-bottom: 14px; }
.hgallery-head h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 5.5vw, 58px);
  display: inline-block;
}
.hgallery-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 26px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  vertical-align: middle;
}
.hgallery-hint::after {
  content: "";
  width: 46px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.hgallery-row {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 6vw;
  will-change: transform;
}
.hgallery.is-pinned .hgallery-row { width: max-content; }

/* Editorial cards */
.hcard { flex: none; position: relative; }
.hcard-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 20px 50px rgba(28, 20, 48, 0.14);
}
/* Photos fill their media box (replace with real images in /assets) */
.hcard-media img,
.split-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* WebGL shader layer sits over the CSS gradient fallback */
.hcard-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.hcard:nth-child(1) .hcard-media { background: linear-gradient(135deg, #ff4d5e, #7b3ff2); }
.hcard:nth-child(2) .hcard-media { background: linear-gradient(135deg, #00c2b2, #0098d4); }
.hcard:nth-child(3) .hcard-media { background: linear-gradient(135deg, #7b3ff2, #ff4d9e); }
.hcard:nth-child(4) .hcard-media { background: linear-gradient(135deg, #ffb020, #ff4d5e); }
.hcard:nth-child(5) .hcard-media { background: linear-gradient(135deg, #00c2b2, #7b3ff2); }
.hcard:nth-child(6) .hcard-media { background: linear-gradient(135deg, #ff4d9e, #ffb020); }
.hcard-media::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 16px, transparent 16px 32px);
  transition: transform 0.6s ease;
}
.hcard:hover .hcard-media::before { transform: scale(1.12); }
.hcard-media::after {
  content: attr(data-label);
  position: absolute;
  left: 22px; bottom: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: rgba(255, 255, 255, 0.92);
}
.hcard:hover .hcard-media { box-shadow: 0 30px 64px rgba(28, 20, 48, 0.24); filter: saturate(1.12) brightness(1.04); }

.hcard-meta { padding: 18px 4px 0; }
.hcard-meta h3 { font-size: 21px; margin-bottom: 4px; transition: color 0.25s ease; }
.hcard-meta h3::after {
  content: " →";
  display: inline-block;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  color: var(--accent);
}
.hcard:hover .hcard-meta h3 { color: var(--accent-3); }
.hcard:hover .hcard-meta h3::after { opacity: 1; transform: translateX(0); }
.hcard-meta p { color: var(--ink-soft); font-size: 14px; }

/* Editorial size + vertical-offset variants (desktop pinned) */
.hcard--lg { width: 40vw; }
.hcard--lg .hcard-media { height: 60vh; }
.hcard--md { width: 30vw; }
.hcard--md .hcard-media { height: 48vh; }
.hcard--sm { width: 24vw; }
.hcard--sm .hcard-media { height: 40vh; }
.hcard--tall { width: 30vw; }
.hcard--tall .hcard-media { height: 42vh; }
.hgallery.is-pinned .hcard--down { transform: translateY(7vh); }
.hgallery.is-pinned .hcard--up { transform: translateY(-7vh); }

/* CTA end card */
.hcard--cta {
  width: 30vw;
  align-self: center;
  display: flex;
  align-items: center;
}
.hcard--cta-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 48vh;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.hcard--cta:hover .hcard--cta-inner { border-color: var(--accent-3); transform: translateY(-4px); }
.hcard--cta h3 {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 500;
}
.hcard--cta span {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--accent-3);
}

/* Non-pinned fallback (mobile / reduced motion): native horizontal swipe */
.hgallery:not(.is-pinned) .hgallery-sticky { padding: 76px 0; }
.hgallery:not(.is-pinned) .hgallery-row {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 18px;
}
.hgallery:not(.is-pinned) .hcard { scroll-snap-align: start; }

@media (max-width: 760px) {
  .hcard--up, .hcard--down { transform: none !important; }
  .hcard--lg { width: 82vw; }
  .hcard--md, .hcard--tall, .hcard--sm, .hcard--cta { width: 72vw; }
  .hcard--lg .hcard-media,
  .hcard--md .hcard-media,
  .hcard--sm .hcard-media,
  .hcard--tall .hcard-media { height: 52vh; }
  .hcard--cta-inner { height: 52vh; }
  .hgallery-hint { display: none; }
}

/* ============================================================
   Studio chat widget
   ============================================================ */
.chat { position: fixed; right: 24px; bottom: 24px; z-index: 2400; }
.chat-toggle {
  width: 60px; height: 60px;
  border: 0; border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 12px 30px rgba(123, 63, 242, 0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.chat-toggle:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 36px rgba(255, 77, 94, 0.42); }
.chat.open .chat-toggle { transform: scale(0.9); opacity: 0.85; }

.chat-panel[hidden] { display: none; } /* the hidden attribute must win over display:flex */
.chat-panel {
  position: absolute;
  right: 0; bottom: 76px;
  width: min(370px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 130px));
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(28, 20, 48, 0.28);
  transform-origin: bottom right;
  animation: chatIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes chatIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(110deg, var(--accent), var(--accent-3));
  color: #fff;
}
.chat-head__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.25); }
.chat-head__title { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; flex: 1; }
.chat-close {
  flex: none;
  width: 36px; height: 36px;
  margin-right: -6px;          /* optical alignment to the panel edge */
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 9px;
  color: #fff; font-size: 26px; line-height: 1;
  opacity: 0.85;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.chat-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.16); }

.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg {
  max-width: 84%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg.bot { align-self: flex-start; background: var(--bg); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: linear-gradient(120deg, var(--accent), var(--accent-3)); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.typing { color: var(--ink-soft); font-style: italic; }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input {
  flex: 1; border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 16px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-input input:focus { border-color: var(--accent-3); box-shadow: 0 0 0 3px rgba(123,63,242,0.14); }
.chat-input button {
  flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: flex; align-items: center; justify-content: center;
}
.chat-input button:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 600px) { .chat { right: 16px; bottom: 16px; } }

/* Keep the custom cursor consistent over the chat (it sits above the panel,
   pointer-events:none, so the X and inputs stay fully clickable). */
@media (hover: hover) and (pointer: fine) {
  body.cursor-ready .chat,
  body.cursor-ready .chat * { cursor: none; }
}
