/* ──────────────────────────────────────────────────────────────────────────
   CardCadence marketing site — Letterpress design system.

   Mirrors the app (frontend/src/index.css @theme): warm ink-on-cream, Fraunces
   display serif + Hanken Grotesk body + Geist Mono, terracotta/brass accents,
   and the Cadence Rule ticked motif. The marketing site is plain static HTML
   (no Tailwind build) so the app's token names are re-expressed here as plain
   CSS custom properties + utility classes, kept value-for-value in sync.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* Palette — value-for-value with the app's @theme tokens */
  --ink: #2B2A26;
  --canvas: #FAF7F2;
  --surface: #EFE9DF;
  --surface-2: #E2D9C9;
  --line: #D9CFC0;
  --accent: #9A3B2E;     /* terracotta */
  --accent-dark: #82301F;
  --accent-tint: #F7EAE6;
  --brass: #B08D57;
  --rail: #1C1917;       /* charcoal */
  --success: #4F6F52;
  --warning: #B07D2B;

  --muted: #6B5F50;
  --muted-2: #8C8070;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  --radius-lg: 0.75rem;
  --radius-md: 0.5rem;
  --shadow-card: 0 1px 2px rgba(43,42,38,.05), 0 6px 18px rgba(43,42,38,.07);
  --shadow-lift: 0 2px 6px rgba(43,42,38,.06), 0 18px 44px rgba(43,42,38,.12);

  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--canvas);
  /* ≤2% paper grain — a faint cream fiber, never busy. */
  background-image:
    radial-gradient(rgba(43,42,38,.018) 1px, transparent 1px),
    radial-gradient(rgba(43,42,38,.012) 1px, transparent 1px);
  background-size: 4px 4px, 7px 7px;
  background-position: 0 0, 2px 3px;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  font-weight: 560;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }
p  { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

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

.mono {
  font-family: var(--font-mono);
  font-size: .8em;
  letter-spacing: .02em;
}

/* ── Layout primitives ───────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5.5rem 0; }
.section--tight { padding: 3.5rem 0; }
.section--surface { background: var(--surface); }
.section--ink { background: var(--rail); color: var(--canvas); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--canvas); }
.section--accent { background: var(--accent); color: #FBEEE9; }
.section--accent h2, .section--accent h3 { color: #fff; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 500;
}
.section--ink .eyebrow, .section--accent .eyebrow { color: var(--brass); }

.lede { font-size: 1.2rem; color: var(--muted); max-width: 44ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.measure { max-width: 60ch; }

/* ── Cadence Rule — the ticked motif (matches app .cadence-rule) ──────────── */
.cadence-rule {
  height: 10px;
  background-image: repeating-linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 12px);
  opacity: .5;
  color: var(--brass);
}
.cadence-rule--center { max-width: 220px; margin: 1.25rem auto; }
.cadence-rule--line { color: var(--line); opacity: 1; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: .8rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(43,42,38,.12); }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--onink { background: var(--canvas); color: var(--ink); }
.btn--onink:hover { background: #fff; color: var(--ink); }
.btn--onink-ghost { background: transparent; color: var(--canvas); border-color: rgba(250,247,242,.35); }
.btn--onink-ghost:hover { border-color: var(--canvas); color: var(--canvas); }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.05rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.center .cta-row { justify-content: center; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,247,242,.86);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand__rule { margin-top: 3px; width: 100%; height: 6px; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }
.nav__links a { color: var(--ink); font-size: .96rem; font-weight: 500; }
.nav__links a:hover { color: var(--accent); }
.nav__cta { display: flex; gap: .6rem; align-items: center; }
.nav__toggle { display: none; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { background: var(--rail); color: #C9BFB0; padding: 4rem 0 2.5rem; }
.footer a { color: #C9BFB0; }
.footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
}
.footer__brand .brand__word { color: var(--canvas); }
.footer__tag { color: #9C9485; font-size: .95rem; max-width: 30ch; margin-top: 1rem; }
.footer h4 {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1rem;
  font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .55rem; font-size: .95rem; }
.footer__bottom {
  border-top: 1px solid rgba(201,191,176,.16);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .85rem;
  color: #8A8273;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 5rem 0 4rem; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3.5rem;
  align-items: center;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero__sub { font-size: 1.25rem; color: var(--muted); max-width: 46ch; margin-bottom: 2rem; }
.hero__art {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero__card {
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  transform: rotate(-3deg);
  border: 1px solid var(--line);
  background: #fff;
  width: 100%;
  max-width: 460px;
}
.hero__card--back {
  position: absolute;
  transform: rotate(5deg) translate(8%, 8%);
  z-index: -1;
  max-width: 420px;
  opacity: .92;
}

/* ── Cards / grids ───────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}
.card--plain { background: transparent; border: none; box-shadow: none; padding: 0; }
.card__num {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .05em;
}
.card h3 { margin-top: .5rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.section--ink .card { background: #26221E; border-color: #36302A; color: #C9BFB0; }
.section--ink .card p { color: #A89E8E; }

/* ── Stat / outcome callouts ─────────────────────────────────────────────── */
.stat { }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.section--ink .stat__num { color: var(--brass); }
.stat__label { color: var(--muted); font-size: .98rem; margin-top: .4rem; }
.section--ink .stat__label { color: #A89E8E; }

/* ── Testimonial ─────────────────────────────────────────────────────────── */
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}
.quote__text { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; color: var(--ink); }
.quote__by { margin-top: 1.1rem; font-size: .92rem; color: var(--muted); }
.quote__by strong { color: var(--ink); }

/* ── Pricing table ───────────────────────────────────────────────────────── */
.price-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.price-card--featured { border-color: var(--accent); box-shadow: var(--shadow-lift); }
.price-card__size { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); letter-spacing: .05em; }
.price-card__price { font-family: var(--font-display); font-size: 3rem; font-weight: 600; color: var(--accent); line-height: 1; margin: .5rem 0; }
.price-card__per { font-size: .9rem; color: var(--muted); }
.price-card__dims { margin-top: .8rem; font-size: .92rem; color: var(--ink); }
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: .25rem .7rem;
  margin-bottom: .75rem;
}

/* ── Feature / check list ────────────────────────────────────────────────── */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: .85rem;
  color: var(--ink);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: .15rem;
  width: 1.2rem; height: 1.2rem;
  border-radius: 50%;
  background: var(--accent-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A3B2E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: .78rem;
  background-repeat: no-repeat;
  background-position: center;
}
.section--ink .checklist li { color: #D8CFC0; }
.checklist--two { columns: 2; column-gap: 2.5rem; }

/* ── Steps ───────────────────────────────────────────────────────────────── */
.steps { counter-reset: step; }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ── Postcard showcase ───────────────────────────────────────────────────── */
.postcard-frame {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  background: #fff;
  overflow: hidden;
}
.postcard-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* ── Map illustration (neighborhood mailing) ──────────────────────────────── */
.map-card {
  margin: 0;
  width: 100%;
  max-width: 480px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  background: #fff;
  overflow: hidden;
}
.map-card svg { width: 100%; height: auto; display: block; }
.map-card figcaption {
  padding: .7rem 1rem;
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--canvas);
}

/* ── Misc ────────────────────────────────────────────────────────────────── */
.pill-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.pill {
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .9rem;
}
.note {
  font-size: .9rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

/* ── Legal pages ─────────────────────────────────────────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 4rem 1.5rem 5rem; }
.legal h1 { margin-bottom: .35rem; }
.legal__meta { font-family: var(--font-mono); font-size: .8rem; color: var(--muted-2); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.legal p, .legal li { color: var(--ink); font-size: 1rem; line-height: 1.7; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal .note { margin-bottom: 2.5rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__art { order: -1; }
  .grid--3, .grid--4, .price-table, .postcard-row { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .nav__links { display: none; }
  .checklist--two { columns: 1; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}
