/* ==========================================================================
   Ted & Joe Premium Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Nunito:wght@400;500;600;700;800&display=swap');

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

:root {
  /* Warm Organic Palette */
  --cream:      #faf8f3;
  --cream-alt:  #f2ede2;
  --cream-dark: #e8e0d0;
  
  --ink:        #1c1a14;
  --ink-muted:  #4a4737;
  --ink-light:  #7a7567;
  
  --moss:       #2d6a4f;
  --moss-light: #d8ede2;
  --moss-dark:  #1b4332;
  
  --gold:       #b5760a;
  --gold-light: #fdf0d5;
  --gold-dark:  #8c5a04;
  
  --sky:        #185fa5;
  --sky-light:  #e6f1fb;
  --sky-dark:   #104477;
  
  --white:      #ffffff;
  --border:     rgba(28, 26, 20, 0.12);
  --border-focus: rgba(45, 106, 79, 0.4);
  --shadow-sm:  0 2px 8px rgba(28, 26, 20, 0.04);
  --shadow-md:  0 8px 30px rgba(28, 26, 20, 0.08);
  --shadow-lg:  0 16px 40px rgba(28, 26, 20, 0.12);
  
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  24px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Focus states for accessibility */
a:focus, button:focus, input:focus, select:focus {
  outline: 2px solid var(--moss);
  outline-offset: 2px;
}

a:focus:not(:focus-visible), button:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 2px;
}

/* Skip to content for accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--moss);
  color: var(--white);
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* ── UTILITIES ─────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.serif {
  font-family: 'Fraunces', serif;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.tag-moss { background: var(--moss-light); color: var(--moss); }
.tag-gold { background: var(--gold-light); color: var(--gold); }
.tag-sky  { background: var(--sky-light); color: var(--sky); }

/* ── HEADER & NAVIGATION ────────────────────────────────── */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
  transition: var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo span {
  color: var(--moss);
  font-style: italic;
  font-weight: 300;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  position: relative;
}

.nav-links a {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: none;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--moss);
}

.nav-cta {
  background: var(--moss);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 25px;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.15);
}

.nav-cta:hover {
  background: var(--moss-dark);
  transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* User avatar info in header */
.user-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-alt);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.user-avatar {
  font-size: 14px;
}
.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.btn-logout {
  background: transparent;
  border: none;
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  margin-left: 6px;
  text-decoration: underline;
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 30px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--moss);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--moss-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--ink-muted);
  background: rgba(28, 26, 20, 0.03);
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
}

.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(181, 118, 10, 0.2);
}

.btn-block {
  width: 100%;
}

/* ── LAYOUT SECTIONS ────────────────────────────────────── */
main {
  flex: 1;
}

section.hero {
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: var(--moss-light);
  opacity: 0.4;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--moss);
}

.hero-sub {
  font-size: 18px;
  color: var(--ink-muted);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero Stat Card */
.hero-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.hero-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: var(--cream-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid rgba(28, 26, 20, 0.05);
}

.stat-box .s-label {
  font-size: 11px;
  color: var(--ink-light);
  margin-bottom: 4px;
}

.stat-box .s-val {
  font-size: 24px;
  font-weight: 700;
  font-family: 'Fraunces', serif;
}

.stat-box .s-val.green { color: var(--moss); }
.stat-box .s-val.gold  { color: var(--gold); }

/* ── GRID CARD LISTS ────────────────────────────────────── */
.section-head {
  text-align: center;
  margin-bottom: 4rem;
}

.section-head h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--ink-muted);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--moss);
  box-shadow: var(--shadow-md);
}

.tool-card:active {
  transform: translateY(-2px);
}

.tool-card-icon {
  font-size: 32px;
  margin-bottom: 1.25rem;
}

.tool-card h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.tool-card p {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tool-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.tool-badge.free { background: var(--moss-light); color: var(--moss); }
.tool-badge.premium { background: var(--gold-light); color: var(--gold-dark); }

/* ── CALCULATORS PAGE ───────────────────────────────────── */
.calculator-page {
  padding: 4rem 0 6rem;
}

.calculator-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 3rem;
  margin-bottom: 4rem;
}

.calculator-intro-wrap {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.calculator-intro-wrap h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.calculator-intro-wrap p {
  color: var(--ink-muted);
  font-size: 16px;
  max-width: 720px;
}

/* Form inputs & controls */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 3rem;
  margin-bottom: 2rem;
}

.control-field {
  display: flex;
  flex-direction: column;
}

.control-field label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-light);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.control-field label span.value-label {
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
}

/* Custom sliders */
.range-wrap {
  display: flex;
  align-items: center;
  gap: 15px;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex-grow: 1;
  height: 6px;
  background: var(--cream-alt);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--moss);
}

input[type=number], select {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}

input[type=number]:focus, select:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px var(--border-focus);
}

/* Toggle selector groups */
.toggle-group {
  display: flex;
  gap: 8px;
}

.toggle-btn {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* Output Metrics Grid */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--cream-alt);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(28, 26, 20, 0.05);
}

.metric-card .ml {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-light);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.metric-card .mv {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
}

.mv-blue { color: var(--sky); }
.mv-green { color: var(--moss); }
.mv-gold { color: var(--gold); }

/* Charts container */
.chart-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2.5rem 0;
  background: var(--white);
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 320px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-light);
  justify-content: center;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ldot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* Amortization/Yearly Table styling */
.table-section {
  margin-top: 3rem;
}

.table-section h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  margin-bottom: 1rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
}

table.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: right;
  min-width: 650px;
}

table.result-table th {
  background: var(--cream-alt);
  color: var(--ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

table.result-table th:first-child, table.result-table td:first-child {
  text-align: left;
}

table.result-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(28, 26, 20, 0.05);
}

table.result-table tbody tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  background: var(--cream-alt);
}

table.result-table tbody tr:hover td {
  background: rgba(45, 106, 79, 0.02);
}

.td-blue { color: var(--sky); }
.td-green { color: var(--moss); }
.td-red { color: #c0392b; }

/* ── PREMIUM GATES ──────────────────────────────────────── */
.premium-gate-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(253, 240, 213, 0.2);
  margin-top: 2rem;
}

.premium-gate-icon {
  font-size: 64px;
  margin-bottom: 1.5rem;
}

.premium-gate-container h2 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  margin-bottom: 1rem;
}

.premium-gate-container p {
  color: var(--ink-muted);
  max-width: 500px;
  margin-bottom: 2rem;
}

/* ── MODALS (NATIVE DIALOGS) ──────────────────────────────── */
dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  max-width: 520px;
  width: 90%;
  margin: auto;
  box-shadow: var(--shadow-lg);
  background: var(--cream);
  outline: none;
}

dialog::backdrop {
  background-color: rgba(28, 26, 20, 0.6);
  backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.dialog-header h3 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
}

.dialog-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink-light);
  line-height: 1;
}

.dialog-close:hover {
  color: var(--ink);
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 6px;
}

.dialog-footer {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

/* Premium lock cards */
.lock-promo-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.lock-promo-box h4 {
  font-family: 'Fraunces', serif;
  margin-bottom: 6px;
}
.lock-promo-box p {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ── ARTICLES & TRUSTS (HOMEPAGE) ────────────────────────── */
.trusts-section {
  padding: 5rem 0;
  background: var(--cream-alt);
}

.trusts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.trust-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.trust-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.trust-card:active {
  transform: translateY(0);
}

.trust-ticker {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--moss);
}

.trust-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.trust-desc {
  font-size: 12px;
  color: var(--ink-light);
  flex-grow: 1;
}

.trust-yield {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--moss);
  border-top: 1px solid rgba(28, 26, 20, 0.05);
  padding-top: 8px;
  margin-top: 8px;
}

.articles-section {
  padding: 5rem 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.article-card:active {
  transform: translateY(-2px);
}

.article-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: var(--cream-alt);
}

.article-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-body h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 600;
  margin: 0.5rem 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.article-body p {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ── FOOTER & NEWSLETTER ────────────────────────────────── */
.newsletter-banner {
  background: var(--moss);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 6rem;
  box-shadow: var(--shadow-lg);
}

.newsletter-text h2 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  margin-bottom: 0.5rem;
}

.newsletter-text p {
  color: rgba(255, 255, 255, 0.8);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter-form input {
  padding: 12px 20px;
  border-radius: 25px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  outline: none;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
  padding: 12px 24px;
  border-radius: 25px;
  border: none;
  background: var(--gold);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: var(--gold-dark);
}

footer.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding: 4rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  color: var(--white);
}

.footer-brand p {
  font-size: 13px;
  margin-top: 1rem;
  max-width: 250px;
}

.footer-col h4 {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 12px;
}

.footer-bottom .disclaimer {
  max-width: 650px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
}

/* ── RESPONSIVE DESIGN ─────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 3rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--cream-alt);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    padding: 6rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--border);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    width: 100%;
    text-align: left;
  }
  
  .nav-links a {
    font-size: 16px;
    padding: 12px 16px;
    display: block;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--ink-muted);
    font-weight: 700;
  }

  .nav-links a:hover {
    background: var(--cream-dark);
    color: var(--moss);
    padding-left: 22px;
  }
  
  .nav-cta {
    width: 100%;
    max-width: 200px;
  }
  
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .hero::before,
  .hero::after {
    opacity: 0.3;
  }
  
  .hero-sub {
    margin: 0 auto 2.5rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-card {
    padding: 2rem;
  }
  
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .section-head h2 {
    font-size: 28px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .controls-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .metrics-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .chart-card {
    padding: 1.5rem;
  }
  
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .newsletter-banner {
    flex-direction: column;
    text-align: center;
    padding: 3rem 2rem;
  }
  
  .newsletter-form {
    width: 100%;
    max-width: 400px;
  }
  
  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
  
  /* Overlay for mobile menu */
  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 17, 13, 0.6);
    z-index: 999;
  }

  .mobile-overlay.active {
    display: block;
    pointer-events: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 4rem 0 3rem;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero-sub {
    font-size: 16px;
  }
  
  .hero-card {
    padding: 1.5rem;
  }
  
  .stat-row {
    grid-template-columns: 1fr;
  }
  
  .stat-box .s-val {
    font-size: 20px;
  }
  
  .tool-card {
    padding: 1.75rem;
  }
  
  .tool-card-icon {
    font-size: 28px;
  }
  
  .calculator-wrapper {
    padding: 2rem 1.5rem;
  }
  
  .metrics-row {
    grid-template-columns: 1fr;
  }
  
  table.result-table {
    font-size: 12px;
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  
  dialog {
    padding: 2rem 1.5rem;
    width: 95%;
  }
  
  .premium-gate-container {
    padding: 3rem 1.5rem;
  }
  
  .nav-links {
    width: 100%;
    max-width: none;
  }
}

/* About Grid & Profile Card Style Improvements */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

.brand-card {
  background: var(--ink) !important;
  color: var(--cream) !important;
  border: 1px solid var(--gold) !important;
  position: relative;
  overflow: hidden;
}

.brand-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gold);
}

.brand-card h2.serif {
  font-size: 82px;
  color: var(--gold) !important;
  line-height: 1;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  letter-spacing: -2px;
  margin-bottom: 0.5rem;
}

.brand-card h2.serif span {
  color: var(--cream-dark) !important;
  font-style: italic;
  font-weight: 300;
}

.brand-card .divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto 1.25rem;
}

.brand-card p {
  font-size: 14px;
  color: var(--cream-dark) !important;
  line-height: 1.6;
  font-weight: 500;
}

/* Premium vs Free comparison styling */
.comparison-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.comparison-table-wrapper {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-top: 2rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
}

.comparison-table th {
  padding: 1.25rem 1rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
  border-bottom: 2px solid var(--border);
}

.comparison-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .feature-title {
  font-weight: 700;
  color: var(--ink);
}

.comparison-table .feature-desc {
  display: block;
  font-size: 12px;
  color: var(--ink-light);
  font-weight: 400;
  margin-top: 2px;
}

.comparison-table .center-col {
  text-align: center;
  width: 120px;
}

.comparison-table .check-yes {
  color: var(--moss);
  font-weight: 700;
}

.comparison-table .check-premium {
  color: var(--gold);
  font-weight: 700;
}

.comparison-table .check-no {
  color: var(--ink-light);
  font-size: 13px;
}

.comparison-cta-wrap {
  margin-top: 3rem;
  text-align: center;
}

.comparison-cta-wrap p {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 0.75rem;
}

/* Story section illustration styling */
.story-illustration {
  margin-top: 2.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  max-width: 500px;
}

@media (max-width: 768px) {
  .story-illustration {
    margin: 2.5rem auto 0;
  }
}
