:root {
  --bg: #f7f3ec;
  --bg-soft: #f1ebe3;
  --ink: #1c1a17;
  --muted: #6b645c;
  --line: #ddd4c8;
  --accent: #b36d6d;
  --accent-soft: #f3e4e1;
  --panel: #fffcf8;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", "Segoe UI", sans-serif;
  --max: 1180px;
  --radius: 14px;
  --header-h: 4.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--max), calc(100% - 3.5rem));
  margin-inline: auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
}

.page-hero .breadcrumb {
  margin-bottom: 0.85rem;
}

/* Hero */
.hero {
  padding: 3.25rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy {
  max-width: 32rem;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.55rem, 4.2vw, 3.55rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.hero-lead {
  margin: 1.35rem 0 1.75rem;
  max-width: 26rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.75rem 1.45rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
}

.hero-secondary {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.hero-secondary:hover {
  color: var(--accent);
}

.text-link {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 500;
}

.text-link:hover {
  color: var(--ink);
}

/* Preview card */
.preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.15rem 1.2rem 1.05rem;
  box-shadow: 0 18px 40px -28px rgba(40, 28, 20, 0.35);
}

.preview-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

.preview-top h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.preview-meta {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-step {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.sign-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.sign-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
}

.sign-chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: var(--accent-soft);
  color: var(--ink);
}

.result-teaser {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid color-mix(in srgb, var(--line) 80%, white);
}

.result-teaser img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}

.result-teaser strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.result-teaser p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.preview-card .text-link {
  display: inline-block;
  margin-top: 0.95rem;
}

/* Sections */
.section {
  padding: 3.25rem 0;
}

.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.section-head p {
  margin: 0.65rem auto 0;
  max-width: 34rem;
  color: var(--muted);
}

/* How it works — editorial horizontal flow */
.how {
  border-block: 1px solid var(--line);
  padding: 2.75rem 0 2.5rem;
}

.how-inner {
  text-align: center;
}

.how h2 {
  margin: 0 0 1.75rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  color: var(--ink);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

.step:not(:last-child)::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 1px;
  margin-left: 1.05rem;
  margin-right: 1.05rem;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  flex: 0 0 auto;
  align-self: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 1.55rem;
  box-sizing: border-box;
  border: 1px solid #c17a76;
  border-radius: 50%;
  color: #c17a76;
  background: transparent;
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  /* optical center for serif digits */
  padding-top: 0.08em;
}

.step-label {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1.2;
}

.steps-note {
  text-align: center;
  margin: 1.35rem 0 0;
  color: var(--ink);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.calc-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: 0.35rem;
  align-items: start;
  min-height: 100%;
  padding: 1.15rem 1.1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.calc-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-1px);
}

.calc-card .calc-body {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  gap: 0.35rem;
}

.calc-icon {
  grid-column: 1;
  grid-row: 1;
  width: 48px;
  height: 48px;
  max-width: 48px;
  margin: 0;
  justify-self: center;
  object-fit: contain;
  object-position: center;
  color: var(--accent);
}

.calc-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.2;
}

.calc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.calc-card .more {
  margin-top: auto;
  padding-top: 0.85rem;
  color: var(--ink);
  font-size: 0.9rem;
}

.why {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0 0.5rem;
  border-top: 1px solid var(--line);
}

.why h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
}

.why-copy p {
  margin: 0 0 0.75rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.proof {
  margin: 0 0 1rem !important;
  color: var(--accent) !important;
  font-size: 0.95rem !important;
}

/* Page shell for Calculators / About */
.page-hero {
  padding: 3rem 0 1.5rem;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.page-hero p {
  margin: 0.85rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.prose {
  max-width: 40rem;
  color: var(--muted);
}

.prose p {
  margin: 0 0 1rem;
}

/* Mobile — page layout (header mobile nav lives in site-chrome.css) */
@media (max-width: 860px) {
  .hero {
    padding-top: 2rem;
  }

  .hero-grid,
  .calc-grid,
  .why {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.95rem;
    max-width: 22rem;
    margin-inline: auto;
  }

  .step:not(:last-child)::after {
    display: none;
  }

  .step-label {
    white-space: normal;
  }

  .result-teaser {
    grid-template-columns: 84px 1fr;
  }

  .hero-copy .btn-primary {
    width: auto;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 560px) {
  .container {
    width: min(var(--max), calc(100% - 1.5rem));
  }

  .calc-grid {
    gap: 0.65rem;
  }

  .calc-card {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 0.75rem;
    padding: 0.95rem 1rem;
  }

  .calc-icon {
    width: 40px;
    height: 40px;
    max-width: 40px;
  }

  .calc-card .more {
    display: none;
  }
}
