/* ==========================================================================
   IndiaPropertyCalc — Design System
   Shared token system with thesalarycalc.com / thetimecalc.com
   ========================================================================== */

:root {
  --paper: #f7f7f6;
  --paper-raised: #fff;
  --ink: #1c1e20;
  --ink-soft: #55585c;
  --line: #e3e3e1;
  --line-strong: #c9c9c6;
  --accent: #3d6b94;
  --accent-deep: #1f3a54;
  --teal: #0f6e56;
  --warn: #8c3b2e;
  --radius: 3px;
  --max-w: 1120px;

  --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.85rem + 1.8vw, 3.25rem);
  --step-4: clamp(2.75rem, 2.1rem + 2.8vw, 4.25rem);

  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "system-ui", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
}

.skip-link {
  background: var(--ink);
  color: var(--paper);
  z-index: 100;
  border-radius: var(--radius);
  padding: 12px 20px;
  position: absolute;
  top: 0;
  left: -9999px;
}
.skip-link:focus {
  top: 16px;
  left: 16px;
}

/* ---------- Header (shared across the network) ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 20px;
}

.site-header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header__dot { color: var(--accent); }

.site-header__nav {
  display: flex;
  gap: 32px;
}

.site-header__nav a {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.site-header__nav a:hover,
.site-header__nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: 0.2s ease;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after { content: ""; position: absolute; top: 6px; }

@media (max-width: 640px) {
  .site-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 12px 16px;
  }
  .site-header__nav.is-open { display: flex; }
  .site-header__nav a { padding: 10px 4px; font-size: 0.875rem; }
  .nav-toggle { display: block; }
  .site-header__inner { position: relative; }
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding-block: 56px 40px;
}

.hero h1 {
  font-size: var(--step-4);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.05;
  max-width: 18ch;
  margin-inline: auto;
}

.hero__sub {
  font-size: var(--step-1);
  color: var(--ink-soft);
  margin-top: 16px;
  max-width: 46ch;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }

.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Section headings ---------- */

.section { padding-block: 56px; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: none; }

.section-head { margin-bottom: 28px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- Calculator grid ---------- */

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.calc-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease;
}
.calc-card:hover { border-color: var(--accent); }

.calc-card .calc-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: block;
}

.calc-card h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.calc-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Calculator tool ---------- */

.calc-tool {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.calc-tool-body { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .calc-tool-body { grid-template-columns: 1fr; } }

.calc-inputs { padding: 28px; border-right: 1px solid var(--line); }
@media (max-width: 800px) {
  .calc-inputs { border-right: none; border-bottom: 1px solid var(--line); }
}

.calc-results { padding: 28px; background: var(--paper); }

.field { margin-bottom: 22px; }

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

.field .hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 107, 148, 0.14);
}

.currency-input { position: relative; }
.currency-input::before {
  content: "\20B9";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.currency-input input { padding-left: 30px; }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill label {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
  background: var(--paper);
  transition: all 0.15s ease;
}
.radio-pill input:checked + label {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Results breakdown */

.result-total { margin-bottom: 24px; }
.result-total .label { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }
.result-total .amount {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.6rem);
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.result-total .amount-words { font-size: 0.82rem; color: var(--ink-soft); }

.breakdown { border-top: 1px solid var(--line); padding-top: 16px; }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--line);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row .row-label { color: var(--ink-soft); }
.breakdown-row .row-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.breakdown-row.is-total {
  border-top: 1px solid var(--line);
  border-bottom: none;
  padding-top: 14px;
  margin-top: 4px;
}
.breakdown-row.is-total .row-label { color: var(--ink); font-weight: 700; }
.breakdown-row.is-total .row-value { font-size: 1.05rem; }

.updated-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.updated-note .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal); flex-shrink: 0;
}

/* ---------- Disclaimer ---------- */

.disclaimer {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 24px;
}

/* ---------- FAQ ---------- */

.faq-item { border-bottom: 1px solid var(--line); padding-block: 16px; }
.faq-item h3 { font-size: 0.98rem; margin-bottom: 8px; font-weight: 600; }
.faq-item p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.7; }

/* ---------- Footer (shared across the network) ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding-block: 48px 32px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.site-footer__name { font-weight: 700; }
.site-footer__tagline { color: var(--ink-soft); margin-top: 4px; font-size: 0.9375rem; }

.site-footer__heading {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 12px;
  font-size: 0.8125rem;
}

.site-footer__links { display: flex; flex-direction: column; gap: 8px; }
.site-footer__links a { color: var(--ink); font-size: 0.9375rem; text-decoration: none; }
.site-footer__links a:hover { color: var(--accent); }

.site-footer__bottom {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-top: 24px;
}
.site-footer__copyright,
.site-footer__credit { color: var(--ink-soft); font-size: 0.8125rem; }
.site-footer__credit a { color: var(--ink-soft); text-decoration: underline; }
.site-footer__credit a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}
