/* ScanDex site — shared styles
   Aesthetic: dark "display case" with brand red + foil gold accents,
   card-edge geometry, editorial type. */

:root {
  --red: #B71C1C;
  --red-deep: #7f1212;
  --purple: #6B2A56;
  --gold: #FFD54F;
  --gold-soft: #f5c542;
  --green: #2E7D32;
  --blue: #1565C0;

  --ink: #14110f;
  --panel: #1d1916;
  --panel-2: #262019;
  --line: rgba(255, 213, 79, 0.18);
  --text: #f4ede2;
  --muted: #b8ac99;

  --maxw: 920px;
  --radius: 14px;
  --card-aspect: 0.716; /* 63/88 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Spline Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(107,42,86,0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(183,28,28,0.30), transparent 55%),
    var(--ink);
  background-attachment: fixed;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 1;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; position: relative; z-index: 2; }

/* ---- Header ---- */
header.site {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(20,17,15,0.92), rgba(20,17,15,0.6));
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .logo {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900; font-size: 1.5rem; letter-spacing: -0.5px;
}
.brand .logo .scan { color: var(--gold); }
.brand .logo .dex { color: var(--text); }
.nav a.link { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 0.95rem; }
.nav a.link:hover { color: var(--gold); }
@media (max-width: 560px) { .nav a.link { margin-left: 14px; font-size: 0.85rem; } .brand .logo { font-size: 1.25rem; } }

/* ---- Hero ---- */
.hero { padding: 76px 0 54px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 16px; margin-bottom: 22px;
}
h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900; line-height: 1.02; letter-spacing: -1.5px;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin-bottom: 18px;
}
h1 .foil {
  background: linear-gradient(100deg, var(--gold) 0%, #fff6d8 30%, var(--gold-soft) 50%, #fff 70%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lede { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 auto 30px; }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 12px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: linear-gradient(180deg, var(--red), var(--red-deep)); color: #fff; box-shadow: 0 8px 24px rgba(183,28,28,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(183,28,28,0.45); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---- Feature cards ---- */
.section { padding: 40px 0; }
.section-title { font-family: "Fraunces", serif; font-weight: 800; font-size: 1.9rem; letter-spacing: -0.5px; margin-bottom: 6px; }
.section-sub { color: var(--muted); margin-bottom: 26px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden;
}
.feature::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
.feature .emoji { font-size: 1.7rem; }
.feature h3 { font-size: 1.1rem; margin: 10px 0 6px; }
.feature p { color: var(--muted); font-size: 0.94rem; }

/* ---- Legal / content pages ---- */
.doc { padding: 50px 0 70px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); text-align: left; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 34px; }
.doc h2 {
  font-family: "Fraunces", serif; font-weight: 700; font-size: 1.4rem;
  margin: 34px 0 10px; color: var(--gold-soft); letter-spacing: -0.3px;
}
.doc h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.doc p, .doc li { color: #e7ddcd; margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 14px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--gold); }
.doc strong { color: #fff; }
.callout {
  background: rgba(107,42,86,0.25); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 18px; margin: 18px 0;
}

/* ---- Footer ---- */
footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 50px; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.foot a { color: var(--muted); text-decoration: none; margin-right: 18px; font-size: 0.9rem; }
.foot a:hover { color: var(--gold); }
.foot .copy { color: #6f6555; font-size: 0.85rem; }

/* fade-in on load */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .7s ease forwards; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: none; } }
