/* ==========================================================================
   Wintr Studio — design language v2 "blueprint"
   Monospace type over a frost-grey engineering grid, warm terracotta accent,
   dark CTA bands. One cohesive system; the Adage app keeps its own brighter
   icon orange. Tokens and shared components live here.
   ========================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* surfaces */
  --bg:        #ECEFF3;   /* frost-grey page */
  --card:      #FFFFFF;
  --dark:      #14171C;   /* dark bands + ink */
  --on-dark:   #F4F6F9;

  /* text, cool grey scale */
  --ink:       #14171C;
  --ink-2:     #2A2E36;
  --text:      #565E6A;
  --text-2:    #6A727E;
  --muted:     #818995;
  --faint:     #9AA1AB;
  --faintest:  #B7BDC6;

  /* lines */
  --line:      rgba(20, 22, 28, 0.10);
  --line-soft: rgba(20, 22, 28, 0.05);
  --hairline:  rgba(20, 22, 28, 0.08);

  /* brand */
  --accent:      #D9622E;   /* terracotta — studio accent */
  --accent-2:    rgba(217, 98, 46, 0.20);
  --accent-glow: rgba(217, 98, 46, 0.10);
  --adage:       #EE6C3A;   /* Adage app icon, slightly brighter */
  --green:       #3E9A55;
  --green-deep:  #3E7A4C;

  /* type */
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* layout */
  --wide:   1180px;
  --content: 1080px;
  --prose:  760px;
  --gutter: clamp(24px, 4vw, 48px);
  --grid:   40px;

  color-scheme: light;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; }

::selection { background: var(--accent-2); }

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

svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ── Layout wraps ───────────────────────────────────────────────────────── */
.wrap      { max-width: var(--content); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); width: 100%; }
.wrap-wide { max-width: var(--wide);    margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); width: 100%; }
.wrap-prose{ max-width: var(--prose);   margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); width: 100%; }

/* a centred content column with faint side rules */
.column {
  position: relative;
  max-width: var(--content);
  margin: 0 auto;
}
.column::before,
.column::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(20,22,28,0) 0, var(--line) 220px);
}
.column::before { left: 0; }
.column::after  { right: 0; }

/* ── Blueprint grid background ──────────────────────────────────────────── */
.grid-bg {
  position: relative;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
}

/* faint grid that fades out — for footers */
.grid-fade { position: relative; overflow: hidden; }
.grid-fade::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20,22,28,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,22,28,0.045) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 30px;
  font-size: 12px;
  color: var(--text-2);
}
.nav-links a { color: var(--text-2); text-decoration: none; transition: color 0.16s ease; }
.nav-links a:hover { color: var(--ink); }

/* small status chip in the nav */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  border-radius: 100px;
  padding: 3px 9px;
}
.chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.chip-building { color: var(--green-deep); border: 1px solid rgba(62,122,76,0.32); }
.chip-building::before { background: var(--green); }

/* ── Typography ─────────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* "// section" monospace comment label */
.label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 600;
}
.label-faint { font-size: 11px; letter-spacing: 0.06em; color: var(--faint); }

.h-hero {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.h-page {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.h-section {
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.accent { color: var(--accent); }

.lede {
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.7;
  color: var(--text);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 7px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(217,98,46,0.7);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(217,98,46,0.8); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); }

.btn-ghost {
  background: rgba(20,22,28,0.025);
  color: var(--ink);
  border: 1px solid rgba(20,22,28,0.16);
  font-weight: 500;
}
.btn-ghost:hover { border-color: rgba(20,22,28,0.42); background: rgba(20,22,28,0.05); }

.btn-line {
  color: var(--ink);
  border: 1px solid rgba(20,22,28,0.18);
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 13px 20px;
}
.btn-line:hover { border-color: var(--ink); }

/* plain text link, uppercase tracked */
.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.16s ease;
}
.link-quiet:hover { color: var(--ink); }

/* ── Status pills ───────────────────────────────────────────────────────── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.status-live { color: var(--green); }
.status-live::before { background: var(--green); }

.tag-soon {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
  border: 1px solid rgba(20,22,28,0.14);
  border-radius: 100px;
  padding: 5px 12px;
}

/* meta tags row (iOS / HOME WIDGET / ...) */
.meta-tag {
  font-size: 10px;
  letter-spacing: 0.07em;
  color: var(--text);
  background: rgba(20,22,28,0.04);
  border-radius: 6px;
  padding: 6px 11px;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* the Adage app icon tile */
.app-tile {
  border-radius: 16px;
  background: var(--adage);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 24px -8px rgba(238,108,58,0.6);
}

/* iOS widget mockup */
.widget {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 40px -16px rgba(20,30,50,0.32);
  border: 1px solid rgba(255,255,255,0.8);
}
.widget-head { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.widget-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--adage); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.widget-eyebrow { font-size: 9px; letter-spacing: 0.12em; color: var(--faint); }
.widget-proverb { font-size: 17px; line-height: 1.4; font-weight: 600; color: #1C1C1A; margin-bottom: 12px; letter-spacing: -0.01em; }
.widget-meaning { font-size: 12px; line-height: 1.55; color: #7C746B; font-style: italic; }
.widget-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(60,50,40,0.08); }
.widget-foot span { font-size: 10px; letter-spacing: 0.06em; color: #B0A89F; }

/* ── Dark contact band ──────────────────────────────────────────────────── */
.band {
  border-radius: 18px;
  background: var(--dark);
  background-image: radial-gradient(60% 80% at 88% 110%, rgba(217,98,46,0.22) 0%, transparent 70%);
  padding: clamp(34px, 5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
}
.band-title { font-size: clamp(24px, 3.2vw, 32px); font-weight: 600; color: var(--on-dark); letter-spacing: -0.02em; margin-bottom: 12px; max-width: 440px; line-height: 1.15; }
.band-sub { font-size: 14px; line-height: 1.6; color: var(--faint); max-width: 380px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot-glow {
  position: absolute;
  left: 8%; bottom: -10%;
  width: 40%; height: 60%;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}
.foot-col-label { font-size: 10px; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 16px; }
.foot-links { display: flex; flex-direction: column; gap: 11px; font-size: 13px; }
.foot-links a { color: var(--text); text-decoration: none; transition: color 0.16s ease; }
.foot-links a:hover { color: var(--ink); }
.foot-rule { padding-top: 24px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: 0.04em; color: var(--faint); }

/* ── Prose (privacy policy) ─────────────────────────────────────────────── */
.prose .back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}
.prose .back-link:hover { color: var(--ink); }

.prose .meta { font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }

.prose .intro {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* table of contents */
.toc {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 24px 28px;
}
.toc-title { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 28px;
}
.toc ol li { counter-increment: toc; }
.toc ol li a {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.16s ease;
}
.toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--faintest);
  flex-shrink: 0;
}
.toc ol li a:hover { color: var(--accent); }
.toc ol li a:hover::before { color: var(--accent); }

/* numbered sections, label + content two columns */
.prose section { border-top: 1px solid var(--line); padding: 36px 0; scroll-margin-top: 24px; }
.prose .sec-grid { display: grid; grid-template-columns: 160px 1fr; gap: 28px; }
.prose .sec-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.prose .sec-label .num { display: block; color: var(--faintest); margin-bottom: 6px; }
.prose p { font-size: 14px; line-height: 1.8; color: var(--text); }
.prose p + p { margin-top: 16px; }
.prose .big { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.prose ul { margin: 14px 0 0 18px; }
.prose li { font-size: 14px; line-height: 1.75; color: var(--text); margin-bottom: 8px; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-size: 0.92em; background: var(--accent-2); padding: 2px 6px; border-radius: 5px; }

.callout {
  margin-top: 18px;
  border-left: 2px solid var(--accent);
  background: rgba(217,98,46,0.06);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
}
.callout p { color: var(--ink-2); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .toc ol { grid-template-columns: 1fr; }
  .prose .sec-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 720px) {
  .nav-links { gap: 20px; }
  .band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .chip { display: none; }
  .logo { font-size: 15px; }
  .nav-links { gap: 16px; font-size: 11px; }
}
