/* ============================================================
   Bet Journal — core tokens, base, paper, nav, hero, phone
   ============================================================ */

:root {
  /* paper + ink */
  --paper:      #fffcf2;
  --paper-2:    #f5f3ec;
  --card:       #fcfbf7;
  --card-edge:  #e9e3d4;
  --ink:        #221d17;
  --ink-soft:   #6f665a;
  --ink-faint:  #9a9081;
  --line:       #e3dccb;
  --rule:       #cdd8d6;   /* notebook ruled line (bluish) */

  /* brand */
  --teal:       #15a3a1;
  --teal-deep:  #0f7d7b;
  --teal-dark:  #0a5a58;
  --teal-wash:  #dcece9;
  --brick:      #c4452f;   /* loss / negative */
  --brick-wash: #f1ddd5;

  /* accent (tweakable) defaults to teal */
  --accent:      var(--teal);
  --accent-deep: var(--teal-deep);
  --accent-dark: var(--teal-dark);
  --accent-wash: var(--teal-wash);

  /* dark surface */
  --dark:       #181410;
  --dark-2:     #221c16;
  --dark-edge:  #34291f;

  /* type */
  --display: 'Bricolage Grotesque', 'Schibsted Grotesk', sans-serif;
  --sans:    'Schibsted Grotesk', system-ui, sans-serif;
  --mono:    'Space Mono', ui-monospace, monospace;
  --hand:    'Instrument Serif', serif;
  --hand-style: italic;

  --shadow-sm: 0 1px 2px rgba(34,29,23,.06), 0 2px 6px rgba(34,29,23,.05);
  --shadow:    0 4px 10px rgba(34,29,23,.07), 0 18px 40px -18px rgba(34,29,23,.22);
  --shadow-lg: 0 12px 30px rgba(34,29,23,.12), 0 40px 80px -30px rgba(34,29,23,.35);

  --maxw: 1200px;
  --gut: clamp(16px, 4.5vw, 64px);
}

/* accent (hand) font tweak hook */
:root[data-hand="script"] { --hand: 'Shadows Into Light', cursive; --hand-style: normal; }
:root[data-hand="caveat"] { --hand: 'Caveat', cursive; --hand-style: normal; }

/* display-font tweak hook */
:root[data-font="grotesk"] { --display: 'Schibsted Grotesk', sans-serif; }
:root[data-font="space"]   { --display: 'Space Grotesk', 'Bricolage Grotesque', sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-anchor: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* paper grain overlay (toggleable) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .1;
  mix-blend-mode: multiply;
  background-image: url("assets/grain.svg");
  background-size: 220px 220px;
  transition: opacity .4s ease;
}
:root[data-grain="off"] body::before { opacity: 0; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { position: relative; z-index: 2; padding-block: clamp(40px, 6vw, 88px); }
@media (max-width: 620px) {
  .section { padding-block: clamp(32px, 8vw, 48px); }
}

/* ---- handwritten annotation ---- */
.hand {
  font-family: var(--hand);
  font-style: var(--hand-style, normal);
  color: var(--accent-deep);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.05;
  transform: rotate(-5deg);
  display: inline-block;
}
.ink-accent, .scribble-note { font-style: var(--hand-style, normal); }
.scribble { stroke: var(--accent-deep); fill: none; stroke-width: 3; stroke-linecap: round; }

/* ---- eyebrow ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block; }

/* ---- buttons ---- */
.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -4px color-mix(in oklab, var(--accent) 60%, transparent); }
.btn-accent:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* app store style button */
.store-btn {
  display: inline-flex; align-items: center; gap: 11px;
  background: #fff; color: var(--ink);
  padding: 11px 18px 11px 16px; border-radius: 13px;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store-btn .lab { display: flex; flex-direction: column; line-height: 1.1; }
.store-btn .lab small { font-size: 10.5px; opacity: .8; letter-spacing: .02em; white-space: nowrap; }
.store-btn .lab b { font-size: 16.5px; font-weight: 700; font-family: var(--display); letter-spacing: -.01em; }
.store-btn svg { width: 22px; height: 22px; flex: none; }
.store-btn.web { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.stores.on-dark .store-btn.web { color: #fff; border-color: #4b4034; }

.stores { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 620px) {
  .store-btn { padding: 9px 14px 9px 12px; gap: 9px; border-radius: 11px; }
  .store-btn svg { width: 18px; height: 18px; }
  .store-btn .lab small { font-size: 9px; }
  .store-btn .lab b { font-size: 14px; }
  .stores { gap: 10px; }
}
@media (max-width: 400px) {
  .stores:not(.stores-inline) { flex-direction: column; align-items: stretch; width: 100%; }
  .stores:not(.stores-inline) .store-btn { justify-content: center; width: 100%; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
}
.nav.scrolled {
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px -12px rgba(34,29,23,.4);
}
body.has-nav { padding-top: 76px; }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 12px; }
.nav-logo { flex-shrink: 0; min-width: 0; }
.nav-logo img { height: 32px; width: auto; max-width: 140px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink-soft); transition: color .15s ease; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0; background:var(--accent); transition:width .2s ease; }
.nav-links a:hover::after { width:100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-end { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }
.foot-locale { font-size: 0.92rem; color: var(--muted); }
.foot-locale a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.foot-locale a:hover { color: var(--ink); }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  flex-shrink: 0;
  width: 40px; height: 40px; padding: 9px; margin: 0;
  background: color-mix(in oklab, var(--paper) 80%, var(--line));
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--ink);
  border-radius: 1px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-in {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }
  .nav-logo { grid-column: 1; grid-row: 1; }
  .nav-end {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
    margin-left: 0;
  }
  .nav-links {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gut) 20px;
    background: color-mix(in oklab, var(--paper) 96%, transparent);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -12px rgba(34,29,23,.2);
    z-index: 2;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 16px; }
  .nav-cta { gap: 0; }
  .nav-cta .btn-ghost { display: none; }
  .nav-cta .btn-accent {
    padding: 8px 11px;
    font-size: 12px;
    border-radius: 10px;
    box-shadow: 0 4px 12px -4px color-mix(in oklab, var(--accent) 55%, transparent);
  }
  .nav-toggle {
    display: flex;
    order: -1;
  }
}

/* ============================================================
   HERO  (shared shell; variants via :root[data-hero])
   ============================================================ */
.hero { position: relative; z-index: 2; overflow: clip; padding-block: clamp(12px, 2.5vw, 30px) clamp(48px, 7vw, 96px); }
.hero-variant { display: none; }
:root[data-hero="a"] #hero-a,
:root[data-hero="b"] #hero-b,
:root[data-hero="c"] #hero-c { display: block; }
/* default if attr missing */
:root:not([data-hero]) #hero-a { display: block; }

.hero h1 { font-size: clamp(44px, 7.2vw, 92px); letter-spacing: -.035em; }
.hero h1 .ink-accent { color: var(--accent-deep); font-family: var(--hand); font-weight: 400; letter-spacing: 0; }
.hero .sub { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink-soft); max-width: 30ch; margin-top: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; align-items: center; }
.hero-meta { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.hero-meta .m b { font-family: var(--mono); font-size: 22px; color: var(--ink); display:block; letter-spacing:-.02em; }
.hero-meta .m span { font-size: 13px; color: var(--ink-soft); }

/* parallax decorative slips */
.slip {
  position: absolute; z-index: 0; pointer-events: none;
  background: var(--card); border: 1px solid var(--card-edge);
  box-shadow: var(--shadow); border-radius: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  padding: 10px 12px; line-height: 1.5;
}
.slip .win { color: var(--accent-deep); font-weight: 700; }
.slip .loss { color: var(--brick); font-weight: 700; }

/* ---- Hero A: Ledger (two col) ---- */
#hero-a .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: clamp(20px, 4vw, 52px); }
#hero-a .phone-slot { position: relative; display: grid; place-items: center; min-height: 560px; }
@media (max-width: 880px) { #hero-a .grid { grid-template-columns: 1fr; } #hero-a .phone-slot { min-height: 520px; } }

/* ---- Hero B: Notebook spread (centered) ---- */
#hero-b .center { text-align: center; padding-block: clamp(48px, 7vw, 80px); display: flex; flex-direction: column; align-items: center; }
#hero-b h1 { max-width: 14ch; }
#hero-b .sub { margin-inline: auto; max-width: 46ch; text-align: center; }
#hero-b .hero-cta { justify-content: center; }
#hero-b .phone-slot { position: relative; margin-top: 54px; display: grid; place-items: center; min-height: 600px; width: 100%; }
#hero-b .notebook {
  position: relative; background: var(--card);
  border: 1px solid var(--card-edge); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 46px; max-width: 720px; width: 100%;
  background-image: repeating-linear-gradient(var(--card) 0 39px, var(--rule) 39px 40px);
}
#hero-b .notebook::before { /* red margin line */
  content:""; position:absolute; left:54px; top:0; bottom:0; width:2px; background: color-mix(in oklab, var(--brick) 55%, transparent); opacity:.5;
}

/* ---- Hero C: Bold receipt ---- */
#hero-c .grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; padding-block: clamp(40px, 6vw, 80px); }
#hero-c h1 { font-size: clamp(52px, 9vw, 116px); line-height: .92; }
#hero-c .phone-slot { position: relative; display: grid; place-items: center; min-height: 600px; }
@media (max-width: 880px) { #hero-c .grid { grid-template-columns: 1fr; } }

/* tape + stamp helpers */
.tape {
  position: absolute; width: 110px; height: 30px;
  background: color-mix(in oklab, var(--accent) 22%, #fff);
  border: 1px dashed color-mix(in oklab, var(--accent-deep) 40%, transparent);
  opacity: .85; box-shadow: var(--shadow-sm);
  backdrop-filter: blur(1px);
}
.stamp {
  font-family: var(--display); font-weight: 800; letter-spacing: .04em;
  color: var(--accent-deep);
  border: 3px solid var(--accent-deep); border-radius: 8px;
  padding: 4px 12px; font-size: 22px; text-transform: uppercase;
  transform: rotate(-11deg); opacity: .82;
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--accent-deep) 25%, transparent);
}
.stamp.loss { color: var(--brick); border-color: var(--brick); box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--brick) 25%, transparent); }
