/* ================================================================
   PhotoCalc - Premium Light Theme with Warm Coral Creative Feel
   Redesigned 2026-03-24 | photo.wellerdeveler.com
   ================================================================ */

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ── CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
  /* Brand - Warm Coral creative palette */
  --primary: #e8614d;
  --primary-dark: #d44a36;
  --primary-light: #f07e6d;
  --primary-glow: rgba(232, 97, 77, 0.15);
  --secondary: #f4845f;
  --accent: #f7a072;
  --accent-muted: rgba(232, 97, 77, 0.08);

  /* Surfaces - Warm cream light mode */
  --bg-0: #faf9f7;
  --bg-1: #f5f3ef;
  --bg-2: #eeeae4;
  --bg-3: #e6e0d8;
  --bg-card: #ffffff;
  --bg-card-hover: #fdfcfb;
  --bg-elevated: #ffffff;

  /* Text hierarchy */
  --text: #1a1614;
  --text-secondary: #5c534a;
  --text-muted: #8c8078;
  --text-dim: #b0a498;

  /* Borders */
  --border: rgba(140, 100, 70, 0.08);
  --border-mid: rgba(140, 100, 70, 0.14);
  --border-strong: rgba(232, 97, 77, 0.25);

  /* Semantic */
  --success: #16a34a;
  --success-muted: rgba(22, 163, 74, 0.1);
  --warning: #ea580c;
  --danger: #dc2626;
  --danger-muted: rgba(220, 38, 38, 0.1);

  /* Shadows - warm rose-tinted, multi-layer */
  --shadow-sm:
    0 1px 2px rgba(140, 100, 70, 0.05),
    0 1px 3px rgba(140, 100, 70, 0.04);
  --shadow-md:
    0 1px 2px rgba(140, 100, 70, 0.04),
    0 2px 4px rgba(140, 100, 70, 0.04),
    0 4px 8px rgba(140, 100, 70, 0.03),
    0 8px 16px rgba(140, 100, 70, 0.02);
  --shadow-lg:
    0 1px 2px rgba(140, 100, 70, 0.04),
    0 2px 4px rgba(140, 100, 70, 0.03),
    0 4px 8px rgba(140, 100, 70, 0.03),
    0 8px 16px rgba(140, 100, 70, 0.02),
    0 16px 32px rgba(140, 100, 70, 0.02);
  --shadow-glow: 0 0 20px rgba(232, 97, 77, 0.08), 0 0 40px rgba(232, 97, 77, 0.03);

  /* Layout */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --max-width: 1200px;

  /* Typography - DM Serif Display for editoral/creative feel */
  --font-display: 'DM Serif Display', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --timing-fast: 150ms;
  --timing-normal: 250ms;
  --timing-slow: 350ms;
}

/* ── DARK MODE ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-0: #0f0d0b;
  --bg-1: #161311;
  --bg-2: #1e1a17;
  --bg-3: #262220;
  --bg-card: #1a1714;
  --bg-card-hover: #1e1b18;
  --bg-elevated: #1e1a17;
  --text: #f0ebe6;
  --text-secondary: #b0a498;
  --text-muted: #786c60;
  --text-dim: #504840;
  --border: rgba(232, 97, 77, 0.06);
  --border-mid: rgba(232, 97, 77, 0.12);
  --border-strong: rgba(232, 97, 77, 0.22);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:
    0 1px 2px rgba(0,0,0,0.2),
    0 2px 4px rgba(0,0,0,0.15),
    0 4px 8px rgba(0,0,0,0.12);
  --shadow-lg:
    0 2px 4px rgba(0,0,0,0.15),
    0 4px 8px rgba(0,0,0,0.12),
    0 8px 16px rgba(0,0,0,0.10),
    0 16px 32px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 20px rgba(232, 97, 77, 0.12);
}

/* ── BASE ──────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper-like grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

a { color: var(--primary); text-decoration: none; transition: color var(--timing-fast) var(--ease-smooth); }
a:hover { color: var(--primary-dark); }

/* ── SKIP LINK (a11y) ──────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* ── NAVIGATION ────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .site-nav {
  background: rgba(15, 13, 11, 0.9);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-brand span {
  color: var(--text);
}

/* Camera aperture icon */
.nav-brand::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  flex-shrink: 0;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--timing-fast) var(--ease-smooth);
  letter-spacing: 0.005em;
}
.nav-links a:hover { background: var(--bg-2); color: var(--text); }
.nav-links a.active {
  background: var(--accent-muted);
  color: var(--primary);
  font-weight: 600;
}

.nav-right { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: var(--bg-1);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--timing-fast) var(--ease-smooth);
  font-size: 1.125rem;
  line-height: 1;
}
.theme-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── HERO ──────────────────────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 88px;
  text-align: center;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

/* Warm creative glow */
.page-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(232, 97, 77, 0.06) 0%, rgba(244, 132, 95, 0.03) 40%, transparent 70%);
  pointer-events: none;
}

/* Secondary mesh */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(247, 160, 114, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(232, 97, 77, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero .overline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  color: var(--text);
}

/* Coral underline accent on hero heading */
.page-hero h1 span.highlight {
  color: var(--primary);
  position: relative;
}
.page-hero h1 span.highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.page-hero p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.65;
}

/* Category chips in hero */
.hero-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  position: relative;
  z-index: 1;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--timing-fast) var(--ease-smooth);
  text-decoration: none;
}
.hero-chip:hover {
  background: var(--accent-muted);
  border-color: var(--border-strong);
  color: var(--primary);
}
.hero-chip svg { width: 14px; height: 14px; }

/* ── SCROLL PROGRESS ───────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 101;
  transition: width 50ms linear;
}

/* ── AD ────────────────────────────────────────────────── */
.ad-banner {
  background: var(--bg-1);
  border: 1px dashed var(--border-mid);
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.8rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-wrap { max-width: var(--max-width); margin: 24px auto; padding: 0 24px; }

/* ── MAIN ──────────────────────────────────────────────── */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── SECTION HEADERS ───────────────────────────────────── */
.category-section { margin-bottom: 56px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* Decorative accent bar before section titles */
.section-title::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin-right: 12px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
  padding-left: 36px;
}

/* ── CALCULATOR CARD GRID ──────────────────────────────── */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  transition: all var(--timing-normal) var(--ease-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.calc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-strong);
}

/* Arrow indicator on hover */
.calc-card::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: all var(--timing-normal) var(--ease-smooth);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8614d' stroke-width='2'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.calc-card:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.calc-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
}

.calc-card-content h3 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.calc-card-content p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 240px;
}

/* ── CALCULATOR LAYOUT (inner pages) ───────────────────── */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.calc-layout.single { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.calc-layout.wide { grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; }

/* ── CARD COMPONENT ────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.card-header {
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-header h2 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
}
.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
}
.card-body { padding: 24px; }

/* ── FORM ELEMENTS ─────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.input-wrap { position: relative; }
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
}
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }
.has-prefix input { padding-left: 30px; }
.has-suffix input { padding-right: 38px; }

input[type="number"],
input[type="text"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-0);
  transition: border-color var(--timing-fast) var(--ease-smooth),
              box-shadow var(--timing-fast) var(--ease-smooth);
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238c8078' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
  cursor: pointer;
}

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--timing-fast) var(--ease-smooth);
  text-decoration: none;
  border: none;
  min-height: 44px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 97, 77, 0.25), var(--shadow-sm);
}
.btn-secondary {
  background: var(--bg-1);
  color: var(--text);
  border: 1.5px solid var(--border-mid);
}
.btn-secondary:hover { background: var(--bg-2); }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ── TOGGLE GROUP ──────────────────────────────────────── */
.toggle-group {
  display: flex;
  background: var(--bg-0);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  margin-bottom: 20px;
}
.toggle-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--timing-fast) var(--ease-smooth);
  font-family: var(--font-body);
}
.toggle-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ── RESULT PANEL ──────────────────────────────────────── */
.result-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.result-headline {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  padding: 24px;
  text-align: center;
  position: relative;
}
.result-headline::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}
.result-headline .label {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.result-headline .amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.result-headline .sub {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: 6px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.result-item {
  background: var(--bg-card);
  padding: 16px 20px;
}
.r-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.r-value {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}
.r-value.primary { color: var(--primary); }
.r-value.secondary { color: var(--secondary); }
.r-value.success { color: var(--success); }
.r-value.danger { color: var(--danger); }

/* ── RESULT ACTIONS ────────────────────────────────────── */
.result-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.btn-copy, .btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-mid);
  background: var(--bg-1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--timing-fast) var(--ease-smooth);
  white-space: nowrap;
}
.btn-copy:hover, .btn-share:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-copy.copied {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ── INFO BOX ──────────────────────────────────────────── */
.info-box {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.info-box.warning { border-left-color: var(--warning); }
.info-box.tip { border-left-color: var(--secondary); }

/* ── BREADCRUMB ────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-dim); }

/* ── APERTURE VISUAL ───────────────────────────────────── */
.aperture-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.aperture-circle {
  border-radius: 50%;
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s var(--ease-smooth);
}

/* ── SEO CONTENT ───────────────────────────────────────── */
.seo-content {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.seo-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 16px;
}
.seo-content h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  margin: 24px 0 8px;
}
.seo-content p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
  max-width: 65ch;
}
.seo-content ul, .seo-content ol {
  color: var(--text-secondary);
  margin-left: 24px;
  margin-bottom: 12px;
  line-height: 1.7;
}
.seo-content li { margin-bottom: 4px; }

/* ── AFFILIATE SECTION ─────────────────────────────────── */
.affiliate-section-wrap {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
}
.affiliate-inner { max-width: var(--max-width); margin: 0 auto; }
.affiliate-heading {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 16px;
}
.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.aff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--timing-normal) var(--ease-smooth);
  display: block;
}
.aff-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.aff-card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--primary);
}
.aff-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.55;
}
.aff-card-btn {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 6px;
}
.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--timing-fast);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--primary); }

/* ── TABLES ────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  background: var(--bg-1);
  padding: 10px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-1); }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── PROGRESS BAR ──────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--bg-2);
  border-radius: var(--radius-full);
  height: 10px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s var(--ease-smooth);
}

/* ── UTILITY ───────────────────────────────────────────── */
.hidden { display: none !important; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 32px; }
.text-center { text-align: center; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-purple { background: rgba(232, 97, 77, 0.1); color: var(--primary); }
.badge-green { background: var(--success-muted); color: var(--success); }

/* ── ANIMATIONS ────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-panel:not(.hidden) { animation: fadeSlideUp var(--timing-slow) var(--ease-smooth) both; }
.result-item { animation: fadeSlideUp var(--timing-slow) var(--ease-smooth) both; }
.result-item:nth-child(1) { animation-delay: 0.05s; }
.result-item:nth-child(2) { animation-delay: 0.10s; }
.result-item:nth-child(3) { animation-delay: 0.15s; }
.result-item:nth-child(4) { animation-delay: 0.20s; }

/* Scroll-triggered fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .calc-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 56px 20px 64px; }
  .section-subtitle { padding-left: 0; }
  .calc-card::after { display: none; }
}

@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .main-content { padding: 24px 16px 48px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-chips { gap: 8px; }
}
