/* joinsumin.com — hand-written layout. Colours, type families and radii come
   from tokens.css (generated from design/tokens.json); do not hard-code them here. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("fonts/MartianMono-Variable.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  --pad: clamp(22px, 5vw, 72px);
  background: var(--chalk);
  color: var(--ink);
  font: 500 clamp(16px, 0.55vw + 13px, 19px)/1.45 var(--ui-body-family), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---- Type: the app's roles, scaled for a page ------------------------------ */

.w-mega, .w-hero, .w-pop, .w-fact { font-family: var(--mega-display-family); font-optical-sizing: none; text-wrap: balance; }
.w-mega { font-weight: var(--mega-display-weight); font-size: clamp(46px, 7.4vw, 112px); line-height: 0.95; letter-spacing: -0.018em; font-variation-settings: var(--mega-display-variations); }
.w-hero { font-weight: var(--hero-display-weight); font-size: clamp(40px, 5.4vw, 80px); line-height: 0.98; letter-spacing: -0.014em; font-variation-settings: var(--hero-display-variations); }
.w-pop  { font-weight: var(--pop-display-weight); font-size: clamp(25px, 2.5vw, 36px); line-height: 1.08; letter-spacing: -0.01em; font-variation-settings: var(--pop-display-variations); }
.w-fact { font-weight: var(--card-fact-weight); font-size: clamp(19px, 1.5vw, 23px); line-height: 1.25; letter-spacing: -0.015em; font-variation-settings: var(--card-fact-variations); text-wrap: pretty; }
.w-lead { font-size: clamp(18px, 1.5vw, 23px); line-height: 1.4; max-width: 34em; text-wrap: pretty; }
.t-button { font: var(--ui-button-weight) 17px/20px var(--ui-button-family); letter-spacing: var(--ui-button-tracking); }
.mono { font: var(--mono-badge-weight) clamp(10.5px, 0.2vw + 10px, 12.5px)/1.35 var(--mono-badge-family); letter-spacing: 0.03em; font-variation-settings: var(--mono-badge-variations); text-transform: uppercase; }
.muted { color: var(--ink-muted); }

/* ---- Parts (same shapes as the app) ----------------------------------------- */

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: var(--pad); }

.wordmark { font: 800 30px/1 var(--hero-display-family); letter-spacing: -0.02em; font-variation-settings: "opsz" 96, "wdth" 94; display: inline-flex; align-items: baseline; color: var(--ink); text-decoration: none; }
.wordmark i { width: 0.3em; height: 0.3em; margin-left: 0.06em; border-radius: 50%; background: var(--solar-yellow); border: 1.5px solid var(--ink); }

.live { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card-white); white-space: nowrap; }
.live b { width: 9px; height: 9px; border-radius: 50%; background: var(--mint-pop); border: 1.5px solid var(--ink); }

.stamp { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--card, var(--card-white)); white-space: nowrap; }
.stamp.paper { background: var(--card-white); color: var(--ink); }

/* Pressable things get a lip. Flat things are not pressable. */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 58px; padding: 0 30px; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform 0.14s cubic-bezier(0.3, 1.7, 0.5, 1), box-shadow 0.14s ease-out; }
.btn.primary { background: var(--ink); color: var(--card-white); box-shadow: 0 5px 0 -1.5px var(--lip, var(--solar-yellow)), 0 5px 0 0 var(--ink); }
.btn.primary.on-pop { --lip: var(--card-white); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:active { transform: translateY(4px) scale(0.985); box-shadow: 0 1px 0 -1.5px var(--lip, var(--solar-yellow)), 0 1px 0 0 var(--ink); }
.btn:focus-visible, .wordmark:focus-visible { outline: 3px solid var(--sky-electric); outline-offset: 4px; }

.totem, .bit { display: block; overflow: visible; height: auto; }

/* ---- Top + hero --------------------------------------------------------------- */

.top { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; }

.hero { display: grid; grid-template-columns: 1fr; gap: 8px; padding-bottom: clamp(56px, 8vw, 120px); }
.pile { position: relative; width: min(100%, 560px); aspect-ratio: 1 / 0.86; margin-inline: auto; }
.pile .totem { position: absolute; animation: bob 4.2s ease-in-out infinite; }
.hero-copy { display: flex; flex-direction: column; gap: clamp(18px, 2vw, 28px); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 6px; }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); align-items: center; gap: clamp(24px, 4vw, 72px); padding-top: clamp(8px, 2vw, 40px); }
  .hero .pile { order: 2; width: 124%; max-width: none; margin-left: -4%; }
}

/* ---- Bands ---------------------------------------------------------------------- */

.band { background: var(--card, var(--chalk)); border-top: 1.5px solid var(--ink); padding-block: clamp(64px, 9vw, 136px); overflow: hidden; }
.split { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.copy { display: flex; flex-direction: column; gap: clamp(16px, 1.8vw, 26px); }
.narrow { max-width: 12em; }

@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .flip .art { order: -1; }
}

.stage { position: relative; width: min(100%, 600px); aspect-ratio: 1 / 1; margin-inline: auto; }

/* 01 — the card your AI writes */
.mystery { position: absolute; aspect-ratio: 1; border-radius: 50%; border: 2.5px dashed var(--ink); display: grid; place-items: center; font: 800 clamp(120px, 17vw, 200px)/1 var(--hero-display-family); rotate: 10deg; }
.vibe { position: absolute; left: 2%; bottom: 0; width: 76%; padding: clamp(18px, 2.4vw, 28px); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--card-white); border: 1.5px solid var(--ink); border-radius: calc(var(--card-radius) + 6px); rotate: -4deg; }
.vibe-totem { width: 42%; margin-bottom: 4px; rotate: 6deg; }
.vibe .stamp { margin-bottom: 4px; }
.vibe .w-pop { font-size: clamp(22px, 2.3vw, 31px); }

/* 02 — the radar */
.ring { position: absolute; border-radius: 50%; border: 1.5px dashed var(--line); }
.ring.solid { border-style: solid; }
.radar .bit { position: absolute; animation: bob 5s ease-in-out infinite; }
.radar .bit:nth-of-type(2n) { animation-delay: -2.2s; }
.coin { position: absolute; inset: 27%; border-radius: 50%; background: var(--solar-yellow); border: 2px solid var(--ink); box-shadow: 0 9px 0 0 var(--ink); display: grid; place-items: center; }
.coin .totem { width: 54%; }
.quote { position: absolute; left: 4%; right: 10%; bottom: -3%; padding: 16px 20px; background: var(--card-white); border: 1.5px solid var(--ink); border-radius: var(--sticker-radius); rotate: -2.5deg; }

/* 03 — the pair */
.pair { position: absolute; inset: 14% 0 auto; display: flex; justify-content: center; }
.pair-coin { width: 50%; aspect-ratio: 1; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--card-white); display: grid; place-items: center; rotate: -6deg; }
.pair-coin .totem { width: 60%; }
.pair-coin.unknown { margin-left: -9%; border-style: dashed; background: var(--card); font: 800 clamp(96px, 14vw, 150px)/1 var(--hero-display-family); rotate: 8deg; }
.plan { position: absolute; left: 50%; bottom: 13%; translate: -50% 0; rotate: -3deg; height: 34px; padding: 0 14px; }

/* 04 — the hello */
.hello { position: absolute; left: 0; right: 0; top: 30%; height: 27%; padding: 0 5%; display: flex; align-items: center; gap: 5%; background: var(--card-white); border: 1.5px solid var(--ink); border-radius: 999px; rotate: -4deg; }
.play { flex: none; width: 17%; aspect-ratio: 1; border-radius: 50%; background: var(--solar-yellow); border: 1.5px solid var(--ink); display: grid; place-items: center; }
.play svg { width: 46%; margin-left: 6%; }
.wave { flex: 1; height: 56%; display: flex; align-items: center; justify-content: space-between; }
.wave i { width: 3.4%; min-width: 4px; border-radius: 99px; background: var(--ink); }
.hello-from { position: absolute; left: 12%; top: 64%; display: flex; align-items: center; gap: 12px; rotate: 3deg; }
.hello-from .totem { width: clamp(64px, 9vw, 96px); }

/* 05 — two phones, one colour */
.handset { position: absolute; top: 8%; width: 40%; aspect-ratio: 9 / 18.5; padding: 1.5%; background: var(--ink); border-radius: 13% / 6.4%; }
.handset span { display: grid; place-items: center; width: 100%; height: 100%; background: var(--solar-yellow); border-radius: 10.5% / 5%; }
.handset .totem { width: 66%; animation: pulse 1.4s ease-in-out infinite; }

/* ---- Who you meet ------------------------------------------------------------------ */

.kinds { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: clamp(32px, 4vw, 56px); }
.kind { position: relative; overflow: hidden; min-height: 250px; padding: 24px 24px 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--card-radius); }
.kind h3, .kind p { position: relative; z-index: 1; max-width: 13em; }
.kind h3 { margin-top: 10px; }
.kind .totem { position: absolute; right: -22px; bottom: -30px; width: 124px; rotate: -10deg; }
.kind:nth-child(2n) .totem { rotate: 12deg; }

@media (min-width: 620px) { .kinds { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) {
  .kinds { grid-template-columns: repeat(4, 1fr); }
  .kind { min-height: 350px; }
  .kind:nth-child(odd) { rotate: -1.2deg; }
  .kind:nth-child(even) { rotate: 1deg; translate: 0 14px; }
}

/* ---- Totem wall ---------------------------------------------------------------------- */

.wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 2vw, 26px); }
.wall .totem { width: 100%; }
.wall .totem:nth-child(3n + 2) { translate: 0 14%; }

/* ---- Safety --------------------------------------------------------------------------- */

.safe { display: flex; flex-direction: column; gap: clamp(22px, 2.6vw, 36px); padding: clamp(26px, 5vw, 72px); background: var(--card-white); border: 1.5px solid var(--ink); border-radius: clamp(28px, 3.4vw, 44px); }
.safe ol { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0 clamp(28px, 4vw, 64px); }
.safe li { display: flex; gap: 16px; padding: 18px 0; border-top: 1.5px solid var(--line); }
.safe li .mono { flex: none; padding-top: 5px; color: var(--ink-muted); }
.group { display: grid; grid-template-columns: 1fr; gap: 20px clamp(24px, 4vw, 56px); align-items: center; padding: clamp(22px, 3vw, 40px); background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--card-radius); }
.group-art { display: flex; padding-left: 14px; }
.group-art span { width: clamp(84px, 9vw, 124px); aspect-ratio: 1; margin-left: -14px; border-radius: 50%; background: var(--card-white); border: 2px solid var(--ink); display: grid; place-items: center; }
.group-art span:nth-child(2) { translate: 0 -10px; }
.group-art .totem { width: 62%; }
.group-copy { display: flex; flex-direction: column; gap: 10px; max-width: 36em; }
@media (min-width: 900px) { .group { grid-template-columns: auto 1fr; } }
.promise { max-width: 21em; padding: 18px 22px; background: var(--solar-yellow); border: 1.5px solid var(--ink); border-radius: var(--sticker-radius); align-self: flex-start; }
.safe .muted { max-width: 40em; }
@media (min-width: 900px) { .safe ol { grid-template-columns: repeat(2, 1fr); } }

/* ---- Join + footer --------------------------------------------------------------------- */

.join .wrap { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(18px, 2vw, 28px); }
.join .w-lead { max-width: 28em; }
.join .btn { margin-top: 8px; }
.join .totem { position: absolute; z-index: 0; }
.join .wrap > :not(.totem) { position: relative; z-index: 1; }
.join-a { right: -4%; top: -22%; width: clamp(150px, 26vw, 360px); rotate: 14deg; }
.join-b { right: 20%; bottom: -46%; width: clamp(110px, 17vw, 230px); rotate: -12deg; }
@media (max-width: 899px) { .join-a { top: auto; bottom: -34%; right: -12%; } .join-b { display: none; } .join { padding-bottom: 150px; } }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-block: 30px; border-top: 1.5px solid var(--ink); max-width: none; }

/* ---- Motion ------------------------------------------------------------------------------ */

@keyframes bob { 50% { translate: 0 -8px; } }
@keyframes pulse { 50% { scale: 1.07; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
