/* ShapeForge — site styles.
   Tokens are the app's Soft Tactile theme (App/Sources/DesignSystem). Light is the
   default; dark follows the system through prefers-color-scheme, like the app. */

:root {
  --paper: #F6F1E7;
  --surface: #FFFCF6;
  --well: #EDE6D8;
  --ink: #2A2433;
  --ink-2: #5E5768;
  --ink-3: #6A6375; /* app value #7A7384, darkened here to pass WCAG AA (5.1:1 on paper) */
  --hair: rgba(42, 36, 51, 0.12);
  --accent: #5B54D6;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(91, 84, 214, 0.10);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 0 rgba(42, 36, 51, 0.06), 0 10px 28px rgba(42, 36, 51, 0.08);
  --shadow-lift: 0 18px 50px rgba(42, 36, 51, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --gutter: 20px;
  --max: 1120px;

  /* the 12 piece colors */
  --p1: #E5484D; --p2: #E76705; --p3: #F9BF1D; --p4: #86C23A;
  --p5: #23A066; --p6: #0FA0A0; --p7: #3AA6E6; --p8: #3355CC;
  --p9: #9062EB; --p10: #C24EC0; --p11: #F07AA2; --p12: #8A5A3C;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15131D;
    --surface: #201D2B;
    --well: #1B1925;
    --ink: #F4EFE6;
    --ink-2: #BDB6C6;
    --ink-3: #9D96A8;
    --hair: rgba(244, 239, 230, 0.12);
    --accent: #8F8AFF;
    --accent-ink: #15131D;
    --accent-soft: rgba(143, 138, 255, 0.14);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 0 rgba(0, 0, 0, 0.25), 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 12px; font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- nav ---------- */

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 900; font-size: 21px; letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--shadow); }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-block; padding: 10px 2px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 16px; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav-links { gap: 16px; } .nav-links .nav-wide { display: none; } }

/* ---------- type ---------- */

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; font-weight: 900; }
.h1 { font-size: clamp(38px, 5.4vw, 62px); }
.h2 { font-size: clamp(30px, 4.4vw, 46px); }
.h3 { font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; font-weight: 800; }
.label {
  display: inline-block; font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.lede { font-size: clamp(19px, 2.2vw, 22px); color: var(--ink-2); max-width: 36em; margin: 18px 0 0; }
p { margin: 0 0 1em; }

/* ---------- buttons / CTA ---------- */

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 18px; border-radius: 18px;
  background: var(--ink); color: var(--paper);
  font-weight: 800; font-size: 17px; line-height: 1.2; text-decoration: none;
  box-shadow: var(--shadow);
}
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store small { display: block; font-size: 12px; font-weight: 700; opacity: 0.75; letter-spacing: 0.02em; }
a.store:hover { transform: translateY(-1px); text-decoration: none; }
span.store { cursor: default; } /* "Coming soon" state: not a link yet */

.ghost {
  display: inline-flex; align-items: center; padding: 14px 20px; border-radius: 18px;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 17px;
  background: var(--surface); box-shadow: var(--shadow);
}
.ghost:hover { color: var(--accent); }

.trust {
  display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 26px 0 0;
  color: var(--ink-2); font-size: 16px; font-weight: 700;
}
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before {
  content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--p5);
}
.trust li:nth-child(2)::before { background: var(--p7); }
.trust li:nth-child(3)::before { background: var(--p3); }
.trust li:nth-child(4)::before { background: var(--p9); }

/* ---------- hero ---------- */

.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
  padding-top: 40px; padding-bottom: 72px;
}
.hero-shots { position: relative; min-height: 560px; }
.phone {
  border-radius: 34px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-lift); border: 6px solid var(--surface);
}
.hero-shots .phone { position: absolute; width: 48%; }
.hero-shots .phone:nth-child(1) { left: 2%; top: 60px; transform: rotate(-5deg); }
.hero-shots .phone:nth-child(2) { left: 28%; top: 0; z-index: 2; width: 50%; }
.hero-shots .phone:nth-child(3) { right: 0; top: 70px; transform: rotate(5deg); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .hero-shots { min-height: 0; aspect-ratio: 1 / 0.95; max-width: 520px; width: 100%; margin: 0 auto; }
}

/* ---------- confetti of pieces ---------- */

.pieces { display: flex; gap: 6px; margin-bottom: 22px; }
.pieces span { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15); }
.pieces span:nth-child(1) { background: var(--p1); }
.pieces span:nth-child(2) { background: var(--p2); }
.pieces span:nth-child(3) { background: var(--p3); }
.pieces span:nth-child(4) { background: var(--p4); }
.pieces span:nth-child(5) { background: var(--p5); }
.pieces span:nth-child(6) { background: var(--p6); }
.pieces span:nth-child(7) { background: var(--p7); }
.pieces span:nth-child(8) { background: var(--p8); }
.pieces span:nth-child(9) { background: var(--p9); }
.pieces span:nth-child(10) { background: var(--p10); }
.pieces span:nth-child(11) { background: var(--p11); }
.pieces span:nth-child(12) { background: var(--p12); }

/* ---------- what is / at a glance ---------- */

.kicker { margin: 0 0 12px; font-size: 18px; font-weight: 800; color: var(--accent); letter-spacing: 0.01em; }
.what { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.what .lede { max-width: none; }
.glance h2 { margin-bottom: 14px; }
.glance dl { margin: 0; display: grid; }
.glance dl div {
  display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 9px 0;
  border-top: 1px solid var(--hair); font-size: 16px;
}
.glance dl div:first-child { border-top: 0; }
.glance dt { color: var(--ink-3); font-weight: 700; }
.glance dd { margin: 0; font-weight: 800; }
@media (max-width: 900px) { .what { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .glance dl div { grid-template-columns: 7.2em 1fr; gap: 10px; font-size: 15px; padding: 8px 0; } }

/* ---------- sections ---------- */

.section { padding-top: 72px; padding-bottom: 72px; }
@media (max-width: 640px) { .section { padding-top: 48px; padding-bottom: 48px; } .hero { padding-bottom: 40px; } .pieces { margin-bottom: 16px; } }
.section-head { max-width: 760px; margin-bottom: 40px; }

.card {
  background: var(--surface); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow);
}
.card p { color: var(--ink-2); margin: 10px 0 0; font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps .num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  font-weight: 900; font-size: 20px; color: #fff; margin-bottom: 16px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.16);
}
.steps li:nth-child(1) .num { background: var(--p8); }
.steps li:nth-child(2) .num { background: var(--p5); }
.steps li:nth-child(3) .num { background: var(--p2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* worlds */

.worlds-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.worlds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
.worlds li {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center;
  background: var(--surface); border-radius: var(--radius-sm); padding: 10px 14px 10px 10px;
  box-shadow: var(--shadow);
}
.worlds .n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--t); color: #fff; font-weight: 900; font-size: 19px; /* large text: white passes 3:1 on every tint */
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.worlds b { display: block; font-weight: 900; font-size: 17px; line-height: 1.2; }
.worlds span.d { display: block; color: var(--ink-2); font-size: 15px; line-height: 1.3; }
.worlds-shot { position: sticky; top: 24px; }
.worlds-note { color: var(--ink-2); font-size: 16px; margin-top: 18px; }
@media (max-width: 900px) {
  .worlds-layout { grid-template-columns: 1fr; }
  .worlds-shot { position: static; max-width: 300px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .worlds { gap: 8px; }
  .worlds li { grid-template-columns: 34px 1fr; gap: 9px; padding: 8px 10px 8px 8px; }
  .worlds .n { width: 34px; height: 34px; border-radius: 10px; }
  .worlds b { font-size: 15px; }
  .worlds span.d { font-size: 13px; }
}
@media (max-width: 340px) { .worlds { grid-template-columns: 1fr; } }

/* world tints (Soft Tactile table, light / dark) */
.w1 { --t: #648662; } .w2 { --t: #1676B2; } .w3 { --t: #6B7A8C; } .w4 { --t: #BA4A2B; }
.w5 { --t: #36856E; } .w6 { --t: #B16603; } .w7 { --t: #6A7FA7; } .w8 { --t: #2389A1; }
.w9 { --t: #9E3F4A; } .w10 { --t: #8E6A28; } .w11 { --t: #7A7A40; } .w12 { --t: #A04F7A; }
.w13 { --t: #7A6DA9; } .w14 { --t: #C24500; } .w15 { --t: #B5636E; } .w16 { --t: #952A22; }
.w17 { --t: #875199; } .w18 { --t: #4E4560; } .w19 { --t: #3F437F; } .w20 { --t: #9B7711; }
@media (prefers-color-scheme: dark) {
  .worlds .n { color: #15131D; }
  .w1 { --t: #9CC49C; } .w2 { --t: #8EB2FD; } .w3 { --t: #9AA8BA; } .w4 { --t: #ED8970; }
  .w5 { --t: #8ED8C0; } .w6 { --t: #F0A855; } .w7 { --t: #B0C4F0; } .w8 { --t: #6CD4E8; }
  .w9 { --t: #CE7D88; } .w10 { --t: #C8A760; } .w11 { --t: #B0B878; } .w12 { --t: #CC9FC7; }
  .w13 { --t: #BAACE9; } .w14 { --t: #F1AF85; } .w15 { --t: #F59088; } .w16 { --t: #E34C23; }
  .w17 { --t: #C29DD8; } .w18 { --t: #E09A40; } .w19 { --t: #95A6EC; } .w20 { --t: #D0C888; }
}

/* gallery */

.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 28px;
  margin: 0; list-style: none;
}
.gallery li { scroll-snap-align: start; }
.gallery figure { margin: 0; }
.gallery .phone { border-radius: 28px; box-shadow: var(--shadow); }
.gallery figcaption { margin-top: 12px; font-size: 15px; color: var(--ink-2); font-weight: 700; }
@media (min-width: 1100px) {
  /* all six fit on one row: no hidden horizontal scroll for mouse users */
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; gap: 18px; padding: 8px 0 8px; }
  .gallery .phone { border-radius: 22px; border-width: 4px; }
  .gallery figcaption { font-size: 14px; }
}

/* features */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.features .dot {
  width: 30px; height: 30px; border-radius: 9px; margin-bottom: 14px; background: var(--c, var(--accent));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}
.features li:nth-child(1) .dot { --c: var(--p3); }
.features li:nth-child(2) .dot { --c: var(--p2); }
.features li:nth-child(3) .dot { --c: var(--p11); }
.features li:nth-child(4) .dot { --c: var(--p7); }
.features li:nth-child(5) .dot { --c: var(--p4); }
.features li:nth-child(6) .dot { --c: var(--p9); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* free panel */

.free {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: var(--surface); border-radius: 30px; padding: 44px; box-shadow: var(--shadow);
}
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 18px; }
.checks li::before {
  content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--p5); color: #fff; font-weight: 900; font-size: 16px; margin-top: 1px;
}
.checks span { color: var(--ink-2); display: block; font-size: 16px; }
@media (max-width: 820px) { .free { grid-template-columns: 1fr; padding: 28px 22px; } }

/* faq */

.faq { max-width: 820px; display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 0 22px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 30px 18px 0; position: relative;
  font-weight: 800; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 800; color: var(--accent);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); font-size: 17px; margin: 0 0 18px; }

/* closing panel */

.close {
  text-align: center; padding: 64px 24px; margin: 40px 0 72px; border-radius: 32px;
  background: var(--accent-soft);
}
.close .cta-row { justify-content: center; }
.close .pieces { justify-content: center; }

/* footer */

.footer {
  border-top: 1px solid var(--hair); padding-top: 28px; padding-bottom: 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  color: var(--ink-3); font-size: 15px;
}
.footer ul { display: flex; flex-wrap: wrap; gap: 0 20px; list-style: none; padding: 0; margin: -10px 0 0; }
.footer li a { display: inline-block; padding: 10px 0; }
.footer a { color: var(--ink-2); font-weight: 700; }

/* ---------- legal / support pages ---------- */

.page { max-width: 740px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.page .back {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-weight: 900; font-size: 18px; margin-bottom: 36px;
}
.page .back img { width: 30px; height: 30px; border-radius: 8px; }
.page h1 { font-size: clamp(36px, 6vw, 52px); }
.page h2 { font-size: 23px; margin: 38px 0 10px; letter-spacing: -0.01em; font-weight: 900; }
.page p, .page li { font-size: 17px; color: var(--ink-2); }
.page strong { color: var(--ink); }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 8px; }
.updated { color: var(--ink-3); font-size: 15px; margin-top: 10px; }
.page .lead {
  font-size: 19px; color: var(--ink); background: var(--surface); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); margin-top: 28px;
}
.page-foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--hair); color: var(--ink-3); font-size: 15px; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  a.store:hover { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  a.store, .ghost { transition: transform 0.15s ease, color 0.15s ease; }
}
