/* Diamond-Cost — shared stylesheet
   Layout concept: a price book — icy editorial page, serif headlines,
   dotted price leaders, mono figures, range strips drawn to one scale. */

:root {
  --bg: #f6f8f9;
  --surface: #ffffff;
  --ice: #eaf2f5;
  --ink: #182430;
  --muted: #5d6f7a;
  --line: #d9e2e7;
  --accent: #0e7a5a;
  --accent-hover: #0a5f46;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ec;
  --nat: #0e7a5a;   /* chart series: natural */
  --lab: #3b76b8;   /* chart series: lab-grown */
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Red Hat Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11191e;
    --surface: #18232a;
    --ice: #1d2a32;
    --ink: #e7edf1;
    --muted: #93a4ae;
    --line: #2b3a43;
    --accent: #2fbf8d;
    --accent-hover: #4fd3a4;
    --accent-ink: #0b1a14;
    --accent-soft: #143229;
    --nat: #17936b;
    --lab: #4480c2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11191e;
  --surface: #18232a;
  --ice: #1d2a32;
  --ink: #e7edf1;
  --muted: #93a4ae;
  --line: #2b3a43;
  --accent: #2fbf8d;
  --accent-hover: #4fd3a4;
  --accent-ink: #0b1a14;
  --accent-soft: #143229;
  --nat: #17936b;
  --lab: #4480c2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--surface);
}
img { max-width: 100%; }

.container {
  max-width: 1040px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
ul { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

.lede { font-size: 1.14rem; color: var(--muted); max-width: 42em; }
.mono, .fig { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.kicker {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; padding-block: 13px; }
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .gem { color: var(--accent); margin-right: 6px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; margin-right: auto; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
}
.nav a:hover { color: var(--ink); background: var(--ice); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 10px 19px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-big { padding: 13px 26px; font-size: 1.02rem; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Bands ---------- */
.band { padding-block: 68px; }
.band-tight { padding-block: 46px; }
.band-ice { background: var(--ice); }
.hero { padding-block: 72px 60px; }
.section-head { max-width: 46em; margin-bottom: 32px; }

/* ---------- Stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 38px; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  min-width: 0;
}
.stat .label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 600; margin: 6px 0 4px; overflow-wrap: anywhere; }
.stat .context { font-size: 0.86rem; color: var(--muted); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  min-width: 0;
}
.card h3 { margin-top: 2px; }
.card p { color: var(--muted); margin-bottom: 0; }
a.card { text-decoration: none; color: var(--ink); display: block; }
a.card:hover { border-color: var(--accent); }
a.card .goto { color: var(--accent); font-weight: 600; font-size: 0.9rem; display: inline-block; margin-top: 12px; }

/* ---------- Price leaders (menu-style) ---------- */
.pricebook { max-width: 640px; }
.price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
}
.price-line .what { flex: 0 1 auto; min-width: 0; }
.price-line .dots { flex: 1 1 20px; border-bottom: 2px dotted var(--line); transform: translateY(-4px); min-width: 20px; }
.price-line .amt { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.price-line .amt.sub { font-weight: 400; color: var(--muted); }
.price-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.pricebook-note { font-size: 0.84rem; color: var(--muted); margin-top: 10px; }

/* ---------- Price tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.ptable { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
.ptable th {
  font-family: var(--body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--ice);
}
.ptable td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: none; }
.ptable .fig { white-space: nowrap; }
.ptable th.num, .ptable td.num { text-align: right; }

/* ---------- Range strips (drawn to one scale) ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 12px; font-size: 0.88rem; }
.legend .key { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.legend .swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.swatch-nat { background: var(--nat); }
.swatch-lab { background: var(--lab); }
.strips { display: grid; gap: 4px; min-width: 160px; }
.strip { position: relative; height: 8px; background: var(--ice); border-radius: 4px; }
.strip .band { position: absolute; top: 0; bottom: 0; border-radius: 4px; min-width: 4px; }
.band-nat { background: var(--nat); }
.band-lab { background: var(--lab); }
.scale-note { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); }

/* ---------- Estimator ---------- */
.est-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .est-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
select, input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.field { margin-bottom: 16px; min-width: 0; }
.hint { font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-top: 5px; }
.est-result { position: sticky; top: calc(74px + env(safe-area-inset-top, 0px)); }
.est-result .headline { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 4px 0 2px; overflow-wrap: anywhere; }
.est-result .sub { color: var(--muted); font-size: 0.9rem; }
.notice {
  border: 1px solid var(--line);
  background: var(--ice);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 10px; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-family: var(--mono); flex: none; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); }
.faq-item .faq-body p { margin-bottom: 0.6em; }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent); }
.cta-band h2 { color: var(--accent-ink); }
.cta-band p { color: var(--accent-ink); opacity: 0.85; margin: 0; }
.cta-band .btn { background: var(--surface); border-color: var(--surface); color: var(--ink); }
.cta-band .btn:hover { color: var(--accent); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-block: 50px; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 68px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding-block: 46px 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h4 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 9px; }
.site-foot a { color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.site-foot a:hover { color: var(--accent); }
.foot-brand p { color: var(--muted); font-size: 0.92rem; max-width: 30em; }
.foot-base {
  border-top: 1px solid var(--line);
  padding-block: 16px calc(22px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.84rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
