/* ═══════════════════════════════════════════════════════════
   TESSERA — showcase site
   Designed & built by Claude (Fable 5)
   ═══════════════════════════════════════════════════════════ */

:root {
  --terracotta: #C4624A;
  --terracotta-mid: #D4836A;
  --terracotta-light: #E8A898;
  --brown-deep: #3D2314;
  --brown-ink: #241109;
  --cream: #F5EDE8;
  --cream-card: #EDE4DC;
  --gold: #D9A441;
  --gold-soft: #E8C173;
  --text-deep: #2C2C2A;
  --text-soft: #6E5A4E;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text-deep);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--terracotta); color: var(--cream); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* film grain — one fixed SVG turbulence layer over everything */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
}

/* ═══════════════ NAV ═══════════════ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 400ms, backdrop-filter 400ms, box-shadow 400ms;
}
.nav.scrolled {
  background: rgba(245, 237, 232, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(61, 35, 20, 0.08);
}
.nav.scrolled .nav-name, .nav.scrolled .nav-links a { color: var(--text-deep); }

.nav-mark { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.nav-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 20px; height: 20px;
}
.nav-tiles i { border-radius: 2.5px; transition: transform 500ms var(--ease-out); }
.nav-tiles i:nth-child(1) { background: var(--terracotta); }
.nav-tiles i:nth-child(2) { background: var(--gold); }
.nav-tiles i:nth-child(3) { background: var(--brown-deep); }
.nav-tiles i:nth-child(4) { background: var(--terracotta-mid); }
.nav-mark:hover .nav-tiles i:nth-child(1) { transform: translate(-2px,-2px) rotate(-8deg); }
.nav-mark:hover .nav-tiles i:nth-child(2) { transform: translate(2px,-2px) rotate(6deg); }
.nav-mark:hover .nav-tiles i:nth-child(3) { transform: translate(-2px,2px) rotate(5deg); }
.nav-mark:hover .nav-tiles i:nth-child(4) { transform: translate(2px,2px) rotate(-7deg); }

.nav-name {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--cream);
  transition: color 400ms;
}

.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 2.5vw, 2rem); margin-left: 1.5rem; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: rgba(245, 237, 232, 0.85);
  transition: color 300ms;
}
@media (max-width: 700px) {
  .nav-hidesm { display: none; }
}
.nav-links a:hover { color: var(--gold-soft); }
.nav-cta {
  padding: 0.45rem 1.1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
}

/* ═══════════════ HERO ═══════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--brown-ink);
  overflow: hidden;
}

#mosaic-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 46% at 50% 47%, rgba(24, 10, 4, 0.52) 0%, rgba(24, 10, 4, 0.30) 55%, rgba(24, 10, 4, 0) 100%),
    radial-gradient(ellipse 85% 70% at 50% 45%, rgba(36, 17, 9, 0) 40%, rgba(36, 17, 9, 0.40) 82%, rgba(36, 17, 9, 0.70) 100%),
    linear-gradient(to bottom, rgba(36,17,9,0.42) 0%, transparent 24%, transparent 70%, rgba(36,17,9,0.6) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 60rem;
  will-change: transform, opacity;
}

.hero-eyebrow {
  font-size: clamp(0.68rem, 1.1vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 2rem;
  text-shadow: 0 1px 12px rgba(24, 10, 4, 0.8);
}

.hero-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  font-weight: 380;
  font-size: clamp(2.6rem, 7.5vw, 6.2rem);
  line-height: 1.06;
  color: var(--cream);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.ht-line { display: block; }
.ht-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotate(1.5deg);
  filter: blur(6px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out), filter 900ms var(--ease-out);
}
.loaded .ht-word { opacity: 1; transform: none; filter: none; }
.ht-italic {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 70, "WONK" 1;
  color: var(--terracotta-light);
}

.hero-sub {
  margin: 2.2rem auto 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: rgba(245, 237, 232, 0.78);
}

/* staggered line reveals on load */
.reveal-line { overflow: hidden; }
.reveal-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1000ms var(--ease-out);
}
.loaded .reveal-line > span { transform: none; }

.hero-scrollcue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transition: opacity 1200ms 1400ms;
}
.loaded .hero-scrollcue { opacity: 1; }
.cue-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 237, 232, 0.6);
}
.cue-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--gold-soft), transparent);
  animation: cueDrop 2.2s var(--ease-in-out) infinite;
  transform-origin: top;
}
@keyframes cueDrop {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); transform-origin: top; }
  46% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ═══════════════ WORD RIVER ═══════════════ */

.river {
  background: var(--brown-ink);
  padding: 0 0 4.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}
.river-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: riverFlow 36s linear infinite;
}
.river-track span {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 60, "SOFT" 60;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  color: rgba(232, 168, 152, 0.5);
  white-space: nowrap;
}
.river-track i {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--gold);
  opacity: 0.7;
}
@keyframes riverFlow { to { transform: translateX(-50%); } }

/* ═══════════════ MANIFESTO ═══════════════ */

.fade-band {
  height: clamp(8rem, 16vw, 13rem);
  background: linear-gradient(to bottom, var(--brown-ink), #4a2c18 35%, #a4826b 70%, var(--cream));
}
.fade-band.flip { transform: scaleY(-1); }

.manifesto {
  position: relative;
  background: var(--cream);
  padding: clamp(6rem, 12vw, 10rem) 1.5rem;
  text-align: center;
  overflow: hidden;
}

.seam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.seam-path {
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(217, 164, 65, 0.5));
}
.seam-branch { stroke-width: 1.8; opacity: 0.7; }

.manifesto-inner { max-width: 46rem; margin: 0 auto; }

.man-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 3rem;
}

.man-line {
  font-family: var(--serif);
  font-variation-settings: "opsz" 100, "SOFT" 30;
  font-weight: 420;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.35;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.man-line em {
  font-style: italic;
  font-variation-settings: "opsz" 100, "SOFT" 60, "WONK" 1;
  color: var(--terracotta);
}
.man-gold {
  margin-top: 3rem;
  color: transparent;
  background: linear-gradient(100deg, var(--terracotta) 10%, var(--gold) 50%, var(--terracotta) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: goldSheen 6s var(--ease-in-out) infinite;
}
@keyframes goldSheen {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

/* ═══════════════ SHARED SECTION HEADINGS ═══════════════ */

.sec-kicker {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1.2rem;
}
.sec-kicker.light { color: var(--gold-soft); }

.sec-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-deep);
  text-wrap: balance;
}
.sec-title.light { color: var(--cream); }

.sec-sub {
  margin-top: 1.4rem;
  max-width: 36rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

/* ═══════════════ ROOMS ═══════════════ */

.rooms { padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 5vw, 4rem); background: var(--cream); }
.rooms-head { max-width: 72rem; margin: 0 auto 4rem; }

.rooms-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
/* bento: 2 wide + 3 on desktop */
@media (min-width: 980px) {
  .rooms-grid { grid-template-columns: repeat(6, 1fr); }
  .room-card:nth-child(1), .room-card:nth-child(2) { grid-column: span 3; }
  .room-card:nth-child(n+3) { grid-column: span 2; }
  .room-card:nth-child(1) p, .room-card:nth-child(2) p { max-width: 34rem; }
}

.room-card {
  position: relative;
  background: var(--cream-card);
  border: 1px solid rgba(61, 35, 20, 0.08);
  border-radius: 18px;
  padding: 2rem 1.6rem 1.8rem;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: box-shadow 400ms var(--ease-out), border-color 400ms;
  will-change: transform;
}
.room-card:hover {
  box-shadow: 0 24px 48px -18px rgba(61, 35, 20, 0.28);
  border-color: rgba(196, 98, 74, 0.35);
}

.rc-glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 220px at var(--gx, 50%) var(--gy, 50%), rgba(255, 246, 230, 0.55), transparent 70%);
  opacity: 0;
  transition: opacity 350ms;
  pointer-events: none;
}
.room-card:hover .rc-glare { opacity: 1; }

.rc-num {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(196, 98, 74, 0.55);
}

.rc-icon {
  width: 48px; height: 48px;
  color: var(--terracotta);
  margin-bottom: 1.4rem;
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.room-card:hover .rc-icon { transform: rotate(-5deg) scale(1.1); }
.rc-icon svg { width: 100%; height: 100%; }

.room-card h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 40, "SOFT" 30;
  font-weight: 520;
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}
.room-card p { font-size: 0.92rem; line-height: 1.65; color: var(--text-soft); }

/* ═══════════════ COMPANION ═══════════════ */

.companion {
  background:
    radial-gradient(ellipse 90% 70% at 30% 50%, #46281a 0%, var(--brown-ink) 70%);
  padding: clamp(6rem, 12vw, 10rem) clamp(1.25rem, 5vw, 4rem);
}
.companion-inner {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}
@media (max-width: 760px) {
  .companion-inner { grid-template-columns: 1fr; }
}

.orb-stage {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 400px);
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.orb-core {
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffd0b3 0%, #e08a68 38%, var(--terracotta) 62%, #8a3018 100%);
  animation: orbBreathe 4.6s var(--ease-in-out) infinite;
}
@keyframes orbBreathe {
  0%, 100% {
    transform: scale(1);
    filter: brightness(0.85);
    box-shadow: 0 0 24px 8px rgba(196, 98, 74, 0.35), 0 0 80px 30px rgba(212, 131, 106, 0.16);
  }
  50% {
    transform: scale(1.07);
    filter: brightness(1.2);
    box-shadow: 0 0 48px 18px rgba(196, 98, 74, 0.6), 0 0 130px 50px rgba(212, 131, 106, 0.3);
  }
}
/* stray tesserae in orbit around the light */
.orb-orbit {
  position: absolute;
  border-radius: 50%;
  animation: orbSpin linear infinite;
}
.orb-orbit i, .orb-orbit b {
  position: absolute;
  top: -5px; left: 50%;
  width: 10px; height: 10px;
  margin-left: -5px;
  border-radius: 3px;
  background: var(--gold);
  box-shadow: 0 0 10px 2px rgba(217, 164, 65, 0.45);
}
.orb-orbit b {
  top: auto; bottom: -4px;
  width: 7px; height: 7px;
  background: var(--terracotta-light);
  box-shadow: 0 0 8px 2px rgba(232, 168, 152, 0.4);
}
.o1 { width: 72%; height: 72%; animation-duration: 26s; }
.o2 { width: 88%; height: 88%; animation-duration: 38s; animation-direction: reverse; }
.o2 i { width: 8px; height: 8px; background: var(--terracotta-mid); box-shadow: 0 0 9px 2px rgba(212,131,106,0.4); }
.o3 { width: 100%; height: 100%; animation-duration: 52s; }
@keyframes orbSpin { to { transform: rotate(360deg); } }

.orb-ripple {
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(232, 168, 152, 0.5);
  animation: ripple 4.6s var(--ease-out) infinite;
}
.orb-ripple.r2 { animation-delay: 1.53s; }
.orb-ripple.r3 { animation-delay: 3.06s; }
@keyframes ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.7); opacity: 0; }
}

.companion-p {
  color: rgba(245, 237, 232, 0.78);
  line-height: 1.75;
  margin-top: 1.4rem;
  max-width: 32rem;
}

/* ═══════════════ ASSEMBLY ═══════════════ */

.assembly {
  height: 320vh;
  position: relative;
  background: var(--cream);
}
.assembly-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
#assembly-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.assembly-caption {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 100, "SOFT" 60;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  color: var(--text-soft);
  transition: opacity 400ms;
  pointer-events: none;
  transform: translateY(38vh);
}

/* ═══════════════ OUR STORY ═══════════════ */

.story {
  background: var(--cream);
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
}
.story-inner { max-width: 38rem; margin: 0 auto; }

.story-tiles {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 26px; height: 26px;
  margin-bottom: 1.6rem;
}
.story-tiles i { border-radius: 3px; }
.story-tiles i:nth-child(1) { background: var(--terracotta); }
.story-tiles i:nth-child(2) { background: var(--gold); }
.story-tiles i:nth-child(3) { background: var(--brown-deep); }
.story-tiles i:nth-child(4) { background: var(--terracotta-mid); }

.story-p {
  margin-top: 1.6rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-soft);
  text-wrap: pretty;
}
.story-sig {
  margin-top: 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 40, "SOFT" 60, "WONK" 1;
  font-size: 1.2rem;
  color: var(--terracotta);
}

/* ═══════════════ CTA ═══════════════ */

.cta {
  position: relative;
  background: var(--cream);
  text-align: center;
  padding: clamp(5rem, 10vw, 9rem) 1.5rem clamp(6rem, 12vw, 10rem);
  overflow: hidden;
}

/* loose tesserae drifting up like embers */
.cta-drift { position: absolute; inset: 0; pointer-events: none; }
.cta-drift i {
  position: absolute;
  bottom: -3%;
  width: 12px; height: 12px;
  border-radius: 3px;
  opacity: 0;
  animation: driftUp linear infinite;
}
.cta-drift i:nth-child(1) { left: 8%;  background: var(--terracotta-light); animation-duration: 19s; animation-delay: 0s; }
.cta-drift i:nth-child(2) { left: 22%; background: var(--gold); width: 8px; height: 8px; animation-duration: 25s; animation-delay: 6s; }
.cta-drift i:nth-child(3) { left: 35%; background: var(--terracotta-mid); animation-duration: 21s; animation-delay: 11s; }
.cta-drift i:nth-child(4) { left: 52%; background: var(--terracotta); width: 9px; height: 9px; animation-duration: 27s; animation-delay: 3s; }
.cta-drift i:nth-child(5) { left: 64%; background: var(--gold-soft); animation-duration: 18s; animation-delay: 13s; }
.cta-drift i:nth-child(6) { left: 78%; background: var(--terracotta-mid); width: 7px; height: 7px; animation-duration: 24s; animation-delay: 8s; }
.cta-drift i:nth-child(7) { left: 88%; background: var(--terracotta-light); animation-duration: 20s; animation-delay: 16s; }
.cta-drift i:nth-child(8) { left: 45%; background: var(--brown-deep); width: 8px; height: 8px; animation-duration: 26s; animation-delay: 20s; }
@keyframes driftUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.5; }
  85%  { opacity: 0.35; }
  100% { transform: translateY(-110vh) rotate(300deg); opacity: 0; }
}
.cta-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  letter-spacing: -0.015em;
  color: var(--text-deep);
}
.cta-sub { margin-top: 1rem; color: var(--text-soft); font-size: 1.1rem; }
.cta-btn {
  display: inline-block;
  margin-top: 2.6rem;
  padding: 1rem 2.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  background: var(--terracotta);
  border-radius: 999px;
  transition: transform 300ms var(--ease-out), box-shadow 300ms, background 300ms;
  box-shadow: 0 10px 30px -10px rgba(196, 98, 74, 0.55);
}
.cta-btn:hover {
  transform: translateY(-3px);
  background: #b5543d;
  box-shadow: 0 18px 44px -12px rgba(196, 98, 74, 0.65);
}

/* ═══════════════ FOOTER ═══════════════ */

.footer {
  position: relative;
  background: var(--brown-ink);
  color: rgba(245, 237, 232, 0.6);
  padding: 3.5rem 1.5rem;
  text-align: center;
}
/* a thin gold seam joins page to footer */
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold) 30%, var(--gold-soft) 50%, var(--gold) 70%, transparent);
  opacity: 0.75;
}
.footer-inner { display: flex; flex-direction: column; gap: 0.9rem; align-items: center; }
.footer-mark {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--cream);
}
.footer-note { font-size: 0.85rem; }
.footer-note a { color: var(--gold-soft); }
.footer-fine { font-size: 0.75rem; max-width: 34rem; opacity: 0.7; }

/* ═══════════════ SCROLL REVEALS ═══════════════ */

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.fade-up.in { opacity: 1; transform: none; }

/* ═══════════════ CONTINUE MODAL ═══════════════ */

.continue-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.continue-modal[hidden] { display: none; }

.cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 10, 4, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 300ms ease;
}
.continue-modal.open .cm-backdrop { opacity: 1; }

.cm-card {
  position: relative;
  z-index: 1;
  width: min(100%, 27rem);
  background: var(--cream);
  border-radius: 22px;
  padding: 2.4rem 2rem 1.7rem;
  text-align: center;
  box-shadow: 0 40px 80px -30px rgba(24, 10, 4, 0.6);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 380ms var(--ease-out), opacity 380ms var(--ease-out);
}
.continue-modal.open .cm-card { transform: none; opacity: 1; }

.cm-x {
  position: absolute;
  top: 0.8rem; right: 1rem;
  background: none; border: 0;
  font-size: 1.7rem; line-height: 1;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 200ms;
}
.cm-x:hover { color: var(--terracotta); }

.cm-tiles {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 26px; height: 26px;
  margin-bottom: 1.1rem;
}
.cm-tiles i { border-radius: 3px; }
.cm-tiles i:nth-child(1) { background: var(--terracotta); }
.cm-tiles i:nth-child(2) { background: var(--gold); }
.cm-tiles i:nth-child(3) { background: var(--brown-deep); }
.cm-tiles i:nth-child(4) { background: var(--terracotta-mid); }

.cm-card h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60, "SOFT" 40;
  font-weight: 460;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}
.cm-sub { color: var(--text-soft); margin-top: 0.5rem; font-size: 0.98rem; }

.cm-options { display: grid; gap: 0.8rem; margin: 1.7rem 0 1rem; }
.cm-opt {
  display: block;
  text-align: left;
  text-decoration: none;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(61, 35, 20, 0.14);
  transition: border-color 220ms, transform 220ms var(--ease-out), box-shadow 220ms;
}
.cm-opt:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(61, 35, 20, 0.42);
  border-color: rgba(196, 98, 74, 0.5);
}
.cm-web { background: var(--terracotta); border-color: var(--terracotta); }
.cm-web:hover { border-color: var(--terracotta); }
.cm-web .cm-opt-title, .cm-web .cm-opt-desc { color: var(--cream); }
.cm-web .cm-opt-desc { opacity: 0.82; }

.cm-opt-title { display: block; font-weight: 600; font-size: 1rem; }
.cm-opt-desc { display: block; font-size: 0.85rem; color: var(--text-soft); margin-top: 0.15rem; }

/* app option, pre-launch: present but clearly not yet tappable */
.cm-soon {
  position: relative;
  cursor: default;
  background: rgba(61, 35, 20, 0.03);
  border-style: dashed;
}
.cm-soon:hover { transform: none; box-shadow: none; border-color: rgba(61, 35, 20, 0.2); }
.cm-soon .cm-opt-title { color: var(--text-soft); }
.cm-badge {
  position: absolute;
  top: 50%; right: 1.1rem;
  transform: translateY(-50%);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown-deep);
  background: var(--gold-soft);
  padding: 0.28em 0.6em;
  border-radius: 999px;
}

.cm-fine { font-size: 0.78rem; color: var(--text-soft); opacity: 0.72; }

/* ═══════════════ REDUCED MOTION ═══════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .ht-word, .reveal-line > span, .fade-up { opacity: 1; transform: none; filter: none; }
  .hero-scrollcue { opacity: 1; }
  .assembly { height: auto; }
  .assembly-sticky { position: static; height: auto; padding: 6rem 0; }
  .assembly-caption { transform: none; font-size: clamp(2.4rem, 6vw, 4.5rem); color: var(--terracotta); }
}
