/* =============================================================
   O NOVO DINHEIRO — Design Tokens
   Escola de Autocustódia de Bitcoin
   =============================================================
   Two living implementations exist in the codebase:
   1. Bio link (Cinzel + Cormorant Garamond + Inter, gold #D4A24C)
   2. Ebook landing (Playfair Display + Inter + JetBrains Mono, gold #C6A96B)

   This file consolidates BOTH. The brand guide (id-visual-padrao-dourado.md)
   specifies Playfair + Inter and gold #C6A96B as canonical — that is the
   default here. Bio variants are exposed as alt tokens.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Inter:wght@400;500;600;700&family=Cinzel:wght@500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,500;1,600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ----------- BASE COLORS (canonical, per brand guide) ------- */
  --bg:                #050D20;   /* Fundo principal */
  --bg-elev:           #0A1428;   /* Cards, surfaces above bg */
  --bg-deep:           #02030A;   /* Edge / vignette bottom */

  --ink:               #FFFFFF;   /* Texto primário */
  --ink-soft:          #B8B2A6;   /* Body, comfortable reading */
  --ink-mute:          #A0A8BB;   /* Texto secundário (per guide) */
  --ink-faint:         rgba(160,168,184,0.55);

  --gold:              #C6A96B;   /* Dourado principal */
  --gold-deep:         #8A6A2E;   /* Dourado profundo */
  --gold-bright:       #F4C97A;   /* Highlight / shimmer (used in bio) */

  /* ---------- ALT GOLD (bio link uses warmer #D4A24C) ---------- */
  --gold-alt:          #D4A24C;

  /* ---------- LINES & DIVIDERS -------------------------------- */
  --rule:              rgba(198, 169, 107, 0.15);
  --rule-strong:       rgba(198, 169, 107, 0.45);

  /* ---------- SEMANTIC FOREGROUND ----------------------------- */
  --fg-1:              var(--ink);        /* primary text */
  --fg-2:              var(--ink-soft);   /* body / lede */
  --fg-3:              var(--ink-mute);   /* support / captions */
  --fg-accent:         var(--gold);       /* highlights, value */
  --fg-on-light:       var(--bg);         /* dark text on white CTA */

  /* ---------- SURFACES ---------------------------------------- */
  --surface-base:      var(--bg);
  --surface-card:      var(--bg-elev);
  --surface-cta:       var(--ink);        /* white-on-dark CTA */
  --surface-cta-ink:   var(--bg);

  /* ---------- TYPOGRAPHY FAMILIES ----------------------------- */
  --serif:             "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --serif-display:     "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:              "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:              "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --classical:         "Cinzel", "Playfair Display", serif; /* For all-caps logo treatment */

  /* ---------- TYPE SCALE -------------------------------------- */
  --fs-display:        clamp(44px, 6vw, 78px);   /* Hero serif headline */
  --fs-h1:             clamp(36px, 4vw, 56px);
  --fs-h2:             clamp(30px, 3.4vw, 46px);
  --fs-h3:             28px;
  --fs-lede:           22px;        /* Hero subtitle, oversized */
  --fs-body-lg:        19px;        /* Generous prose */
  --fs-body:           17px;
  --fs-body-sm:        15px;
  --fs-meta:           14px;        /* Captions */
  --fs-eyebrow:        11px;        /* Mono uppercase */
  --fs-tiny:           10px;

  /* ---------- TYPE STYLE TOKENS (semantic, ready to use) ------ */
  /* Use as: h1 { font: var(--type-h1); } */

  --type-display-weight:   400;        /* Playfair italic regular looks best */
  --type-h-letterspace:    -0.02em;
  --type-eyebrow-letterspace: 0.18em;
  --type-button-letterspace: 0.04em;

  /* ---------- SPACING ----------------------------------------- */
  --space-1:           4px;
  --space-2:           8px;
  --space-3:           12px;
  --space-4:           16px;
  --space-5:           24px;
  --space-6:           32px;
  --space-7:           48px;
  --space-8:           64px;
  --space-9:           96px;
  --space-10:          140px;

  /* ---------- LAYOUT ------------------------------------------ */
  --maxw:              1200px;
  --readw:             680px;     /* Comfortable single-column reading */

  /* ---------- RADII ------------------------------------------- */
  --r-xs:              3px;
  --r-sm:              4px;
  --r-md:              10px;
  --r-lg:              14px;
  --r-xl:              18px;
  --r-pill:            999px;

  /* ---------- SHADOWS ----------------------------------------- */
  --shadow-card:       0 1px 0 rgba(255,255,255,0.04) inset,
                       0 18px 40px -20px rgba(0,0,0,0.7);
  --shadow-card-hover: 0 0 0 1px var(--rule-strong) inset,
                       0 22px 48px -22px rgba(0,0,0,0.85),
                       0 0 30px -10px rgba(198,169,107,0.25);
  --shadow-book:       25px 30px 60px -20px color-mix(in oklab, var(--ink) 25%, transparent),
                       0 24px 48px rgba(0,0,0,0.65);

  /* ---------- BORDERS ----------------------------------------- */
  --border-card:       1px solid var(--rule);
  --border-card-hot:   1px solid var(--rule-strong);

  /* ---------- MOTION ------------------------------------------ */
  --ease-out:          cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-snap:         cubic-bezier(0.4, 0, 0.2, 1);
  --dur-quick:         0.15s;
  --dur-base:          0.3s;
  --dur-slow:          0.7s;
}

/* =============================================================
   SEMANTIC ELEMENT DEFAULTS — apply to typed elements directly
   ============================================================= */

html, body {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--bg); }

h1, .h1, .serif-display {
  font-family: var(--serif);
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: var(--type-h-letterspace);
  margin: 0 0 28px;
  text-wrap: balance;
}
h1 em, .h1 em, .serif-display em { font-style: italic; color: var(--gold); }

h2, .h2, .sec-title {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: var(--type-h-letterspace);
  margin: 0;
  text-wrap: balance;
}

h3, .h3 {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 12px;
}

.lede, .hero-lede {
  font-family: var(--serif);
  font-size: var(--fs-lede);
  font-weight: 400;
  line-height: 1.45;
  color: var(--fg-2);
}

p { text-wrap: pretty; margin: 0 0 1em; }

.eyebrow, .kicker {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--type-eyebrow-letterspace);
  text-transform: uppercase;
  color: var(--gold);
}

.meta, .caption {
  font-family: var(--mono);
  font-size: var(--fs-meta);
  color: var(--fg-3);
  letter-spacing: 0.04em;
}

code, .mono {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  padding: 2px 8px;
  border-radius: var(--r-xs);
}

a { color: inherit; }

/* =============================================================
   STANDARD COMPONENT PRIMITIVES
   ============================================================= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  background: var(--surface-cta);
  color: var(--surface-cta-ink);
  border: none;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-quick) var(--ease-snap);
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background var(--dur-quick), color var(--dur-quick);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.divider-gold {
  height: 1px;
  background: var(--rule);
  border: none;
  margin: var(--space-6) 0;
}

.gold-rule {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
}
