/* ==========================================================================
   Covan — base design system
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --ink:        #07080a;
  --ink-2:      #0a0c0f;
  --panel:      #0e1116;
  --panel-2:    #141821;
  --panel-3:    #1a1f2a;

  --text:       #f4efe7;
  --muted:      #a39e96;
  --faint:      #6d6a65;

  --line:       rgba(255, 255, 255, .075);
  --line-2:     rgba(255, 255, 255, .14);
  --line-3:     rgba(255, 255, 255, .26);

  --ember:      #ff6a2a;
  --ember-2:    #ff8f5a;
  --ember-3:    #ffb98f;
  --gold:       #f7c36a;
  --teal:       #64e3c4;
  --blue:       #86a9ff;
  --violet:     #b69cff;
  --rose:       #ff8fa3;

  --cream:      #f6f0e6;
  --cream-2:    #ece2d3;
  --cream-3:    #ded2c0;
  --on-cream:   #16120d;
  --on-cream-2: #5b5348;

  --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --maxw: 1220px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 18px;
  --radius-lg: 26px;

  --ease: cubic-bezier(.22, .61, .28, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --nav-h: 74px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
figure { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--ember); color: #180a04; }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 4px; }

/* subtle scrollbar */
@supports (scrollbar-width: thin) {
  * { scrollbar-width: thin; scrollbar-color: #2a2f39 transparent; }
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 1440px; }
.wrap--narrow { max-width: 880px; }
.section { position: relative; padding-block: clamp(54px, 5.8vw, 94px); }
.section--tight { padding-block: clamp(40px, 4vw, 64px); }
.section--flush-top { padding-top: 0; }
.section--ink { background: var(--ink); }
.section--ink-2 { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 12%, var(--ink-2) 88%, var(--ink) 100%); }
.section--panel { background: var(--panel); }
.section--cream { background: var(--cream); color: var(--on-cream); }
.section--cream-2 { background: var(--cream-2); color: var(--on-cream); }
.section--cream .muted, .section--cream-2 .muted { color: var(--on-cream-2); }
.section--cream .btn--ghost, .section--cream-2 .btn--ghost {
  border-color: rgba(20, 17, 13, .22); color: var(--on-cream);
}
.section--cream .eyebrow, .section--cream-2 .eyebrow { color: #8a6a52; }
.stack { display: grid; gap: 24px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); font-size: .74em; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- type ---------- */
.display {
  font-size: clamp(2.7rem, 6.4vw, 5.4rem);
  line-height: .97;
  letter-spacing: -.042em;
  font-weight: 600;
}
.h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 1.01; letter-spacing: -.04em; }
.h2 { font-size: clamp(1.95rem, 3.7vw, 3.15rem); line-height: 1.04; letter-spacing: -.036em; }
.h3 { font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.14; letter-spacing: -.025em; }
.h4 { font-size: clamp(1.08rem, 1.3vw, 1.22rem); line-height: 1.28; letter-spacing: -.018em; }
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -.012em; }
.serif-i { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }
.lead {
  font-size: clamp(1.08rem, 1.55vw, 1.34rem);
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: -.012em;
  text-wrap: pretty;
}
.section--cream .lead, .section--cream-2 .lead { color: var(--on-cream-2); }
.small { font-size: .9rem; line-height: 1.55; }
.accent { color: var(--ember); }
.grad-text {
  background: linear-gradient(100deg, var(--gold) 0%, var(--ember-2) 42%, var(--ember) 78%, var(--rose) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ember-2);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6;
}
.eyebrow--bare::before { display: none; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .62em;
  padding: 1.02em 1.5em;
  border-radius: 999px;
  font-size: .95rem; font-weight: 600; letter-spacing: -.012em;
  line-height: 1;
  white-space: nowrap;
  transition: transform .35s var(--ease), background .3s, border-color .3s, color .3s, box-shadow .35s;
  will-change: transform;
}
.btn svg { transition: transform .4s var(--ease-out); flex: none; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary {
  background: linear-gradient(175deg, #ff8a52 0%, var(--ember) 46%, #ef4d10 100%);
  color: #1d0b03;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .42) inset, 0 14px 34px -14px rgba(255, 106, 42, .72);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 20px 44px -16px rgba(255,106,42,.85); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--line-3); background: rgba(255,255,255,.045); }
.btn--dark { background: var(--on-cream); color: #f8f3ea; }
.btn--dark:hover { background: #241d15; transform: translateY(-1px); }
.btn--sm { padding: .78em 1.15em; font-size: .86rem; }
.btn--block { width: 100%; }

.link {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; font-size: .93rem; color: var(--text);
  border-bottom: 1px solid var(--line-2); padding-bottom: 3px;
  transition: color .25s, border-color .25s, gap .3s var(--ease);
}
.link:hover { color: var(--ember-2); border-color: var(--ember); gap: .8em; }
.section--cream .link, .section--cream-2 .link { color: var(--on-cream); border-color: rgba(20,17,13,.2); }
.section--cream .link:hover, .section--cream-2 .link:hover { color: #b8440c; border-color: #b8440c; }

/* ---------- decorative ---------- */
.grain {
  pointer-events: none; position: absolute; inset: 0; z-index: 3; opacity: .28; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}
.gridlines {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 0%, #000 12%, transparent 74%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 0%, #000 12%, transparent 74%);
}
.glow {
  position: absolute; pointer-events: none; border-radius: 50%;
  filter: blur(10px); opacity: .55;
}
.glow--ember { background: radial-gradient(circle, rgba(255,106,42,.32) 0%, rgba(255,106,42,0) 68%); }
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent); }

/* ---------- reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(.965); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- footer ---------- */
.footer { background: var(--ink); border-top: 1px solid var(--line); padding-top: clamp(52px, 6vw, 88px); }
.footer__top { display: grid; grid-template-columns: 1.5fr .95fr .95fr .95fr; gap: clamp(24px, 3.4vw, 52px); padding-bottom: 56px; }
.footer__brand p { margin-top: 18px; max-width: 30ch; color: var(--muted); font-size: .93rem; line-height: 1.6; }
.footer__col h4 {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .17em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 16px;
}
.footer__col li + li { margin-top: 10px; }
.footer__col a { font-size: .93rem; color: var(--muted); transition: color .2s; }
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between;
  padding-block: 26px 34px; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--faint);
}
.footer__legal { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__legal a:hover { color: var(--muted); }

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer__brand { grid-column: 1 / -1; }
}


/* skip link */
.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 300;
  background: var(--text); color: #14110d; padding: 12px 18px;
  border-radius: 10px; font-weight: 600; font-size: .9rem;
}
.skip:focus { left: 16px; outline: none; box-shadow: 0 0 0 3px rgba(255,106,42,.55); }
