/* ============================================================
   For Sayantika — palette: Goa sunset on warm paper
   ============================================================ */
:root {
  --paper: #F6EFE4;
  --paper-2: #EFE4D3;
  --ink: #1E1916;
  --ink-soft: #5B504A;
  --coral: #FF5E3A;
  --coral-soft: #FF8A6B;
  --mango: #FFB627;
  --blush: #F7C9CF;
  --blush-2: #FBE3E4;
  --sea: #0C3B40;
  --sea-2: #0F4C52;
  --foam: #CFE9E4;
  --line: rgba(30, 25, 22, .14);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --hand: "Caveat", "Segoe Print", cursive;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100vh; }
img { display: block; max-width: 100%; }
main { overflow-x: clip; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
em { font-style: italic; }
::selection { background: var(--coral); color: var(--paper); }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.hand { font-family: var(--hand); }
.eyebrow { color: var(--ink-soft); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* -------- grain + cursor -------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.cursor { display: none; }
@media (pointer: fine) {
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 200; }
  .cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
  .cursor__dot { width: 7px; height: 7px; background: var(--coral); }
  .cursor__ring { width: 34px; height: 34px; border: 1.5px solid var(--coral); opacity: .55; transition: width .35s var(--ease), height .35s var(--ease), opacity .35s, background .35s; }
  .cursor.is-hover .cursor__ring { width: 64px; height: 64px; opacity: .9; background: rgba(255, 94, 58, .12); }
  .cursor.is-hidden { opacity: 0; }
}

/* -------- buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  transition: transform .4s var(--spring), background .25s;
}
.btn:hover { transform: translateY(-2px) scale(1.03); background: var(--coral); }
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

/* ============================================================
   GATE / ENVELOPE
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  background:
    radial-gradient(1200px 600px at 50% 110%, rgba(255, 94, 58, .22), transparent 60%),
    radial-gradient(800px 500px at 10% -10%, rgba(255, 182, 39, .2), transparent 60%),
    var(--paper);
}
.gate.is-gone { pointer-events: none; }
.gate__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: var(--gutter); }
.gate__kicker { color: var(--ink-soft); }
.gate__hint { font-size: 26px; color: var(--coral); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.envelope {
  --w: min(78vw, 380px); --h: calc(var(--w) * .64);
  position: relative; width: var(--w); height: var(--h);
  perspective: 1200px; transition: transform .5s var(--spring);
}
.envelope:hover { transform: rotate(-2deg) scale(1.03); }
.envelope__back, .envelope__front, .envelope__flap { position: absolute; inset: 0; }
.envelope__back { background: #E7D3BA; border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(60, 30, 10, .35); }
.envelope__front {
  background: linear-gradient(160deg, #F1E2CC, #E9D5BA);
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  border-radius: 6px; z-index: 3;
}
.envelope__flap {
  background: linear-gradient(180deg, #E2CBAE, #D9C09F);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  transform-origin: top center; z-index: 4;
  transition: transform .8s var(--ease), z-index 0s .4s;
}
.envelope__letter {
  position: absolute; left: 7%; right: 7%; top: 8%; bottom: 8%; z-index: 2;
  background: #FFFBF4; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 9%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  transition: transform 1s var(--ease) .45s;
}
.envelope__letter-line { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.envelope__letter-name { font-family: var(--serif); font-style: italic; font-size: clamp(32px, 9vw, 46px); line-height: 1; }
.envelope__seal {
  position: absolute; left: 50%; top: 56%; z-index: 5;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FF8A6B, #E0401E 55%, #B92C10);
  box-shadow: 0 6px 14px rgba(150, 30, 10, .4), inset 0 -3px 6px rgba(0, 0, 0, .2);
  display: grid; place-items: center;
  transition: transform .5s var(--spring), opacity .4s;
}
.envelope__seal::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px dashed rgba(255, 230, 220, .55); }
.envelope__seal span { font-family: var(--serif); font-style: italic; font-size: 32px; color: #FFE9E1; }
.envelope:hover .envelope__seal { transform: scale(1.1) rotate(-8deg); }
.envelope.is-open .envelope__seal { transform: scale(0) rotate(90deg); opacity: 0; }
.envelope.is-open .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.envelope.is-open .envelope__letter { transform: translateY(-58%); }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar__logo { font-family: var(--serif); font-size: 24px; text-decoration: none; transition: color .4s; }
.topbar.is-dark .topbar__logo { color: var(--paper); }
.topbar__logo i { color: var(--coral); }
.topbar.is-dark .topbar__logo i { color: var(--mango); }
.topbar__nav {
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(246, 239, 228, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.topbar__nav a { text-decoration: none; font-size: 13px; padding: 6px 12px; border-radius: 999px; transition: background .25s, color .25s; }
.topbar__nav a:hover, .topbar__nav a.is-active { background: var(--ink); color: var(--paper); }
.sound {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: rgba(246, 239, 228, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.sound__bars { display: flex; align-items: center; gap: 2px; height: 14px; }
.sound__bars i { width: 2px; height: 4px; background: var(--ink); border-radius: 2px; transition: height .3s; }
.sound[aria-pressed="true"] .sound__bars i { animation: bars 1s ease-in-out infinite; background: var(--coral); }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes bars { 50% { height: 14px; } }
@media (max-width: 760px) { .topbar__nav { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px;
  padding: 100px var(--gutter) 80px;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(255, 182, 39, .25), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(247, 201, 207, .6), transparent 60%);
}
.hero__kicker { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); margin: 0 0 22px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(255, 94, 58, .5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255, 94, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 94, 58, 0); } }
.hero__title { font-family: var(--serif); font-size: clamp(64px, 12vw, 190px); line-height: .88; letter-spacing: -.02em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > * { display: inline-block; }
.hero__title em { color: var(--coral); }
.hero__sub { max-width: 30em; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); margin: 28px 0 0; }
.hl { background: linear-gradient(transparent 58%, var(--mango) 58%, var(--mango) 90%, transparent 90%); color: var(--ink); }
.hero__drag { font-size: 24px; color: var(--coral); margin: 18px 0 0; transform: rotate(-2deg); }

.hero__table { position: relative; height: min(76vh, 680px); touch-action: pan-y; }
.polaroid {
  position: absolute; margin: 0; width: clamp(150px, 17vw, 240px);
  padding: 10px 10px 0; background: #FFFDF8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 18px 40px -16px rgba(60, 30, 10, .45);
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none;
  will-change: transform;
}
.polaroid.is-drag { cursor: grabbing; box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 40px 70px -20px rgba(60, 30, 10, .55); }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.polaroid figcaption { font-family: var(--hand); font-size: 22px; text-align: center; padding: 6px 0 8px; }
.polaroid::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 182, 39, .55); box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-soft);
}
.hero__scroll i { width: 1px; height: 40px; background: var(--ink-soft); transform-origin: top; animation: drip 2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 96px; gap: 8px; }
  .hero__table { height: 460px; }
  .polaroid { width: 150px; }
  .hero__drag { font-size: 21px; }
  .hero__drag::first-letter { color: transparent; }
  .hero__scroll { display: none; }
}

/* -------- marquee -------- */
.marquee { overflow: hidden; background: var(--ink); color: var(--paper); padding: 18px 0; transform: rotate(-1.5deg) scale(1.04); }
.marquee__track { display: flex; width: max-content; gap: 32px; align-items: center; animation: marquee 32s linear infinite; }
.marquee span { font-family: var(--serif); font-style: italic; font-size: clamp(28px, 4vw, 52px); white-space: nowrap; }
.marquee b { color: var(--mango); font-weight: 400; font-size: 24px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   LETTER
   ============================================================ */
.letter { padding: clamp(100px, 14vw, 180px) var(--gutter); max-width: 1100px; margin: 0 auto; }
.letter__paper { position: relative; }
.letter__to { font-size: clamp(36px, 4vw, 52px); color: var(--coral); margin: 0 0 12px; transform: rotate(-2deg); transform-origin: left; }
.letter__body { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 60px); line-height: 1.12; letter-spacing: -.01em; margin: 0; }
.letter__body .w { opacity: .14; transition: opacity .2s; }
.letter__sign { font-size: clamp(34px, 3.6vw, 48px); margin: 36px 0 0; text-align: right; transform: rotate(-3deg); transform-origin: right center; }
.letter__sign .heart { color: var(--coral); display: inline-block; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } 60% { transform: scale(1); } }

/* ============================================================
   GOA GALLERY (horizontal)
   ============================================================ */
.goa { background: var(--sea); color: var(--paper); position: relative; overflow: hidden; }
.goa .eyebrow { color: var(--foam); }
.goa__pin { position: relative; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.goa__head { position: absolute; top: clamp(80px, 12vh, 120px); left: var(--gutter); z-index: 2; }
.goa__title { font-family: var(--serif); font-size: clamp(48px, 7vw, 104px); line-height: .9; }
.goa__title em { color: var(--mango); }
.goa__note { font-size: 24px; color: var(--blush); margin: 10px 0 0; }
.goa__bigword {
  position: absolute; bottom: -.18em; right: -.04em; z-index: 0;
  font-family: var(--serif); font-size: clamp(200px, 38vw, 620px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(207, 233, 228, .18); pointer-events: none;
}
.goa__track {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: clamp(28px, 4vw, 64px);
  padding: 16vh var(--gutter) 0 calc(var(--gutter) + 36vw);
  width: max-content; will-change: transform;
}
.frame { margin: 0; flex: 0 0 auto; width: clamp(200px, min(24vw, 40vh), 340px); transform: rotate(var(--r)); transition: transform .5s var(--spring); }
.frame:hover { transform: rotate(0deg) scale(1.04); }
.frame--wide { width: clamp(280px, min(34vw, 70vh), 480px); }
.frame img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6);
}
.frame--wide img { aspect-ratio: 4 / 3; }
.frame figcaption { margin-top: 14px; font-family: var(--hand); font-size: 24px; line-height: 1.15; color: var(--blush-2); }
.frame figcaption .mono { font-size: 10px; color: var(--mango); margin-right: 6px; vertical-align: 3px; }
.frame--end { width: clamp(240px, 26vw, 360px); padding-right: var(--gutter); }
.frame--end p { font-family: var(--serif); font-style: italic; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.05; color: var(--foam); margin: 0; }

@media (max-width: 860px) {
  .goa__pin { height: auto; padding: 96px 0 72px; }
  .goa__head { position: relative; top: auto; left: auto; padding: 0 var(--gutter); }
  .goa__track {
    width: auto; padding: 36px var(--gutter) 24px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; transform: none !important;
  }
  .goa__track::-webkit-scrollbar { display: none; }
  .frame, .frame--wide { width: 74vw; scroll-snap-align: center; }
  .frame--wide img { aspect-ratio: 3 / 4; }
  .goa__note::after { content: " (swipe)"; }
}

/* ============================================================
   BEFORE / AFTER
   ============================================================ */
.bite {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: clamp(100px, 12vw, 160px) var(--gutter);
  background: var(--blush-2);
}
.bite h2 { font-family: var(--serif); font-size: clamp(48px, 6.4vw, 96px); line-height: .92; }
.bite h2 em { color: var(--coral); }
.bite__copy p:last-child { color: var(--ink-soft); font-size: 18px; max-width: 26em; }
.compare {
  position: relative; aspect-ratio: 3 / 4; max-height: 82vh; width: 100%; max-width: 560px; justify-self: center;
  border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(80, 20, 10, .45);
  --pos: 50%;
}
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare__after { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none;
}
.compare__handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink);
  display: grid; place-items: center; font-size: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.compare__tag { position: absolute; top: 16px; padding: 6px 10px; border-radius: 999px; background: rgba(30, 25, 22, .6); color: #fff; backdrop-filter: blur(6px); }
.compare__tag--l { left: 16px; }
.compare__tag--r { right: 16px; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; touch-action: pan-y; }
@media (max-width: 860px) { .bite { grid-template-columns: 1fr; } }

/* ============================================================
   TREATY
   ============================================================ */
.accords { padding: clamp(100px, 12vw, 160px) var(--gutter); display: flex; flex-direction: column; align-items: center; }
.accords > .eyebrow { align-self: flex-start; max-width: 900px; width: 100%; margin-left: auto; margin-right: auto; }
.treaty {
  position: relative; width: 100%; max-width: 900px;
  padding: clamp(28px, 6vw, 72px);
  background: #FFFBF3;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .05), 0 50px 90px -40px rgba(60, 30, 10, .4);
  outline: 1px solid #D9C6A8; outline-offset: -14px;
  overflow: hidden;
}
.treaty::after { content: ""; position: absolute; inset: 20px; border: 1px solid #E8D9C1; pointer-events: none; }
.treaty__crest { text-align: center; font-size: 28px; color: var(--coral); }
.treaty__kicker { text-align: center; color: var(--ink-soft); margin: 10px 0 0; }
.treaty__title { text-align: center; font-family: var(--serif); font-size: clamp(46px, 7vw, 92px); line-height: 1; margin: 12px 0 8px; }
.treaty__lede { text-align: center; color: var(--ink-soft); max-width: 34em; margin: 0 auto 32px; }
.treaty__lede b { color: var(--ink); font-weight: 600; }
.treaty__articles { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 0; }
.treaty__articles li { padding: 16px 0; border-top: 1px dashed #D9C6A8; font-family: var(--serif); font-size: clamp(19px, 2vw, 24px); line-height: 1.3; }
.treaty__articles li:last-child { border-bottom: 1px dashed #D9C6A8; }
.treaty__articles b { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); margin-right: 8px; vertical-align: 2px; }
.treaty__sigs { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(16px, 4vw, 48px); }
.sig p { margin: 8px 0 0; color: var(--ink-soft); border-top: 1px solid var(--ink); padding-top: 8px; }
.sig__pad { position: relative; height: 130px; }
.sig__pad--signed { display: flex; align-items: flex-end; padding-bottom: 6px; }
.sig__pad--signed span { font-size: 58px; line-height: 1; transform: rotate(-6deg); color: #213a8a; }
.sig__pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 8px; background: repeating-linear-gradient(transparent 0 25px, rgba(217, 198, 168, .25) 25px 26px); }
.sig__placeholder { position: absolute; left: 12px; bottom: 10px; font-size: 26px; color: #BCA98B; pointer-events: none; transition: opacity .3s; }
.sig__pad.has-ink .sig__placeholder { opacity: 0; }
.treaty__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; flex-wrap: wrap; }
.treaty.is-signed .treaty__actions { visibility: hidden; }
.treaty.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.stamp {
  position: absolute; right: clamp(14px, 6vw, 80px); bottom: clamp(70px, 10vw, 120px); z-index: 3;
  width: 190px; height: 190px; border-radius: 50%;
  border: 4px double var(--coral); color: var(--coral);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-14deg) scale(2.4); opacity: 0; pointer-events: none;
  mix-blend-mode: multiply;
}
.stamp span { font-family: var(--mono); font-weight: 500; font-size: 24px; letter-spacing: .12em; }
.stamp small { font-family: var(--hand); font-size: 20px; }
.treaty.is-signed .stamp { animation: stamp .55s var(--spring) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-14deg) scale(2.4); } 100% { opacity: .9; transform: rotate(-14deg) scale(1); } }
@media (max-width: 600px) {
  .treaty__sigs { grid-template-columns: 1fr; }
  .sig__pad--signed { height: 80px; }
  .stamp { width: 150px; height: 150px; bottom: 40px; }
  .stamp span { font-size: 19px; }
}

/* ============================================================
   GAMES
   ============================================================ */
.games { background: var(--blush); padding: clamp(100px, 12vw, 160px) var(--gutter); }
.games__head h2, .studio__head h2 { font-family: var(--serif); font-size: clamp(48px, 7vw, 104px); line-height: .9; }
.games__head h2 em { color: var(--coral); }
.games__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(40px, 6vw, 72px); }
.game { background: var(--paper); border-radius: 28px; padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 20px; position: relative; }
.game__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.game__head h3 { font-family: var(--serif); font-size: clamp(34px, 3.4vw, 48px); line-height: 1; }
.game__head p { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; max-width: 26em; }
.game__stat { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.game__foot { display: flex; gap: 10px; }
.game__win { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 26px; color: var(--coral); opacity: 0; transform: translateY(10px); transition: .5s var(--ease); pointer-events: none; padding: 0 16px; }
.game.is-won .game__win { opacity: 1; transform: none; }
.game.is-won .game__foot { opacity: 0; }

/* puzzle */
.puzzle { position: relative; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--paper-2); touch-action: manipulation; }
.puzzle__tile {
  position: absolute; width: calc(100% / 3); height: calc(100% / 3); padding: 2px;
  transition: transform .28s var(--ease);
}
.puzzle__tile > div { width: 100%; height: 100%; border-radius: 8px; background-image: url("photos/sq/grumpy-cute.jpg"); background-size: 300% 300%; }
.puzzle__tile.can-move { cursor: pointer; }
.puzzle__tile.can-move > div { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.puzzle__tile.can-move:hover > div { filter: brightness(1.08); }
.puzzle__full { position: absolute; inset: 0; background: url("photos/sq/grumpy-cute.jpg") center / cover; opacity: 0; transition: opacity .5s; pointer-events: none; z-index: 2; }
.puzzle.peek .puzzle__full, .game.is-won .puzzle__full { opacity: 1; }

/* memory */
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mcard { aspect-ratio: 1; perspective: 800px; }
.mcard__in { position: relative; width: 100%; height: 100%; transition: transform .55s var(--ease); transform-style: preserve-3d; }
.mcard.is-flipped .mcard__in, .mcard.is-matched .mcard__in { transform: rotateY(180deg); }
.mcard__face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.mcard__back {
  background:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 8px, rgba(255, 255, 255, .14) 8px 10px),
    linear-gradient(160deg, var(--sea-2), var(--sea));
  display: grid; place-items: center; color: var(--mango); font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2.2vw, 28px);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .08);
}
.mcard__front { transform: rotateY(180deg); }
.mcard__front img { width: 100%; height: 100%; object-fit: cover; }
.mcard.is-matched .mcard__front { box-shadow: 0 0 0 3px var(--coral); }
.mcard button { width: 100%; height: 100%; display: block; }
.mcard:not(.is-flipped):not(.is-matched) button:hover .mcard__in { transform: rotateY(14deg) scale(1.03); }
@media (max-width: 860px) {
  .games__grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .memory { gap: 7px; } }

/* ============================================================
   STUDIO (internship)
   ============================================================ */
.studio { padding: clamp(100px, 12vw, 160px) var(--gutter); background: radial-gradient(900px 600px at 100% 0%, rgba(255, 182, 39, .28), transparent 60%), var(--paper); }
.studio__head h2 em { color: var(--sea-2); }
.studio__lede { color: var(--ink-soft); font-size: 18px; max-width: 30em; margin: 20px 0 0; }
.studio__grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: clamp(20px, 3vw, 32px); margin-top: clamp(40px, 6vw, 72px); }
.card { background: #FFFBF3; border-radius: 28px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(60, 30, 10, .35); display: flex; flex-direction: column; gap: 18px; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card__head h3 { font-family: var(--serif); font-size: clamp(28px, 2.6vw, 38px); line-height: 1.05; }
.card__count { color: var(--ink-soft); }
.card__count b { color: var(--coral); font-weight: 500; font-size: 14px; }
.card--wrap { grid-row: span 2; }
.card .btn { align-self: flex-start; }

/* bubble wrap */
.bubbles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #E6F3F0, #D6ECE7); }
.bubble {
  aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0 12%, rgba(255, 255, 255, .35) 22%, rgba(180, 220, 212, .25) 60%, rgba(120, 180, 170, .35));
  box-shadow: inset 0 -3px 6px rgba(70, 130, 120, .25), 0 3px 6px rgba(70, 130, 120, .18);
  transition: transform .15s var(--spring);
}
.bubble:hover { transform: scale(1.06); }
.bubble:active { transform: scale(.9); }
.bubble.is-popped {
  background: radial-gradient(circle at 50% 50%, rgba(150, 200, 190, .28), rgba(150, 200, 190, .12) 60%);
  box-shadow: inset 0 2px 4px rgba(70, 130, 120, .25); transform: scale(.86); cursor: default;
}
.bubbles__msg { font-size: clamp(26px, 2.6vw, 34px); color: var(--coral); margin: 0; min-height: 1.3em; line-height: 1.15; }

/* breathe */
.breathe { position: relative; height: 240px; display: grid; place-items: center; }
.breathe__ring { position: absolute; width: 200px; height: 200px; border-radius: 50%; border: 1.5px dashed rgba(15, 76, 82, .3); }
.breathe__orb {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--mango), var(--coral) 60%, #E2401F);
  filter: blur(.3px); transform: scale(.4);
  box-shadow: 0 0 80px rgba(255, 94, 58, .45);
}
.breathe__label { position: relative; z-index: 1; font-family: var(--serif); font-style: italic; font-size: 30px; color: #fff; margin: 0; text-shadow: 0 2px 12px rgba(120, 30, 10, .4); }

/* kit */
.kit { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.kit label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; border-bottom: 1px dashed var(--line); font-size: 15px; transition: color .3s; }
.kit input { position: absolute; opacity: 0; pointer-events: none; }
.kit .box { flex: none; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--ink); display: grid; place-items: center; transition: background .25s, transform .3s var(--spring); margin-top: 1px; }
.kit .box::after { content: "✓"; color: var(--paper); font-size: 14px; transform: scale(0); transition: transform .3s var(--spring); }
.kit input:checked + .box { background: var(--coral); box-shadow: none; transform: rotate(-6deg); }
.kit input:checked + .box::after { transform: scale(1); }
.kit input:checked ~ * , .kit label:has(input:checked) { color: var(--ink-soft); }
.kit input:focus-visible + .box { outline: 2px solid var(--coral); outline-offset: 2px; }
.kit__done { font-size: 28px; color: var(--sea-2); margin: 0; opacity: 0; transform: translateY(8px); transition: .5s var(--ease); }
.kit.is-done + .kit__done { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .studio__grid { grid-template-columns: 1fr; }
  .card--wrap { grid-row: auto; }
}
@media (max-width: 420px) { .bubbles { grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 10px; } }

/* ============================================================
   FINALE / BOARDING PASS
   ============================================================ */
.finale {
  padding: clamp(100px, 12vw, 170px) var(--gutter) clamp(80px, 10vw, 140px);
  background: linear-gradient(180deg, var(--paper) 0%, #FFD9B8 35%, #FF9A76 70%, #F2694B 100%);
  display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden;
}
.finale .eyebrow { justify-content: center; }
.finale__title { font-family: var(--serif); font-size: clamp(52px, 9vw, 140px); line-height: .9; max-width: 10ch; }
.finale__title em { color: var(--coral); }
.pass {
  display: flex; width: 100%; max-width: 820px; margin-top: clamp(40px, 6vw, 72px); text-align: left;
  filter: drop-shadow(0 40px 50px rgba(120, 30, 10, .35));
}
.pass__main {
  flex: 1; background: #FFFBF3; border-radius: 22px 0 0 22px; padding: clamp(20px, 3.4vw, 36px);
  -webkit-mask: radial-gradient(circle 14px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 14px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 14px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 14px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.pass__row { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.pass__airline { color: var(--coral); }
.pass__route { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0; }
.pass__route > div:not(.pass__plane) { display: flex; flex-direction: column; }
.pass__route > div:last-child { text-align: right; }
.pass__route small { color: var(--ink-soft); }
.pass__route b { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 80px); line-height: 1; }
.pass__route span { font-size: 14px; color: var(--ink-soft); }
.pass__plane { flex: 1; text-align: center; color: var(--coral); font-size: 26px; position: relative; }
.pass__plane::before { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; border-top: 1.5px dashed rgba(30, 25, 22, .3); z-index: -1; }
.pass__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; border-top: 1px dashed var(--line); padding-top: 18px; }
.pass__grid small { display: block; color: var(--ink-soft); }
.pass__grid span { font-family: var(--serif); font-size: 19px; line-height: 1.15; }
.pass__stub {
  flex: 0 0 170px; background: var(--ink); color: var(--paper); border-radius: 0 22px 22px 0;
  border-left: 2px dashed rgba(246, 239, 228, .4);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px;
  transform-origin: 0% 0%; transition: transform .3s var(--spring);
  -webkit-mask: radial-gradient(circle 14px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 14px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 14px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 14px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.pass__stub:hover { transform: rotate(4deg); }
.pass__stub .hand { font-size: 24px; color: var(--mango); }
.pass__barcode { width: 100px; height: 54px; background: repeating-linear-gradient(90deg, var(--paper) 0 2px, transparent 2px 4px, var(--paper) 4px 5px, transparent 5px 9px, var(--paper) 9px 12px, transparent 12px 14px); }
.pass.is-torn .pass__stub { pointer-events: none; }
.finale__msg { font-size: clamp(40px, 5vw, 64px); color: #fff; margin: 40px 0 0; opacity: 0; transform: scale(.8); transition: .7s var(--spring); text-shadow: 0 4px 20px rgba(120, 30, 10, .35); }
.finale.is-torn .finale__msg { opacity: 1; transform: none; }
@media (max-width: 640px) {
  .pass { flex-direction: column; }
  .pass__main { border-radius: 22px 22px 0 0; -webkit-mask: none; mask: none; }
  .pass__stub { flex: none; flex-direction: row; border-radius: 0 0 22px 22px; border-left: 0; border-top: 2px dashed rgba(246, 239, 228, .4); -webkit-mask: none; mask: none; transform-origin: 0 0; }
  .pass__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pass__barcode { width: 70px; height: 36px; }
}

.footer { background: var(--ink); color: var(--paper); padding: 40px var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 20px; }
.footer .mono { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--mango); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { animation: none; }
}
