/* Cookie Trading LLC — brand tokens sampled from the logo */
:root {
  --ink: #14202b;
  --ink-2: #1a2836;
  --ink-3: #223244;
  --line-dark: rgba(243, 230, 207, 0.12);
  --cream: #f3e6cf;
  --cream-2: #efe2c9;
  --paper: #faf6ee;
  --gold: #c9a15a;
  --gold-2: #b3893f;
  --gold-soft: rgba(201, 161, 90, 0.14);
  --text: #16212c;
  --text-muted: #4d5966;
  --on-dark: #f3e6cf;
  --on-dark-muted: rgba(243, 230, 207, 0.7);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 24px; border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none; letter-spacing: 0.01em;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn--gold { background: var(--gold); color: var(--ink); box-shadow: 0 8px 24px -10px rgba(201,161,90,.6); }
.btn--gold:hover { background: #d6b06a; transform: translateY(-1px); }
.btn--ghost { border-color: rgba(243,230,207,.28); color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--sm { padding: 9px 18px; font-size: 14px; }

/* ---------- Eyebrows / heads ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--dark { color: var(--gold-2); }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; margin-top: 18px; color: var(--text); }
.section-head--light h2 { color: var(--on-dark); }
.section-sub { margin-top: 18px; color: var(--on-dark-muted); font-size: 18px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 32, 43, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line-dark); background: rgba(20, 32, 43, 0.92); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); }
.brand img { border-radius: 8px; }
.brand__name { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: 0.005em; }
.brand__name span { color: var(--gold); font-size: 13px; letter-spacing: 0.16em; margin-left: 4px; font-family: var(--sans); font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a:not(.btn) {
  color: var(--on-dark-muted); text-decoration: none; font-size: 15px; position: relative; transition: color .2s;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--on-dark); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }

.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 12px 10px; cursor: pointer; }
.nav__toggle span { display: block; height: 1.5px; background: var(--on-dark); margin: 6px 0; transition: transform .3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-menu { padding: 8px 28px 24px; border-top: 1px solid var(--line-dark); }
.mobile-menu a { display: block; padding: 14px 0; color: var(--on-dark); text-decoration: none; font-family: var(--serif); font-size: 22px; border-bottom: 1px solid var(--line-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background:
    radial-gradient(900px 500px at 78% 18%, rgba(201,161,90,.13), transparent 60%),
    radial-gradient(700px 600px at 0% 100%, rgba(34,50,68,.9), transparent 70%),
    var(--ink);
  padding: 96px 0 0;
}
.hero::before { /* fine grid texture */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(243,230,207,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,230,207,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero__ridges { position: absolute; left: 0; right: 0; bottom: 60px; width: 100%; height: 300px; pointer-events: none; z-index: 0; }
.ridge { stroke-width: 1.2; }
.ridge--1 { fill: rgba(201,161,90,.035); stroke: rgba(201,161,90,.28); }
.ridge--2 { fill: rgba(26,40,54,.7); stroke: rgba(201,161,90,.22); }
.ridge--3 { fill: var(--ink); stroke: rgba(201,161,90,.14); }

.hero__grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center;
  padding-bottom: 150px;
}
.hero h1 {
  font-size: clamp(46px, 7vw, 92px); line-height: 1.0; margin: 26px 0 28px; font-weight: 400; letter-spacing: -0.025em;
}
.hero h1 em { font-style: italic; color: var(--gold); font-weight: 400; }
.lede { font-size: 19px; line-height: 1.65; color: var(--on-dark-muted); max-width: 540px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero__cta--center { justify-content: center; }

/* Ledger card */
.ledger {
  position: relative;
  background: linear-gradient(180deg, rgba(34,50,68,.82), rgba(26,40,54,.82));
  border: 1px solid var(--line-dark); border-radius: 20px;
  padding: 26px 26px 0; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.6), inset 0 1px 0 rgba(243,230,207,.06);
  backdrop-filter: blur(6px);
}
.ledger__head { display: flex; align-items: center; gap: 10px; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 600; }
.ledger__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.ledger__tag { margin-left: auto; letter-spacing: .04em; text-transform: none; font-weight: 500; color: rgba(243,230,207,.45); }
.ledger__rows { list-style: none; margin: 22px 0 0; padding: 0; }
.ledger__rows li {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 14px;
  padding: 18px 0; border-top: 1px solid var(--line-dark);
}
.ledger__num { font-family: var(--serif); color: var(--gold); font-size: 15px; }
.ledger__rows strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--on-dark); }
.ledger__rows div span { display: block; font-size: 14px; color: var(--on-dark-muted); }
.chip {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(243,230,207,.2); color: var(--on-dark-muted);
}
.chip--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.chip--muted { opacity: .7; }
.chip-pair { display: inline-flex; gap: 6px; }
.ledger__spark { display: block; width: calc(100% + 52px); margin: 6px -26px 0; height: 76px; }
.ledger__spark path { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; }
.ledger__spark .area { fill: rgba(201,161,90,.12); stroke: none; }
.ledger__spark path:first-child { stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 2.4s .6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Ticker */
.ticker { position: relative; border-top: 1px solid var(--line-dark); background: rgba(20,32,43,.9); overflow: hidden; }
.ticker__track { display: flex; align-items: center; gap: 36px; width: max-content; padding: 20px 0; animation: ticker 38s linear infinite; }
.ticker span { font-family: var(--serif); font-size: 18px; color: var(--on-dark-muted); white-space: nowrap; }
.ticker i { width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold); display: inline-block; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Light sections ---------- */
.section--paper { background: var(--paper); }
.section--cream { background: var(--cream); }

.about { padding: 120px 0 40px; }
.about__grid { display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
.about__grid .eyebrow { margin-top: 12px; align-self: start; }
.statement { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.3; color: var(--text); letter-spacing: -0.01em; }
.body-lg { margin-top: 28px; font-size: 18.5px; color: var(--text-muted); max-width: 720px; }

.approach { padding: 90px 0 130px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid rgba(22,33,44,.14); }
.step { padding: 40px 36px 8px 0; position: relative; }
.step + .step { padding-left: 36px; border-left: 1px solid rgba(22,33,44,.14); }
.step__num { font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--gold-2); font-weight: 400; display: block; margin-bottom: 26px; }
.step h3 { font-size: 26px; color: var(--text); margin-bottom: 12px; }
.step p { color: var(--text-muted); }

/* ---------- Practices ---------- */
.practices { padding: 130px 0; background: var(--ink); color: var(--on-dark); position: relative; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  position: relative; padding: 38px 36px 40px; border-radius: 18px;
  background: linear-gradient(180deg, var(--ink-2), rgba(26,40,54,.6));
  border: 1px solid var(--line-dark);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px 200px at var(--mx, 80%) var(--my, 0%), rgba(201,161,90,.12), transparent 70%);
  opacity: 0; transition: opacity .4s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(201,161,90,.4); box-shadow: 0 30px 60px -35px rgba(0,0,0,.7); }
.card:hover::after { opacity: 1; }
.card__icon { width: 44px; height: 44px; padding: 9px; border-radius: 12px; background: var(--gold-soft); fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 26px; }
.card h3 { font-size: 26px; margin-bottom: 12px; color: var(--on-dark); }
.card p { color: var(--on-dark-muted); font-size: 16.5px; }
.card__kicker { font-size: 12.5px !important; letter-spacing: .18em; text-transform: uppercase; color: var(--gold) !important; font-weight: 600; margin-bottom: 10px; }

.card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  background: linear-gradient(120deg, rgba(201,161,90,.12), rgba(26,40,54,.7) 45%); border-color: rgba(201,161,90,.28); }
.stack { display: grid; gap: 10px; }
.stack__row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 12px;
  background: rgba(20,32,43,.7); border: 1px solid var(--line-dark); font-size: 15px; color: var(--on-dark);
}
.stack__row span { width: 104px; flex: none; }
.stack__row b { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), rgba(201,161,90,.15)); position: relative; overflow: hidden; }
.stack__row b::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); transform: translateX(-100%); animation: shimmer 3.2s infinite; }
.stack__row:nth-child(2) b::after { animation-delay: .4s; }
.stack__row:nth-child(3) b::after { animation-delay: .8s; }
.stack__row:nth-child(4) b::after { animation-delay: 1.2s; }
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }

/* ---------- Principles ---------- */
.principles { padding: 130px 0 120px; }
.principles__head h2 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04; margin-top: 18px; color: var(--text); font-weight: 400; letter-spacing: -0.02em; }
.principles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 72px; }
.principle__mark { display: block; width: 40px; height: 2px; background: var(--gold-2); margin-bottom: 26px; }
.principle h3 { font-size: 24px; color: var(--text); margin-bottom: 12px; }
.principle p { color: var(--text-muted); }
.pull { margin: 96px 0 0; padding: 44px 0 0; border-top: 1px solid rgba(22,33,44,.16); }
.pull p { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.45; color: var(--text); max-width: 900px; }

/* ---------- Contact ---------- */
.contact { position: relative; background: var(--ink); color: var(--on-dark); padding: 150px 0 130px; text-align: center; overflow: hidden; }
.contact__ridge { position: absolute; left: 0; right: 0; top: -1px; width: 100%; height: 120px; transform: scaleY(-1); }
.contact__ridge path { fill: var(--cream); }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact__logo { border-radius: 50%; margin-bottom: 34px; box-shadow: 0 0 0 8px rgba(201,161,90,.08); }
.contact h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.1; max-width: 820px; margin-bottom: 22px; font-weight: 400; }
.contact .lede { margin: 0 auto; }

/* ---------- Footer ---------- */
.footer { background: #0f1922; color: var(--on-dark-muted); padding: 56px 0 40px; font-size: 14.5px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 36px; border-bottom: 1px solid var(--line-dark); }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { border-radius: 7px; }
.footer__brand strong { display: block; font-family: var(--serif); font-weight: 500; color: var(--on-dark); font-size: 17px; }
.footer__brand span { font-size: 13.5px; }
.footer__links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { text-decoration: none; transition: color .2s; }
.footer__links a:hover { color: var(--gold); }
.footer__legal { display: flex; justify-content: space-between; gap: 24px; padding-top: 28px; font-size: 13px; color: rgba(243,230,207,.45); }
.footer__legal p:last-child { max-width: 520px; text-align: right; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker__track, .stack__row b::after, .ledger__spark path:first-child { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; padding-bottom: 120px; }
  .ledger { max-width: 520px; }
  .about__grid { grid-template-columns: 1fr; gap: 20px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 32px 0; border-left: 0; border-top: 1px solid rgba(22,33,44,.14); }
  .steps .step:first-child { border-top: 0; }
  .card--wide { grid-template-columns: 1fr; gap: 32px; }
  .principles__grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .hero { padding-top: 64px; }
  .lede { font-size: 17.5px; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 30px 24px 32px; }
  .about { padding: 88px 0 24px; }
  .approach, .practices, .principles { padding: 88px 0; }
  .contact { padding: 120px 0 96px; }
  .footer__inner, .footer__legal { flex-direction: column; align-items: flex-start; }
  .footer__legal p:last-child { text-align: left; }
  .btn { width: 100%; }
  .nav .btn { width: auto; }
  .ledger__tag { display: none; }
  .stack__row span { width: 90px; }
}
