/* ============================================================
   BTC MEDUSA — design system
   Dark, refined. Brand DNA: blue-steel → purple gradient.
   Restraint: gradient is a signature, not a default.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,300..800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  /* type */
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* dark palette (default) */
  --bg:        #0a0810;
  --bg-2:      #0e0c16;
  --surface:   rgba(255,255,255,0.024);
  --surface-2: rgba(255,255,255,0.04);
  --border:    rgba(168,180,216,0.10);
  --border-2:  rgba(168,180,216,0.18);
  --text:      rgba(248,247,252,0.94);
  --text-dim:  rgba(232,230,244,0.58);
  --text-faint:rgba(232,230,244,0.36);

  /* brand */
  --blue:      #8BA3C7;
  --blue-deep: #6B7FA3;
  --purple:    #9E7BB5;
  --purple-deep:#6B4A80;
  --grad: linear-gradient(118deg, #9FB6D8 0%, #8E80B8 48%, #7B5290 100%);
  --grad-soft: linear-gradient(118deg, rgba(159,182,216,0.16), rgba(123,82,144,0.16));

  /* semantic (calm, desaturated — no neon) */
  --safe:  oklch(0.80 0.085 168);   /* private / no-leak */
  --warn:  oklch(0.81 0.10 72);     /* disclosed */
  --danger:oklch(0.70 0.13 25);     /* exposed */

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 60px -30px rgba(0,0,0,0.8);
}

body.light {
  --bg:        #f2f0ec;
  --bg-2:      #e9e6e0;
  --surface:   rgba(40,30,55,0.028);
  --surface-2: rgba(40,30,55,0.05);
  --border:    rgba(70,55,95,0.14);
  --border-2:  rgba(70,55,95,0.22);
  --text:      #1a1626;
  --text-dim:  rgba(26,22,38,0.62);
  --text-faint:rgba(26,22,38,0.40);
  --blue-deep: #5a6f96;
  --purple:    #7d5a96;
  --purple-deep:#5B3D6B;
  --grad: linear-gradient(118deg, #5a6f96 0%, #6f5590 50%, #5B3D6B 100%);
  --grad-soft: linear-gradient(118deg, rgba(90,111,150,0.12), rgba(91,61,107,0.12));
  --shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 24px 50px -30px rgba(60,40,80,0.3);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

/* ambient backdrop — subtle, single source of color */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 78% -8%, rgba(123,82,144,0.18), transparent 60%),
    radial-gradient(55% 45% at 8% 4%, rgba(107,127,163,0.14), transparent 60%);
  pointer-events: none;
}
body.light::before {
  background:
    radial-gradient(60% 50% at 80% -10%, rgba(123,82,144,0.10), transparent 60%),
    radial-gradient(55% 45% at 6% 2%, rgba(90,111,150,0.10), transparent 60%);
}
/* faint grid */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(168,180,216,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168,180,216,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(100% 80% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(100% 80% at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}
body.light::after { background-image:
    linear-gradient(to right, rgba(70,55,95,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(70,55,95,0.05) 1px, transparent 1px); }

/* ===== shared ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 880px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-faint);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--border-2);
}
.eyebrow.grad { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; color: var(--text); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--text-dim); line-height: 1.7; }

a { color: inherit; }

/* section rhythm */
section { position: relative; }
.section-pad { padding: clamp(80px, 11vh, 140px) 0; }
.kicker-row { display: flex; flex-direction: column; gap: 18px; margin-bottom: 44px; }
.kicker-row h2 { font-size: clamp(30px, 4.2vw, 50px); max-width: 16ch; }
.kicker-row .lede { max-width: 56ch; }

/* hairline divider */
.hr { height: 1px; background: var(--border); border: 0; }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 13px 22px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.18s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #15101d; background: linear-gradient(118deg, #b9c8e0, #b29ccb 55%, #a585bd);
  box-shadow: 0 10px 30px -12px rgba(123,82,144,0.7);
}
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(123,82,144,0.85); transform: translateY(-1px); }
.btn-ghost { color: var(--text); background: var(--surface-2); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--blue); background: var(--surface); }
.btn svg { width: 17px; height: 17px; }

/* ===== nav ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px clamp(20px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
nav.scrolled { border-bottom-color: var(--border); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(123,82,144,0.4)); }
.brand b { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.brand span { color: var(--text-dim); font-weight: 600; }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: 14px; color: var(--text-dim); text-decoration: none;
  transition: color 0.25s; font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); cursor: pointer; transition: all 0.25s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-sun { display: none; }
body.light .icon-sun { display: block; }
body.light .icon-moon { display: none; }
.hamburger { display: none; }

/* ===== cards ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--border-2); }

/* chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 7px 13px; border-radius: 100px;
  border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text-dim);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--safe); }

/* ===== reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* mono small label */
.mono-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-faint); }

/* responsive nav */
@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: center;
    gap: 30px; background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(20px); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 99;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 22px; }
  .hamburger { display: grid; }
  .nav-cta-desktop { display: none; }
}
