/* ============================================================
   GOPHY.org — website layer
   Built on the GOPHY design-system tokens (colors / type / spacing).
   "Stickers and stationery on a warm paper desk."
   ============================================================ */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: hsl(var(--accent)); color: hsl(var(--foreground)); }

h1, h2, h3, h4 { font-family: var(--font-hand); font-weight: 400; line-height: 1.05; margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---- Display type scale (website) ---- */
.d-hero    { font-family: var(--font-hand); font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 0.98; letter-spacing: .01em; }
.d-1       { font-family: var(--font-hand); font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.02; }
.d-2       { font-family: var(--font-hand); font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.04; }
.d-3       { font-family: var(--font-hand); font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.08; }
.quote     { font-family: var(--font-hand); font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.1; color: hsl(var(--primary)); }

.eyebrow {
  font-family: var(--font-body); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: .78rem; color: hsl(var(--primary));
}
.lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.55; color: hsl(0 0% 28%); }
.muted { color: hsl(var(--muted-foreground)); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---- Layout ---- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.measure { max-width: 46rem; }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.center { text-align: center; }
.center .measure { margin-inline: auto; }
.stack > * + * { margin-top: 1.1rem; }
.stack-lg > * + * { margin-top: 1.8rem; }

/* ---- Buttons (mirrors DS Button: pill, hand font, coral) ---- */
.gp-btn {
  font-family: var(--font-hand); font-size: 1.3rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.6rem; min-height: 50px; border: none; border-radius: var(--radius-full);
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  cursor: pointer; text-decoration: none; transition: var(--transition-smooth);
  box-shadow: 0 4px 14px hsl(var(--primary) / .28);
}
.gp-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px hsl(var(--primary) / .34); }
.gp-btn:active { transform: scale(.97); }
.gp-btn--lg { font-size: 1.55rem; padding: .95rem 2.1rem; min-height: 60px; }
.gp-btn--sm { font-size: 1.1rem; padding: .5rem 1.1rem; min-height: 42px; }
.gp-btn--secondary {
  background: hsl(var(--background)); color: hsl(var(--foreground));
  box-shadow: inset 0 0 0 2px hsl(var(--border)); }
.gp-btn--secondary:hover { box-shadow: inset 0 0 0 2px hsl(var(--primary) / .5); }
.gp-btn--accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); box-shadow: 0 4px 14px hsl(var(--accent) / .35); }
.gp-btn--ghost { background: transparent; color: hsl(var(--foreground)); box-shadow: none; }
.gp-btn--ghost:hover { background: hsl(var(--secondary)); transform: none; box-shadow: none; }
.gp-btn--block { width: 100%; }

/* ---- Cards ---- */
.card {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border-radius: var(--radius-xl); box-shadow: var(--shadow-soft);
  padding: clamp(1.4rem, 2.5vw, 2rem); transition: var(--transition-smooth);
}
.card--hover:hover { box-shadow: var(--shadow-medium); transform: translateY(-3px); }
.card--pad-lg { padding: clamp(1.8rem, 3.5vw, 2.8rem); }
.card--peach { background: hsl(var(--secondary)); }
.card--cream { background: hsl(35 28% 96%); }

/* ---- Grid helpers ---- */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.8rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--narrow-img { grid-template-columns: 1.15fr .85fr; }
@media (max-width: 860px) { .split, .split--narrow-img { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---- Pills / chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-body); font-weight: 600;
  font-size: .9rem; padding: .35rem .8rem; border-radius: var(--radius-full);
  background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground));
}
.tag-row { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---- Number / step badges ---- */
.step-num {
  font-family: var(--font-hand); font-size: 1.9rem; width: 56px; height: 56px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full);
  background: hsl(var(--primary)); color: #fff;
}

/* ---- Sticker positioning helpers ---- */
.sticker { background-size: contain; background-repeat: no-repeat; background-position: center; pointer-events: none; }
.float { animation: gp-float 6s ease-in-out infinite; }
@keyframes gp-float { 0%,100% { transform: translateY(0) rotate(var(--rot,0deg)); } 50% { transform: translateY(-12px) rotate(var(--rot,0deg)); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: hsl(var(--background) / .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--border) / .7);
}
.nav { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--font-hand); font-size: 1.9rem; color: hsl(var(--foreground)); letter-spacing: .02em; }
.brand .coin { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nav-links a { font-family: var(--font-body); font-weight: 600; font-size: .98rem; text-decoration: none; color: hsl(0 0% 22%); padding: .3rem 0; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; border-radius: 3px; background: hsl(var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease-smooth); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: hsl(var(--foreground)); }
.nav-cta { margin-left: .4rem; }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border: none; background: transparent; cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.burger span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: hsl(var(--foreground)); transition: var(--transition-fast); }

@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-cta.desktop-only { display: none; }
  .burger { display: flex; }
}

/* ---- Mobile menu overlay ---- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: hsl(var(--background));
  display: flex; flex-direction: column; padding: 1.25rem;
  transform: translateY(-100%); transition: transform .32s var(--ease-smooth); visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu .mm-top { display: flex; align-items: center; min-height: 68px; }
.mobile-menu .mm-close { margin-left: auto; width: 46px; height: 46px; border: none; background: transparent; font-size: 2rem; cursor: pointer; font-family: var(--font-hand); color: hsl(var(--foreground)); }
.mobile-menu nav { display: flex; flex-direction: column; gap: .3rem; margin-top: 1rem; }
.mobile-menu nav a { font-family: var(--font-hand); font-size: 2rem; text-decoration: none; color: hsl(var(--foreground)); padding: .5rem 0; border-bottom: 1px solid hsl(var(--border)); }
.mobile-menu nav a[aria-current="page"] { color: hsl(var(--primary)); }
.mobile-menu .mm-cta { margin-top: auto; padding-top: 1.5rem; }

/* ---- Footer ---- */
.site-footer { background: hsl(35 28% 96%); border-top: 1px solid hsl(var(--border)); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 2.5rem; padding-block: clamp(2.5rem, 5vw, 4rem); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-family: var(--font-hand); font-size: 1.35rem; margin-bottom: .7rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { text-decoration: none; color: hsl(0 0% 30%); font-size: .96rem; }
.footer-col a:hover { color: hsl(var(--primary)); }
.footer-brand .coin { width: 34px; height: 34px; }
.newsletter input { width: 100%; padding: .7rem .9rem; border-radius: var(--radius-md); border: 1px solid hsl(var(--border)); font-family: var(--font-body); font-size: .95rem; margin-bottom: .6rem; background: #fff; }
.newsletter input:focus { outline: 2px solid hsl(var(--primary) / .5); outline-offset: 1px; }
.footer-sub { border-top: 1px solid hsl(var(--border)); padding-block: 1.3rem; font-size: .9rem; color: hsl(var(--muted-foreground)); display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; justify-content: space-between; }
.footer-social { display: flex; gap: .8rem; }
.footer-social a { width: 40px; height: 40px; border-radius: var(--radius-full); background: #fff; box-shadow: var(--shadow-soft); display: inline-flex; align-items: center; justify-content: center; color: hsl(var(--foreground)); }
.footer-social a:hover { background: hsl(var(--accent)); }

/* ---- Cookie banner ---- */
.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 70; max-width: 560px; margin-inline: auto;
  background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-medium);
  padding: 1.1rem 1.25rem; display: flex; gap: 1rem; align-items: center;
  transform: translateY(160%); transition: transform .4s var(--ease-smooth);
}
.cookie.show { transform: translateY(0); }
.cookie p { font-size: .92rem; margin: 0; flex: 1; }

/* ---- Reveal-on-scroll (progressive enhancement: hidden ONLY when html.js-anim) ---- */
.reveal { transition: opacity .6s var(--ease-smooth), transform .6s var(--ease-smooth); }
html.js-anim .reveal { opacity: 0; transform: translateY(22px); }
html.js-anim .reveal.in { opacity: 1; transform: none; }
html.reveal-off .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Tweak-driven overrides ---- */
.no-float .float { animation: none !important; }
.no-reveal .reveal { opacity: 1 !important; transform: none !important; }

/* ---- Accordion (FAQ) ---- */
.acc { border-bottom: 1px solid hsl(var(--border)); }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; padding: 1.25rem .25rem; font-family: var(--font-hand); font-size: clamp(1.25rem,2.2vw,1.5rem); }
.acc summary::-webkit-details-marker { display: none; }
.acc .acc-ico { margin-left: auto; flex: none; width: 28px; height: 28px; transition: transform .25s var(--ease-smooth); color: hsl(var(--primary)); }
.acc[open] .acc-ico { transform: rotate(45deg); }
.acc .acc-body { padding: 0 .25rem 1.4rem; max-width: 52rem; color: hsl(0 0% 30%); }
.acc .acc-body a { color: hsl(var(--primary)); }

/* ---- Misc ---- */
.divider-dot { color: hsl(var(--muted-foreground)); }
.pill-stat { font-family: var(--font-hand); }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .5; z-index: -1; }
.fact-table { width: 100%; border-collapse: collapse; }
.fact-table td { padding: .85rem 0; border-bottom: 1px solid hsl(var(--border)); vertical-align: top; }
.fact-table td:first-child { font-family: var(--font-hand); font-size: 1.2rem; width: 40%; padding-right: 1rem; }
/* ---- Phone frame (app mockups) ---- */
.phone {
  width: 320px; height: 660px; flex: none; position: relative;
  background: #1c1c1e; border-radius: 46px; padding: 12px;
  box-shadow: 0 30px 60px -18px rgba(0,0,0,.35), 0 0 0 2px rgba(0,0,0,.06);
}
.phone__screen { width: 100%; height: 100%; border-radius: 35px; overflow: hidden; background: hsl(var(--background)); position: relative; }
.phone__notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 26px; background: #1c1c1e; border-radius: 0 0 16px 16px; z-index: 5; }
.phone__app { width: 100%; height: 100%; }
.phone--sm { width: 268px; height: 552px; border-radius: 40px; }
@media (max-width: 520px) { .phone { width: 290px; height: 600px; } }

.input, textarea.input { width: 100%; padding: .8rem 1rem; border-radius: var(--radius-md); border: 1px solid hsl(var(--border)); font-family: var(--font-body); font-size: 1rem; background: #fff; }
.input:focus, textarea.input:focus { outline: 2px solid hsl(var(--primary) / .5); outline-offset: 1px; }
label.field { display: block; }
label.field > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
