/* ============================================================
   Minutesmith — site design system ("The Smithy")
   Palette + type derived from the app (src/App.css) and the
   pencil-smith mascot. Dark forge workshop; warm amber/ember
   forge-glow, cool cyan "refined minutes" accent.
   ============================================================ */

:root {
  /* Surfaces — from app --bg-dark / --bg-sidebar */
  --ink:          #14101f;
  --ink-2:        #181322;
  --raised:       #1e1830;
  --raised-2:     #241d3a;

  /* Text */
  --text:         #e9edf6;
  --muted:        #a2acc2;
  --faint:        #7c86a1;

  /* Accents */
  --refined:      #37d5ee;   /* app --accent (cyan) — "finished minutes" */
  --refined-deep: #0891b2;
  --forge:        #ffb454;   /* app --amber — forge glow */
  --ember:        #ff5a5f;   /* app --record — hot metal / CTA */
  --green:        #3ddc97;   /* app --green */
  --maroon:       #8e2143;   /* mascot cap */

  /* Lines */
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Type */
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, sans-serif;
  --body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* Layout */
  --page:  1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 16px;
}

* , *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--refined); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

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

/* ── Shared shell ─────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--forge);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
}
.eyebrow .tick { color: var(--refined); }
.eyebrow .label { text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }

/* ── Buttons ──────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--body);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1;
  padding: 0.9em 1.35em;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

/* Primary = hot metal (forge → ember) */
.btn-primary {
  color: #2a1102;
  background: linear-gradient(135deg, var(--forge), var(--ember));
  box-shadow: 0 8px 30px -10px rgba(255, 120, 90, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -12px rgba(255, 120, 90, 0.75);
}

/* Ghost = quiet secondary */
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--refined); color: var(--refined); }

.btn-sm { padding: 0.6em 0.95em; font-size: 0.92rem; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ── Header ───────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 16, 31, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.brand .brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  color: var(--refined);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav a.nav-link {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 550;
}
.nav a.nav-link:hover { color: var(--text); text-decoration: none; }

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

/* ── Footer ───────────────────────────────────── */

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border);
  background: var(--ink-2);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}
.foot-brand .brand { margin-bottom: 0.9rem; }
.foot-brand p { color: var(--muted); max-width: 30ch; margin: 0; font-size: 0.96rem; }
.foot-col h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin: 0 0 1.1rem;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.foot-col a { color: var(--muted); font-size: 0.96rem; }
.foot-col a:hover { color: var(--text); text-decoration: none; }
.site-footer .baseline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.85rem;
}
.site-footer .baseline .mono { font-family: var(--mono); }

@media (max-width: 720px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ============================================================
   Landing page
   ============================================================ */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
  text-align: center;
}
/* forge glow — the signature light */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(255, 180, 84, 0.20), transparent 62%),
    radial-gradient(48% 60% at 72% 18%, rgba(255, 90, 95, 0.14), transparent 60%),
    radial-gradient(50% 65% at 26% 22%, rgba(55, 213, 238, 0.12), transparent 62%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.5em 0.9em;
  border-radius: 999px;
  margin-bottom: 1.8rem;
}
.hero .badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 8vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 1.2rem;
}
.hero h1 .out {
  background: linear-gradient(120deg, var(--forge), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 2.2rem;
}
.hero .cta-row {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .fineprint {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
}

/* Hero product shot — a glowing app window in the smithy */
.hero-shot {
  position: relative;
  max-width: 960px;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
}
.hero-shot::after {
  content: "";
  position: absolute;
  inset: auto 8% -30px 8%;
  height: 60px;
  background: radial-gradient(50% 100% at 50% 0%, rgba(255, 160, 90, 0.35), transparent 70%);
  filter: blur(14px);
  z-index: -1;
}
.window {
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--raised);
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.8),
    0 2px 0 0 rgba(255, 255, 255, 0.05) inset;
}
.window .titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.window .titlebar i {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
}
.window .titlebar .r { background: #ff5f57; }
.window .titlebar .y { background: #febc2e; }
.window .titlebar .g { background: #28c840; }
.window .titlebar span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin-left: 0.5rem;
}
.window img { width: 100%; display: block; }

/* ── Generic section ──────────────────────────── */

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section.alt { background: var(--ink-2); border-block: 1px solid var(--border); }
.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 20ch;
}
.section .section-lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 52ch;
  margin: 0;
}
.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }

/* ── Proof stats ──────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
}
.stat .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--refined);
}
.stat .num.warm { color: var(--forge); }
.stat h3 { font-size: 1.05rem; margin: 0.9rem 0 0.35rem; }
.stat > h3:first-child { margin-top: 0; }
.stat p { color: var(--muted); margin: 0; font-size: 0.96rem; }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
}

/* ── Feature rows (the forge stages) ──────────── */

.stage {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.stage + .stage { border-top: 1px solid var(--border); }
.stage.flip .stage-copy { order: 2; }
.stage h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0.4rem 0 0.9rem;
}
.stage p { color: var(--muted); font-size: 1.08rem; margin: 0 0 1rem; }
.stage .kbd {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.15em 0.5em;
}
.stage .shot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75);
  background: var(--raised);
}

@media (max-width: 820px) {
  .stage { grid-template-columns: 1fr; gap: 1.75rem; }
  .stage.flip .stage-copy { order: 0; }
}

/* ── Providers ────────────────────────────────── */

.providers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.55em 1.05em;
  background: rgba(255, 255, 255, 0.03);
}
.chip .k { width: 8px; height: 8px; border-radius: 2px; }

/* ── Privacy band ─────────────────────────────── */

.band {
  position: relative;
  overflow: hidden;
  border-radius: clamp(18px, 3vw, 28px);
  border: 1px solid var(--border-strong);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255, 90, 95, 0.16), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(255, 180, 84, 0.14), transparent 55%),
    var(--raised);
}
.band h2 { max-width: 18ch; }
.band p { color: var(--muted); font-size: 1.12rem; max-width: 56ch; }
.band .band-links { margin-top: 1.6rem; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.band .band-links a { font-weight: 600; }

/* ── Final CTA ────────────────────────────────── */

.get { text-align: center; }
.get h2 { margin-inline: auto; max-width: 22ch; }
.get .cta-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ============================================================
   Article pages (privacy / support)
   ============================================================ */

.doc { padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.doc-head { margin-bottom: 2.5rem; }
.doc-head .eyebrow { margin-bottom: 1rem; }
.doc-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
.doc-head .updated, .doc-head .lead { color: var(--muted); margin: 0; }
.doc-head .lead { font-size: 1.15rem; max-width: 55ch; margin-top: 0.4rem; }

.article {
  max-width: 720px;
}
.article h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.article h2:first-of-type { border-top: 0; padding-top: 0; }
.article p, .article li { color: #d6dcec; }
.article p { margin: 0 0 1rem; }
.article ul { margin: 0 0 1.2rem; padding-left: 1.2rem; }
.article li { margin-bottom: 0.5rem; }
.article li::marker { color: var(--forge); }
.article strong { color: var(--text); }
.article code {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
}
.article table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.article th, .article td {
  border: 1px solid var(--border-strong);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.article th { background: rgba(255, 255, 255, 0.05); }

/* Emphasised legal callout (e.g. consent responsibility) */
.callout {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--forge);
  background: rgba(255, 180, 84, 0.06);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.2rem;
}
.callout p { margin: 0; }

/* Support: email CTA */
.mail-button { margin-top: 0.6rem; }

/* ── Scroll reveal ────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
