/* =====================================================================
   BEYMANN CAPITAL — Colors & Type Tokens
   =====================================================================
   A disciplined, dark-first system. Gold is the only brand accent.
   Backgrounds stay deep and matte; gold carries attention.
   ===================================================================== */

/* ---------- WEBFONTS ---------- */

@font-face {
  font-family: "RH Phonic";
  src: url("assets3/fonts/RHPhonic-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RH Phonic";
  src: url("assets3/fonts/RHPhonic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RH Phonic";
  src: url("assets3/fonts/RHPhonic-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RH Phonic";
  src: url("assets3/fonts/RHPhonic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Material Symbols Rounded";
  src: url("assets3/fonts/material-symbols-rounded.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: block;
}
.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("assets3/fonts/MartinaPlantijn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- TOKENS ---------- */

:root {
  /* ===== COLOR — RAW PALETTE ===== */

  /* Ink — deep near-blacks, slightly warm to match the logo's paper */
  --ink-0:   #000000;   /* pure black, logo ground */
  --ink-1:   #0A0A0B;   /* page */
  --ink-2:   #111113;   /* surface */
  --ink-3:   #17171A;   /* raised surface / card */
  --ink-4:   #1E1E22;   /* hover surface */
  --ink-5:   #2A2A2F;   /* divider strong / tile */
  --ink-6:   #3A3A40;   /* muted border */

  /* Bone — off-whites pulled slightly warm to sit against the gold */
  --bone-0:  #FFFFFF;
  --bone-1:  #F6F2E8;   /* light-mode page */
  --bone-2:  #EBE4D2;   /* light-mode surface */
  --bone-3:  #D9CFB4;   /* muted */

  /* Gold — the ONLY accent. Pulled from the logo (approx #C4AC78). */
  --gold-50:  #F5EED9;
  --gold-100: #E8DAA8;
  --gold-200: #D8C389;
  --gold-300: #C9B078;   /* hover */
  --gold-400: #C4AC78;   /* BRAND PRIMARY — matches the wordmark */
  --gold-500: #B89B5E;   /* pressed */
  --gold-600: #94794A;   /* deep */
  --gold-700: #6E5A37;

  /* Signal — used sparingly. No candy; muted, institutional. */
  --green-400: #6EA07A;  /* profit / in-target */
  --green-300: #8FBF9B;
  --red-400:   #C2635A;  /* loss / at-risk */
  --red-300:   #D68178;
  --amber-400: #D6A65A;  /* warning (distinct from brand gold) */

  /* ===== SEMANTIC — DARK (default) ===== */
  --bg:         var(--ink-1);
  --bg-elev:    var(--ink-2);
  --bg-card:    var(--ink-3);
  --bg-hover:   var(--ink-4);
  --bg-tile:    var(--ink-5);

  --fg:         #F2EDE1;        /* primary text — bone on ink */
  --fg-muted:   #A9A497;        /* secondary */
  --fg-dim:     #6F6B62;        /* tertiary / meta */
  --fg-inverse: var(--ink-0);   /* text on gold */

  --border:          rgba(246, 242, 232, 0.08);
  --border-strong:   rgba(246, 242, 232, 0.16);
  --border-gold:     var(--gold-400);

  --accent:        var(--gold-400);
  --accent-hover:  var(--gold-300);
  --accent-press:  var(--gold-500);
  --accent-soft:   rgba(196, 172, 120, 0.12);
  --accent-ring:   rgba(196, 172, 120, 0.35);

  --positive: var(--green-400);
  --negative: var(--red-400);
  --warning:  var(--amber-400);

  /* ===== TYPE ===== */
  --font-display: "RH Phonic", "Neue Haas Grotesk Display", "Helvetica Neue", Arial, sans-serif;
  --font-sans:    "RH Phonic", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-serif:   "Martina Plantijn", "Tiempos Text", "Times New Roman", Georgia, serif;
  --font-mono:    "JetBrains Mono", "Berkeley Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale (8pt-ish, with a couple display jumps) */
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-15: 0.9375rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-56: 3.5rem;
  --fs-72: 4.5rem;
  --fs-96: 6rem;
  --fs-128: 8rem;

  --lh-tight:  1.05;
  --lh-snug:   1.2;
  --lh-normal: 1.45;
  --lh-loose:  1.6;

  --tracking-tight:    -0.02em;
  --tracking-normal:   0;
  --tracking-wide:     0.04em;
  --tracking-caps:     0.14em;  /* for the "CAPITAL" small-caps treatment */

  /* ===== LAYOUT ===== */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  --radius-xs: 2px;   /* tags */
  --radius-sm: 4px;   /* inputs, rows */
  --radius-md: 8px;   /* cards */
  --radius-lg: 12px;  /* panels */
  --radius-xl: 20px;  /* hero cards */
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
  --shadow-gold: 0 0 0 1px rgba(196, 172, 120, 0.45), 0 8px 32px rgba(196, 172, 120, 0.14);

  --ring: 0 0 0 2px var(--accent-ring);

  --ease-out:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
}

/* Light mode surface token set — used sparingly (marketing hero sections) */
:root.theme-light,
.theme-light {
  --bg:       var(--bone-1);
  --bg-elev:  var(--bone-2);
  --bg-card:  var(--bone-0);
  --bg-hover: var(--bone-2);
  --bg-tile:  var(--bone-3);

  --fg:         var(--ink-1);
  --fg-muted:   #4E4A42;
  --fg-dim:     #7A766C;
  --fg-inverse: var(--bone-0);

  --border:        rgba(10, 10, 11, 0.08);
  --border-strong: rgba(10, 10, 11, 0.16);
}

/* =====================================================================
   SEMANTIC TYPE CLASSES
   ===================================================================== */

.t-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 7vw, var(--fs-128));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}
.t-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 4.5vw, var(--fs-72));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}
.t-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-40);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}
.t-h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-24);
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
}
.t-h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-18);
  line-height: var(--lh-snug);
}
.t-eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-12);
  line-height: 1;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--gold-400);
}
.t-serif-display {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 4vw, var(--fs-56));
  line-height: var(--lh-snug);
  letter-spacing: 0;
}
.t-capital {
  /* The signature "CAPITAL" treatment — spaced small caps in serif */
  font-family: var(--font-serif);
  font-size: var(--fs-18);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.t-p     { font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-16); line-height: var(--lh-normal); color: var(--fg); }
.t-p-lg  { font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-18); line-height: var(--lh-normal); color: var(--fg); }
.t-p-sm  { font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-14); line-height: var(--lh-normal); color: var(--fg-muted); }
.t-label { font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-13); line-height: 1.3; letter-spacing: 0.01em; }
.t-meta  { font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-12); line-height: 1.3; color: var(--fg-dim); letter-spacing: 0.02em; }
.t-num   { font-family: var(--font-display); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.t-mono  { font-family: var(--font-mono); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }

/* Base element styling for raw markup (inherits tokens) */
.prose h1 { @extend .t-h1; }

/* Desktop default: hide the mobile-only Problem subtitle */
.problem-sub-mobile { display: none; }

/* "From the Journal" — manual horizontal carousel.
   2.5 cards visible on desktop, scaled down on smaller screens.
   The half-visible third card signals there's more to scroll to. */
.blog-scroller {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/old Edge */
}
.blog-scroller::-webkit-scrollbar { display: none; }
.blog-item {
  flex: 0 0 calc((100% - 64px) / 2.5);  /* 2.5 cards + 2 visible gaps (32px each) */
  scroll-snap-align: start;
  min-width: 0;
  display: flex;
}
@media (max-width: 1100px) {
  .blog-item { flex-basis: calc((100% - 32px) / 1.8); }
}
@media (max-width: 720px) {
  .blog-item { flex-basis: calc((100% - 24px) / 1.15); }
}

/* X feed — a single row of four tweet embeds. The layout only reads well at
   four-across, so the whole section is hidden when the viewport is too narrow
   to fit four cards (~1380px) rather than reflowing to fewer columns. */
.x-section { padding: 120px 48px 60px; }
.x-grid {
  display: grid;
  grid-template-columns: repeat(4, 300px);
  gap: 20px;
  align-items: start;
  justify-content: center;
}
.x-grid > div { width: 300px; display: flex; justify-content: center; }
@media (max-width: 1380px) {
  .x-section { display: none; }
}

/* Hero — desktop puts the live waitlist counter to the right of the CTA buttons;
   mobile stacks it below them. */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
@media (max-width: 1100px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 56px;
  }
}

/* Reveal-on-scroll: opacity + slight rise; triggered by IntersectionObserver.
   Per-element overrides via --reveal-y (rise distance) and --reveal-dur (duration). */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-y, 18px));
  transition: opacity var(--reveal-dur, 800ms) cubic-bezier(0.22, 0.61, 0.36, 1),
              transform var(--reveal-dur, 800ms) cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

/* "The Fix" — text centered, phone below it on all viewports, flush to the
   section bottom (no padding-bottom). */
.fix-section {
  padding: 160px 48px 0;
  position: relative;
  background: #000;
}
.fix-text {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.fix-scroll-stage {
  position: relative;
  margin-top: 0;
  display: flex;
  justify-content: center;
}
.fix-pinned {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 64px);
  width: 100%;
}
.fix-side-label {
  display: none;
  flex: 0 0 auto;
  opacity: 0;
  transform: translateY(12px);
  font-family: 'RH Phonic', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -.025em;
  text-transform: uppercase;
  color: var(--fg);
  pointer-events: none;
  transition: opacity .15s linear, transform .15s linear;
}
.fix-side-label--right { text-align: left; }
@media (min-width: 1101px) {
  .fix-side-label { display: block; }
}
.fix-app-video {
  width: auto;
  height: clamp(380px, 70vh, 720px);
  max-width: 92vw;
  display: block;
}
.fix-captions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.fix-captions span {
  font-family: 'RH Phonic', sans-serif;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -.01em;
  color: var(--fg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}
.fix-captions span.is-visible {
  opacity: 1;
  transform: none;
}
@media (max-width: 1100px) {
  .fix-section { padding: 96px 24px 0; }
  .fix-scroll-stage { margin-top: 0; }
  .fix-app-video { height: clamp(320px, 60vh, 560px); }
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Show the short "Join" label only on mobile (default: hidden) */
.nav-cta-short { display: none; }

/* Scarcity banner: smooth slide-down + fade-in from the top */
.scarcity-banner-wrap {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 500ms var(--ease-out), opacity 500ms var(--ease-out);
}
.scarcity-banner-wrap.is-visible {
  max-height: 240px;
  opacity: 1;
}
.scarcity-banner-wrap .scarcity-banner {
  transform: translateY(-100%);
  transition: transform 500ms var(--ease-out);
}
.scarcity-banner-wrap.is-visible .scarcity-banner {
  transform: translateY(0);
}

/* Footer social links */
.footer-social ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-social a {
  color: var(--fg-dim);
  display: inline-flex;
  transition: color .2s ease;
}
.footer-social a:hover {
  color: var(--gold-400);
}

/* Mobile: stack the problem section's two-column layout */
@media (max-width: 768px) {
  /* Hide nav section links and "Pre-launch" badge — keep logo + "Join waitlist" CTA */
  .nav-links { display: none !important; }
  .nav-prelaunch { display: none !important; }
  /* Push the "Join waitlist" CTA to the right edge of the nav */
  .nav-flex-spacer { flex: 1 !important; }
  /* Shrink horizontal padding so the CTA doesn't get clipped */
  .site-nav { padding: 14px 16px !important; gap: 12px !important; }
  .scarcity-banner { padding: 10px 16px !important; }
  /* Swap "Join waitlist" → "Join" to save space */
  .nav-cta-full { display: none !important; }
  .nav-cta-short { display: inline !important; }
  /* Hide the Beymann logo inside the "Reserve your spot" card */
  .waitlist-card-logo { display: none !important; }
  /* Drop the flex spacer so "Founding member pass" aligns left */
  .waitlist-card-spacer { display: none !important; }
  /* Stack the waitlist email field above the submit button */
  .waitlist-form { flex-direction: column !important; min-height: 0 !important; }
  .waitlist-form input { padding: 16px 20px !important; border-bottom: 1px solid var(--border) !important; }
  .waitlist-form button { padding: 16px 26px !important; }
  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 24px !important;
    margin-bottom: 48px !important;
  }
  .problem-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  /* "Founding members" section — stack form above "What you get" */
  .waitlist-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  /* Footer — hide "Product" link column, keep only the brand block */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .footer-grid > div:not(:first-child) { display: none !important; }
  .footer-grid > div.footer-social { display: block !important; }
  /* Move "The house has a name..." to the bottom of the Problem section on mobile */
  #problem .section-header > div:nth-child(2) { display: none !important; }
  .problem-sub-mobile { display: block; }

  /* "Why Beymann" comparison table — stack each row as a card */
  .why-header { display: none !important; }
  .why-table {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }
  .why-row {
    display: block !important;
    min-height: 0 !important;
    margin-top: 20px !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ink-2);
  }
  .why-header + .why-row { margin-top: 0 !important; }
  .why-cell {
    border-left: none !important;
    flex-wrap: wrap !important;
    padding: 14px 20px !important;
  }
  .why-cell.why-label {
    color: var(--gold-400) !important;
    font-size: 12px !important;
    background: var(--ink-3);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px !important;
  }
  .why-cell.why-us { border-top: 1px solid var(--border); }
  .why-cell.why-them::before,
  .why-cell.why-us::before {
    content: attr(data-label);
    flex: 1 0 100%;
    font-family: 'RH Phonic', sans-serif;
    font-weight: 500;
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--fg-dim);
    margin-bottom: 2px;
  }
  .why-cell.why-us::before {
    color: var(--gold-400);
    background-image: url('assets3/shield-mark.png');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 14px 14px;
    padding-left: 20px;
  }
}
