/* CoinVoila — site styles
   Theme lives in :root. Once the logo arrives we adjust these few vars
   and the whole site reskins. Keep colors here, not scattered in markup. */

:root {
  color-scheme: dark;

  /* Brand — pulled from the logo: navy-black ground, chrome, electric blue */
  --bg: #080b14;            /* deep navy-black, matches dark logo ground */
  --bg-elevated: #0e1322;
  --surface: #121829;
  --border: #20283c;
  --text: #cdd4df;          /* soft cool grey — easier on the eyes than pure white */
  --text-muted: #8b97ad;
  --accent: #36a7ff;        /* electric blue — the scan brackets / flare */
  --accent-hover: #5cb8ff;
  --accent-contrast: #07101f;
  --chrome: #c6cdd8;        /* brushed-silver, for subtle metallic accents */

  /* Glow behind the hero logo, echoing the lens flare */
  --hero-glow: radial-gradient(closest-side, rgba(54,167,255,0.22), rgba(54,167,255,0) 70%);

  /* Type */
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --maxw: 720px;
  --radius: 12px;
  --gap: 1.5rem;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: 30px; display: block; border-radius: 22.37%; }
.nav-links { display: flex; gap: 1.25rem; font-size: 0.92rem; }
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }

/* ---------- Splash: single full-viewport screen, no scroll ---------- */
.splash {
  min-height: 100vh;
  min-height: 100dvh;   /* dynamic vh — accounts for mobile browser chrome */
  display: flex;
  flex-direction: column;
}
.splash .hero {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: clamp(2.25rem, 7vh, 4rem) 1.25rem 1rem;
}
.splash .legal-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1.5rem 1.25rem;
  font-size: 0.85rem;
}
.splash .legal-links a { color: var(--text-muted); }
.splash .legal-links a:hover { color: var(--text); }

/* ---------- Hero (splash) ---------- */
.hero {
  text-align: center;
  padding: clamp(3rem, 10vw, 6rem) 0 clamp(2.5rem, 7vw, 4.5rem);
}
.hero .logo-wrap {
  position: relative;
  width: clamp(104px, 26vw, 150px);
  margin: 0 auto 2rem;
}
.hero .logo-wrap::before {       /* soft blue halo, echoes the logo's flare */
  content: "";
  position: absolute;
  inset: -45%;
  background: var(--hero-glow);
  z-index: 0;
}
.hero .logo-mark {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22.37%;          /* iOS squircle-ish */
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 6.5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.hero .tagline {
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: 42rem;          /* fits on one line on desktop */
  text-wrap: balance;        /* no orphan: wraps to even lines when it must */
  margin: 0 auto 2.25rem;
}

/* App Store button */
.cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-primary.is-disabled {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: default;
  pointer-events: none;
}
.btn svg { width: 20px; height: 20px; }

.hero .note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Feature strip (optional, simple) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 0 0 4rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.feature h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Content pages (privacy / terms / support) ---------- */
.content {
  padding: clamp(2.5rem, 6vw, 4rem) 0 4rem;
}
.content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}
.content .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 2.5rem;
}
.content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2.25rem 0 0.6rem;
}
.content h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
.content p, .content li { color: var(--text); }
.content ul { padding-left: 1.25rem; }
.content li { margin: 0.35rem 0; }
.content a { word-break: break-word; }

/* ---------- Display heading treatment (wordmark + page titles) ----------
   Brushed-chrome gradient fill so headings read like the metal in the logo.
   Falls back to solid --text where background-clip:text isn't supported. */
.hero h1,
.content h1 {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
.content h2,
.content h3,
.brand span {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));   /* lighter lift at smaller sizes */
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1,
  .content h1,
  .content h2,
  .content h3,
  .brand span {
    background: linear-gradient(177deg, #ffffff 0%, #eef2f8 34%, #c2cad7 66%, #aab4c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer .footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Splash device mockup (index only) ----------
   Pure CSS iPhone rising from the bottom edge, with a faux "current lot"
   screen so the splash shows the product, not just an empty phone. */
.splash { position: relative; overflow: hidden; }

.device-stage {
  flex: 1 1 0;                      /* take only leftover space... */
  min-height: 0;                    /* ...and allow shrinking below the phone's height, so it clips */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;          /* phone top sits just under the CTA */
  padding-top: clamp(0.5rem, 2.2vh, 1.6rem);
  overflow: hidden;                 /* clips the phone's base at the viewport bottom */
}
.device {
  position: relative;
  width: clamp(238px, 31vw, 296px);
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(155deg, #2b3447, #11151f 60%);
  border-radius: 46px;
  padding: 9px;
  transform: translateY(0);     /* base is clipped at the viewport bottom by the stage */
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 9px #0c1019,
    0 26px 64px rgba(0, 0, 0, 0.65),
    0 0 70px rgba(54, 167, 255, 0.14);
}
.device .screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(130% 70% at 50% 0%, #14203a 0%, var(--bg) 58%);
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.device .island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 14px;
  background: #05080f;
  border-radius: 999px;
  z-index: 4;
}
.device .statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.1rem 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text);
}
.device .app {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0.8rem 0;
}
.device .app-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.3rem 0 0.55rem;
}
.device .app-title {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.device .app-total {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(177deg, #ffffff, #aab4c4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.device .lot {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.device .lot li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}
.device .coin {
  font-size: 0.6rem;
  line-height: 1.25;
  color: var(--text);
}
.device .coin em {
  display: block;
  margin-top: 1px;
  font-style: normal;
  font-size: 0.55rem;
  color: var(--text-muted);
}
.device .bid {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.device .scanbar {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.5rem;
  border-radius: 10px;
}
.device .scanbar .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-contrast);
  opacity: 0.75;
}

/* Footer links pinned to the bottom, on a scrim that fades the phone's base into the ground */
.splash .legal-links {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 4.75rem 1.25rem 1.6rem;
  background: linear-gradient(to top,
    var(--bg) 0%,
    var(--bg) 62%,
    rgba(8, 11, 20, 0.7) 84%,
    rgba(8, 11, 20, 0) 100%);
}

/* On phones / short screens, drop the mockup and recenter — keeps the clean splash */
@media (max-width: 600px), (max-height: 600px) {
  .device-stage { display: none; }
  .splash .hero { flex: 1 1 auto; justify-content: center; }
  .splash .legal-links { position: static; padding: 1.5rem 1.25rem; background: none; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
}
