/* Shared styles for chadpickard.app (served from GitHub Pages). */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #0c1324;
  --muted: #5b667a;
  --line: rgba(12, 19, 36, .09);
  --accent: #2563eb;
  --accent-2: #0ea5e9;
  --accent-soft: rgba(37, 99, 235, .09);
  --ink: #050a18;
  --shadow: 0 1px 2px rgba(12, 19, 36, .05), 0 8px 24px rgba(12, 19, 36, .06);
  --shadow-lg: 0 2px 6px rgba(12, 19, 36, .06), 0 20px 44px rgba(12, 19, 36, .12);
  --radius: 20px;
  --max: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060a15;
    --surface: #0d1426;
    --surface-2: #131c33;
    --text: #e8edf6;
    --muted: #97a2b7;
    --line: rgba(255, 255, 255, .08);
    --accent: #6b9bff;
    --accent-2: #38bdf8;
    --accent-soft: rgba(107, 155, 255, .13);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 20px 44px rgba(0, 0, 0, .45);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { white-space: nowrap; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
@media (max-width: 420px) { .nav a { padding: 8px 8px; font-size: 14px; } .brand { gap: 8px; } .brand img { width: 30px; height: 30px; } .brand span { font-size: 16px; } }

.topbar--dark { position: absolute; left: 0; right: 0; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar--dark .brand { color: #fff; }
.topbar--dark .nav a { color: rgba(233, 238, 251, .72); }
.topbar--dark .nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: #e9eefb;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(47, 107, 255, .48), transparent 62%),
    radial-gradient(520px 380px at 88% 38%, rgba(25, 195, 255, .16), transparent 64%),
    radial-gradient(520px 380px at 8% 70%, rgba(80, 70, 255, .14), transparent 64%),
    var(--ink);
  padding: 120px 0 88px;
  text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(107, 155, 255, .55), transparent);
}
.hero-logo {
  width: 112px; height: 112px; margin: 0 auto 28px;
  filter: drop-shadow(0 0 26px rgba(59, 123, 255, .55)) drop-shadow(0 0 60px rgba(34, 196, 255, .2));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
}
.hero .eyebrow {
  color: #b9d3ff; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
}
.hero h1 {
  margin: 20px auto 0; max-width: 16ch;
  font-size: clamp(2.3rem, 6.4vw, 4rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800;
  color: #fff;
}
.grad {
  background: linear-gradient(92deg, #9cc4ff 0%, #5b8dff 45%, #3ad0ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 22px auto 0; max-width: 34em; font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: rgba(233, 238, 251, .76); }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 40px auto 0; padding: 0; list-style: none; font-size: 15px; color: rgba(233, 238, 251, .8); }
.pills li { display: inline-flex; align-items: center; gap: 8px; }
.pills svg { width: 18px; height: 18px; color: #3ad0ff; flex: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -.005em;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: #fff; background: linear-gradient(180deg, #4b86ff, #2563eb); box-shadow: 0 8px 24px rgba(37, 99, 235, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.btn-ghost:hover { background: rgba(255, 255, 255, .13); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section + .section { padding-top: 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { margin: 10px 0 0; font-size: clamp(1.8rem, 4.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; }
.section-head p { margin: 14px 0 0; color: var(--muted); font-size: 1.06rem; }
@media (max-width: 600px) { .section { padding: 64px 0; } }

/* ---------- App cards ---------- */

.apps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 360px) { .apps { grid-template-columns: 1fr; } }

.app-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.app-top { display: flex; align-items: center; gap: 16px; }
.app-icon { width: 68px; height: 68px; border-radius: 22.5%; flex: none; box-shadow: 0 4px 14px rgba(12, 19, 36, .18), 0 0 0 .5px rgba(12, 19, 36, .1); }
.app-card h3 { margin: 0; font-size: 1.16rem; line-height: 1.25; letter-spacing: -.015em; }
.app-cat { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.app-desc { margin: 16px 0 20px; color: var(--muted); font-size: 15.5px; line-height: 1.55; flex: 1; }
.app-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600;
  transition: opacity .15s ease;
}
.store:hover { text-decoration: none; opacity: .86; }
.store svg { width: 14px; height: 14px; }
.more { font-size: 14.5px; font-weight: 600; }
.soon { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
.badge-new { position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }

/* ---------- Values ---------- */

.values { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.value { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.value-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.value-icon svg { width: 22px; height: 22px; }
.value h3 { margin: 18px 0 6px; font-size: 1.1rem; letter-spacing: -.01em; }
.value p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- FAQ and help (details) ---------- */

.stack { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stack > details + details { border-top: 1px solid var(--line); }
.stack summary, .prose summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; font-weight: 600; letter-spacing: -.005em;
}
.stack summary::-webkit-details-marker, .prose summary::-webkit-details-marker { display: none; }
.stack summary::after, .prose summary::after {
  content: ""; margin-left: auto; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.stack summary:hover { background: var(--accent-soft); }
.stack summary img { width: 40px; height: 40px; border-radius: 22.5%; flex: none; box-shadow: 0 0 0 .5px rgba(12, 19, 36, .12); }
.stack summary small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.detail-body { padding: 0 22px 22px; color: var(--text); }
.detail-body > :first-child { margin-top: 0; }
.detail-body p, .detail-body li { font-size: 16px; }
.detail-body .muted { color: var(--muted); }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; padding: 0; list-style: none; }
.link-row a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; background: var(--accent-soft); }
.link-row a:hover { text-decoration: none; filter: brightness(1.08); }
.data-note { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 15px !important; color: var(--muted); }
.data-note strong { color: var(--text); }
.faq-sub { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.help-title { margin: 48px 0 16px; font-size: 1.25rem; letter-spacing: -.015em; }

/* ---------- Contact ---------- */

.contact {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 28px; padding: 48px 28px; text-align: center; color: #e9eefb;
  background: radial-gradient(600px 300px at 50% 0%, rgba(47, 107, 255, .45), transparent 70%), var(--ink);
}
.contact h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.03em; color: #fff; }
.contact p { max-width: 32em; margin: 12px auto 26px; color: rgba(233, 238, 251, .76); }
.contact .addr { display: block; margin-top: 16px; font-size: 15px; color: rgba(233, 238, 251, .6); }

/* ---------- Footer ---------- */

.footer { padding: 40px 0 56px; color: var(--muted); font-size: 14.5px; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding-top: 28px; }
.footer .brand img { width: 28px; height: 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer nav a { color: var(--muted); }
.footer nav a:hover { color: var(--text); }
.fine { width: 100%; margin: 0; font-size: 13px; }

/* ---------- Document pages (privacy, terms, guides) ---------- */

.doc { max-width: 780px; padding-top: 48px; padding-bottom: 32px; }
.doc-head h1 { margin: 10px 0 8px; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.doc-head p { margin: 0; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }

.prose { margin-top: 32px; padding: 8px 28px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 600px) { .prose { padding: 4px 18px 20px; } }
.prose h2 { margin: 40px 0 8px; padding-top: 32px; border-top: 1px solid var(--line); font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; }
.prose h2:first-child, .prose .doc-nav + h2, .prose .rule + h2 { border-top: 0; padding-top: 12px; }
.prose h3 { margin: 26px 0 6px; font-size: 1.06rem; letter-spacing: -.01em; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.prose ul { padding-left: 1.3rem; }
.prose li { margin: 4px 0; }
.prose code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.prose .rule { display: none; }
.prose .muted { color: var(--muted); }
.prose details { border-bottom: 1px solid var(--line); }
.prose summary { padding: 14px 0; }
.prose details > :not(summary) { margin-top: 0; }
.prose details > p:last-child { padding-bottom: 12px; }

.doc-nav { margin: 20px 0 8px; }
.doc-nav strong { display: block; margin-bottom: 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc-nav ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.doc-nav a { display: inline-flex; height: 34px; align-items: center; padding: 0 13px; border-radius: 999px; background: var(--accent-soft); font-size: 14px; font-weight: 600; }
.doc-nav a:hover { text-decoration: none; filter: brightness(1.08); }

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
