/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --ink: #1a1d23;
  --charcoal: #2d3339;
  --muted: #5b6470;
  --line: #e2e5e9;
  --bg: #f7f7f5;
  --white: #ffffff;
  --brand: #c2540a;
  --brand-dark: #9c4108;
  --brand-light: #fdece0;
  --success: #15803d;
  --success-bg: #ecfdf3;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --shadow: 0 12px 28px rgba(26, 29, 35, 0.08);
  --radius: 10px;
  --max-width: 1120px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

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

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

a:hover {
  text-decoration: underline;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--white);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  color: var(--charcoal);
  font-weight: 500;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--charcoal);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding: 8px 20px 16px;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  padding: 10px 0;
  color: var(--charcoal);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

@media (min-width: 800px) {
  .main-nav {
    display: flex;
  }
  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 20px 0;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span[aria-current] {
  color: var(--ink);
}

/* ============================================================
   Hero / page sections
   ============================================================ */
.page-hero {
  padding: 40px 0 24px;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.page-hero .lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 64ch;
}

.section {
  padding: 32px 0;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ============================================================
   Skeleton / coming-soon notice (removed once real content ships)
   ============================================================ */
.coming-soon {
  background: var(--brand-light);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--charcoal);
}

/* ============================================================
   Category grid (calculators hub, footer links)
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--ink);
}

.category-card:hover {
  border-color: var(--brand);
  text-decoration: none;
}

.category-card h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.category-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================================
   Calculator widget (generic shell reused by every cost page)
   ============================================================ */
.calculator-widget {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.calculator-widget .field-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .calculator-widget .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.calculator-result {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}

.calculator-result .result-figure {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.calculator-source-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
}

/* ============================================================
   Cost breakdown table
   ============================================================ */
.cost-breakdown {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.cost-breakdown th,
.cost-breakdown td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.cost-breakdown th {
  color: var(--muted);
  font-weight: 600;
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--brand);
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  padding-bottom: 14px;
  color: var(--charcoal);
}

/* ============================================================
   Forms (contact form, lead forms)
   ============================================================ */
.form-card {
  max-width: 560px;
}

.form-error,
.form-success {
  display: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 12px;
}

.form-error.is-visible {
  display: block;
  background: var(--error-bg);
  color: var(--error);
}

.form-success.is-visible {
  display: block;
  background: var(--success-bg);
  color: var(--success);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--charcoal);
  color: #cfd3d8;
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-inner h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.footer-inner a {
  color: #cfd3d8;
}

.footer-inner li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  font-size: 0.8rem;
  color: #9aa1a9;
}

.footer-bottom .container {
  max-width: var(--max-width);
}
