/* Drywall Calc — marketing site (Stage 2 DESIGN)
   Tokens: drywall_app brand.mjs + src/index.css (+ gypsum secondaries from assets mood).
   Skeleton layout mirrors sites/_shared/css/site.css; palette is THIS brand only.
   Do not copy laneo / memvi / chiply / mockinterview colors. */

:root {
  color-scheme: dark;
  /* App default field (brand.mjs bg, index.css --bg) */
  --bg: #0d1117;
  --bg-elev: #161b22;
  --surface-2: #1f2630;
  --fg: #e6edf3;
  --body: #e6edf3;
  --muted: #8b97a6;
  /* Kraft / joint-tape accent (brand.mjs accent) */
  --brand: #e8b04b;
  --accent: #e8b04b;
  /* brand.mjs accentLight — links / hover on dark */
  --brand-ink: #f0c97a;
  /* index.css --accent-strong (warm kraft wash) */
  --accent-strong: #e8b88a;
  /* Gypsum board grays (assets mood / generate-images brand block) */
  --gypsum: #c9c2b8;
  --gypsum-dim: #8b857a;
  --line: #2d3440;
  --ok: #3fb950;
  --warn: #d29922;
  --fail: #f85149;
  /* index.css --on-accent */
  --on-brand: #1a120b;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --wrap: 780px;
  --measure: 42rem;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  /* Crisp trade-tool sans (app uses Inter; site stays industrial, not editorial serif) */
  --font: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: var(--font);
}

/* Optional sun theme when the OS prefers light (index.css [data-theme='sun']) */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f2ec;
    --bg-elev: #ffffff;
    --surface-2: #e4e7ec;
    --fg: #0b0f14;
    --body: #0b0f14;
    --muted: #475467;
    --brand: #e8b04b;
    --accent: #e8b04b;
    --brand-ink: #7a4f2a;
    --accent-strong: #7a4f2a;
    --gypsum: #c9c2b8;
    --gypsum-dim: #8b857a;
    --line: #d0d5dd;
    --ok: #067647;
    --warn: #b54708;
    --fail: #b42318;
    --on-brand: #1a120b;
    --shadow: 0 10px 28px rgba(11, 15, 20, 0.08);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 480px at 8% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 58%),
    radial-gradient(900px 400px at 94% 0%, color-mix(in srgb, var(--gypsum) 14%, transparent), transparent 55%),
    var(--bg);
  color: var(--fg);
  font: 17px/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--brand-ink); }
a:hover { color: var(--brand); }

/* One-column readable measure */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-4) 18px var(--space-6);
}

/* ——— Header + three product doors (labels: iOS app · Web · Android) ——— */
.site-header,
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) 0 var(--space-4);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
}

.brand {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.brand:hover { color: var(--brand); }
.brand span { color: var(--brand); }

.nav,
.product-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  font-size: 14px;
  font-weight: 600;
}

/* Shared idle state for product anchors */
.nav a,
.product-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 2px 0;
}
.nav a:hover,
.product-nav a:hover {
  color: var(--fg);
  border-bottom-color: color-mix(in srgb, var(--brand) 55%, transparent);
}
.nav a[aria-current="page"],
.product-nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--brand);
}

/* Distinct treatments for the three product doors (order: iOS app, Web, Android) */
.product-nav a:nth-child(1) {
  /* iOS app — kraft underline weight */
  letter-spacing: 0.01em;
}
.product-nav a:nth-child(2) {
  /* Web — gypsum-tinted idle */
  color: color-mix(in srgb, var(--gypsum) 70%, var(--muted));
}
.product-nav a:nth-child(2):hover,
.product-nav a:nth-child(2)[aria-current="page"] {
  color: var(--fg);
}
.product-nav a:nth-child(3) {
  /* Android — quieter stud-gray idle until hover */
  color: var(--gypsum-dim);
}
.product-nav a:nth-child(3):hover,
.product-nav a:nth-child(3)[aria-current="page"] {
  color: var(--fg);
}

.product-chooser {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

/* ——— One-column hero (no side-by-side media grid) ——— */
.hero {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-2) 0 var(--space-5);
  grid-template-columns: 1fr;
}

.hero-media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-width: 36rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 10px;
}

/* One H1 hierarchy per page */
h1 {
  font-family: var(--font);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 700;
  color: var(--fg);
}
h2 {
  font-family: var(--font);
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 36px 0 10px;
  font-weight: 700;
  color: var(--fg);
}
h3 {
  font-size: 1.05rem;
  margin: 22px 0 6px;
  font-weight: 650;
  color: var(--fg);
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: var(--measure);
}
.muted,
.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover {
  background: var(--brand-ink);
  color: var(--on-brand);
}
.btn-secondary {
  background: var(--bg-elev);
  color: var(--fg);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.btn-secondary:hover { border-color: var(--brand); }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 18px 0;
}

.card,
.callout,
.quiz-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card {
  padding: 18px;
}
.card h3 { margin-top: 0; font-family: var(--font); }

.callout {
  padding: 18px 20px;
  margin: 24px 0;
  border-left: 4px solid var(--brand);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2);
  padding: 0;
  list-style: none;
  margin: 18px 0;
}
.features li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--body);
}
.features strong {
  display: block;
  color: var(--fg);
  margin-bottom: 2px;
}

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--brand-ink); }

.prose p {
  margin: 0 0 14px;
  max-width: var(--measure);
}
.prose ul,
.prose ol {
  padding-left: 1.2rem;
  margin: 0 0 16px;
  max-width: var(--measure);
}
.prose li { margin: 0 0 8px; }

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-elev);
  margin: 0;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
tr:last-child td { border-bottom: none; }

.quiz-card {
  padding: 22px;
  max-width: 640px;
}
.quiz-options {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.quiz-options button,
.quiz-options a.option,
.option {
  display: block;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.quiz-options button:hover,
.quiz-options a.option:hover,
.option:hover {
  border-color: var(--brand);
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  color: var(--brand-ink);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 18px 0;
}
.stat { min-width: 120px; }
.stat strong {
  display: block;
  font-family: var(--font);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--fg);
}

.related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.related a { display: block; margin: 6px 0; }
.related h2 { margin-top: 0; }

/* ——— Footer legal links (Privacy · Terms · Support + support@host) ——— */
.site-footer,
footer {
  margin-top: var(--space-5);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover {
  color: var(--fg);
  border-bottom-color: var(--gypsum-dim);
}
.site-footer a[href^="mailto:"],
footer a[href^="mailto:"] {
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 600;
}
.site-footer a[href^="mailto:"]:hover,
footer a[href^="mailto:"]:hover {
  color: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
