/* Tubular marketing site: one shared stylesheet. No external fonts or assets. */

:root {
  --bg: #fff7fb;
  --bg-2: #f3ecff;
  --surface: #ffffff;
  --text: #2a1745;
  --muted: #5d4a78;
  --border: #ead9f5;
  --accent: #c2185b;        /* candy pink, white text passes AA */
  --accent-text: #ffffff;
  --link: #8a1fbf;
  --focus: #1e6fff;
  --shadow: 0 10px 30px rgba(90, 30, 140, 0.12);

  /* liquid colors (match the game's slot meanings) */
  --red: #ff4f6d;
  --orange: #ff9a3c;
  --yellow: #ffd23f;
  --green: #3fd17a;
  --blue: #3fa9ff;
  --purple: #a45cff;
  --pink: #ff6fc1;
  --teal: #2fd6c9;

  --radius: 22px;
  /* Rounded system fonts first (Safari/Apple: ui-rounded). Headings fall back to Arial Rounded where available. */
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #170d2b;
    --bg-2: #22123f;
    --surface: #2a1a4a;
    --text: #f7f0ff;
    --muted: #cdbde6;
    --border: #3f2a66;
    --accent: #ff5fa2;
    --accent-text: #22051a;
    --link: #ffa6dd;
    --focus: #7fb4ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, color-mix(in srgb, var(--pink) 22%, transparent), transparent 40%),
    radial-gradient(circle at 100% 10%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 35%),
    var(--bg);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 12px; z-index: 10; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3, .brand, .pitch, .btn { font-family: var(--font-display); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 850; }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0 0 1em; }

/* ---------- header ---------- */

.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 1.4rem; color: var(--text); text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: var(--shadow); }

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--bg-2); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; cursor: pointer; text-decoration: none;
  border: 3px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); }

/* App Store CTA: styled stand-in until Apple's official badge replaces it. */
.btn-store { background: #111; color: #fff; }
.btn-store[aria-disabled="true"] {
  background: var(--surface); color: var(--muted); border: 3px dashed var(--border);
  cursor: default; box-shadow: none;
}
.btn-store[aria-disabled="true"]:hover { transform: none; }
@media (prefers-color-scheme: dark) { .btn-store:not([aria-disabled="true"]) { background: #fff; color: #111; } }

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

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

.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; gap: 36px; align-items: center; }
@media (min-width: 820px) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; } }

.hero-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.pitch { font-size: clamp(1.2rem, 3.5vw, 1.5rem); font-weight: 800; color: var(--accent); margin-bottom: 0.6em; }
@media (prefers-color-scheme: light) { .pitch { color: #a3134d; } }
.lede { color: var(--muted); max-width: 36em; margin-bottom: 1.6em; }

/* ---------- liquid tube motif (pure CSS) ---------- */

.tubes {
  display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 3vw, 22px);
  padding: 28px 16px 22px; border-radius: 32px;
  background: linear-gradient(160deg, var(--bg-2), var(--surface));
  box-shadow: var(--shadow);
}
.tube {
  width: clamp(36px, 10vw, 58px); height: clamp(150px, 40vw, 230px);
  border: 4px solid color-mix(in srgb, var(--text) 25%, transparent);
  border-top: none; border-radius: 0 0 999px 999px;
  display: flex; flex-direction: column-reverse; overflow: hidden;
  padding: 0 3px 3px; position: relative;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.tube::after {
  content: ""; position: absolute; top: 8px; left: 7px; width: 5px; bottom: 18px;
  border-radius: 4px; background: rgba(255, 255, 255, 0.45);
}
.tube span { display: block; height: 22%; flex: none; }
.tube span:first-child { border-radius: 0 0 999px 999px; }
.tube.tall { height: clamp(180px, 50vw, 280px); }
.tube.tall span { height: 18%; }
.tube.lifted { transform: translateY(-14px) rotate(-8deg); }
.c-red { background: var(--red); } .c-orange { background: var(--orange); }
.c-yellow { background: var(--yellow); } .c-green { background: var(--green); }
.c-blue { background: var(--blue); } .c-purple { background: var(--purple); }
.c-pink { background: var(--pink); } .c-teal { background: var(--teal); }

@media (prefers-reduced-motion: no-preference) {
  .tube.lifted { animation: bob 3s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-20px) rotate(-10deg); } }
}

/* wavy liquid divider */
.drip {
  height: 18px;
  background:
    radial-gradient(circle at 12px 0, var(--bg-2) 12px, transparent 13px) 0 0 / 24px 18px repeat-x;
}

/* ---------- features ---------- */

.features { background: var(--bg-2); padding: 56px 0; }
.features h2 { text-align: center; }
.section-lede { text-align: center; color: var(--muted); max-width: 40em; margin: 0 auto 2em; }

.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.feature {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.feature::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--chip, var(--pink));
}
.feature p { color: var(--muted); margin: 0; }
.feature .dot {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.3rem; margin-bottom: 10px; background: color-mix(in srgb, var(--chip, var(--pink)) 25%, transparent);
}

/* ---------- bottom CTA ---------- */

.cta-band { padding: 56px 0; text-align: center; }
.cta-band .cta-row { justify-content: center; }
.fine { font-size: 0.9rem; color: var(--muted); }

/* ---------- content pages ---------- */

main { flex: 1; }
.page { padding: 24px 0 56px; }
.page .wrap { max-width: 820px; }
.card {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: clamp(18px, 4vw, 32px); box-shadow: var(--shadow); overflow-wrap: anywhere;
}
.policy-pending {
  background: color-mix(in srgb, var(--yellow) 30%, var(--surface));
  border-radius: 14px; padding: 12px 16px; font-weight: 700;
}
/* Hide the "being finalized" note automatically once Termly has filled the embed. */
.card:has([name="termly-embed"] > *) .policy-pending { display: none; }

.faq details {
  border: 2px solid var(--border); border-radius: 16px; padding: 4px 16px; margin-bottom: 12px;
  background: var(--surface);
}
.faq summary { cursor: pointer; font-weight: 800; padding: 10px 0; }
.faq details[open] summary { color: var(--accent); }
@media (prefers-color-scheme: light) { .faq details[open] summary { color: #a3134d; } }

/* ---------- footer ---------- */

.site-footer {
  background: var(--bg-2); border-top: 2px solid var(--border);
  padding: 28px 0 32px; font-size: 0.95rem; color: var(--muted);
}
.site-footer ul { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: var(--text); font-weight: 700; }
.site-footer p { margin: 0 0 4px; }
