/* ============================================================
   COLDLETTER — Design System
   The email atelier for product & engineering teams.
   Warm cream + near-black ink + a single hot coral accent.
   ============================================================ */


:root {
  /* ---- Surfaces (warm, tonal — no borders for sectioning) ---- */
  --paper:      #FBFAF6;   /* page base */
  --sand:       #F1EEE5;   /* alternating sectional band */
  --card:       #FFFFFF;   /* raised card / action layer */
  --card-2:     #F7F5EF;   /* nested surface inside cards */
  --night:      #181612;   /* dark sections / hero contrast */
  --night-2:    #221F19;   /* raised surface on dark */
  --night-3:    #2D2A22;   /* hover / nested on dark */

  /* ---- Ink ---- */
  --ink:        #181612;   /* warm near-black, primary text */
  --ink-2:      #4A453C;   /* secondary text */
  --ink-3:      #837C6E;   /* muted text */
  --ink-4:      #ADA597;   /* faint / placeholder */
  --cream:      #F4F1E8;   /* text on dark */
  --cream-2:    #B8B2A2;   /* muted text on dark */

  /* ---- Accent (the single laser) ---- */
  --flare:      #FF4E29;   /* coral / orange-red */
  --flare-2:    #FF6B47;   /* lighter coral */
  --flare-press:#E63C18;   /* pressed */
  --flare-tint: #FCE9E2;   /* faint coral wash */
  --flare-glow: rgba(255,78,41,0.16);

  /* ---- Hairlines (used sparingly — depth is mostly tonal) ---- */
  --hair:        rgba(24,22,18,0.10);
  --hair-strong: rgba(24,22,18,0.16);
  --hair-dark:   rgba(244,241,232,0.12);

  /* ---- Status (for product mockups) ---- */
  --good:    #1F9D63;
  --good-bg: #E4F3EA;
  --warn:    #C77A12;
  --warn-bg: #FAEFDB;
  --info:    #2D6CDF;
  --info-bg: #E4ECFB;

  /* ---- Type ---- */
  --display: 'Bricolage Grotesque', Georgia, serif;
  --sans:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ---- Radii (crisp, confident — not friendly pills) ---- */
  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* ---- Shadows (warm-tinted, soft) ---- */
  --sh-xs: 0 1px 2px rgba(24,22,18,0.06);
  --sh-sm: 0 2px 8px rgba(24,22,18,0.06);
  --sh-md: 0 12px 30px rgba(24,22,18,0.08);
  --sh-lg: 0 28px 60px rgba(24,22,18,0.12);
  --sh-flare: 0 14px 34px rgba(255,78,41,0.26);

  /* ---- Layout ---- */
  --container: 1200px;
  --container-wide: 1360px;
  --header-h: 70px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--flare); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 28px; }
.wrap-wide { max-width: var(--container-wide); }
.section { padding-block: 120px; }
.section-sm { padding-block: 80px; }

@media (max-width: 720px) {
  .section { padding-block: 76px; }
  .section-sm { padding-block: 56px; }
  .wrap { padding-inline: 20px; }
}

/* ============================================================
   ELEMENTS — eyebrow, headings
   ============================================================ */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--flare);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--flare);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--flare-2); }

.h-display { font-size: clamp(2.8rem, 6vw, 5.2rem); }
.h-1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.h-2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.h-3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }

.lede { font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-3); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  transition: transform .2s var(--ease-out), background .2s var(--ease-out), box-shadow .2s var(--ease-out), color .2s var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.btn .arr { transition: transform .25s var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }

.btn-primary { background: var(--flare); color: #fff; box-shadow: var(--sh-flare); }
.btn-primary:hover { background: var(--flare-press); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hair-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); transform: translateY(-2px); }

.btn-on-dark { background: var(--cream); color: var(--ink); }
.btn-on-dark:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }

.btn-ghost-dark { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px var(--hair-dark); }
.btn-ghost-dark:hover { box-shadow: inset 0 0 0 1.5px var(--cream-2); transform: translateY(-2px); }

.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-sm { padding: 9px 15px; font-size: 0.88rem; }

/* ============================================================
   CHIPS / BADGES
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-pill);
}
.chip-flare { background: var(--flare-tint); color: var(--flare-press); }
.chip-ink { background: rgba(24,22,18,0.06); color: var(--ink-2); }
.chip-dark { background: rgba(244,241,232,0.08); color: var(--cream-2); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: var(--r-pill); letter-spacing: 0;
}
.badge-status .dot { width: 6px; height: 6px; border-radius: 50%; }
.st-good { background: var(--good-bg); color: var(--good); }
.st-good .dot { background: var(--good); }
.st-warn { background: var(--warn-bg); color: var(--warn); }
.st-warn .dot { background: var(--warn); }
.st-info { background: var(--info-bg); color: var(--info); }
.st-info .dot { background: var(--info); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 36px;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.card-edge { box-shadow: 0 0 0 1px var(--hair); }

/* ============================================================
   HEADER (glass)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(251,250,246,0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hair);
}
.site-header.on-night {
  background: rgba(24,22,18,0.72);
  border-bottom: 1px solid var(--hair-dark);
}
.nav {
  width: 100%; max-width: var(--container-wide); margin-inline: auto;
  padding-inline: 28px;
  display: flex; align-items: center; gap: 36px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.04em; }
.brand img { width: 30px; height: 30px; }
.brand:hover img { transform: scale(1.05); transition: transform .2s var(--ease-out); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.96rem; font-weight: 500; color: var(--ink-2); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1.5px; width: 0;
  background: var(--flare); transition: width .3s var(--ease-out);
}
.nav-links a:hover::after { width: 100%; }
.on-night .brand { color: var(--cream); }
.on-night .nav-links a { color: var(--cream-2); }
.on-night .nav-links a:hover { color: var(--cream); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--night); color: var(--cream-2); padding-block: 80px 40px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.site-footer .brand { color: var(--cream); }
.footer-col h4 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-2); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 0.95rem; color: var(--cream-2); padding: 6px 0; transition: color .2s, transform .2s var(--ease-out); }
.footer-col a:hover { color: var(--cream); transform: translateX(3px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--hair-dark); font-size: 0.85rem; flex-wrap: wrap; }
.footer-bottom .mono { font-family: var(--mono); font-size: 12px; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

/* ============================================================
   DARK SECTION
   ============================================================ */
.night { background: var(--night); color: var(--cream); }
.night h1, .night h2, .night h3 { color: var(--cream); }
.night .lede { color: var(--cream-2); }
.night .muted { color: var(--cream-2); }

/* ============================================================
   UTILITY
   ============================================================ */
.mono { font-family: var(--mono); }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 22px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 24px; }
.hairline { height: 1px; background: var(--hair); border: 0; }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
