/* ============================================================
   DiscountBoom — design tokens & styles (v2 visual refresh,
   Nov 19, 2026). Warm ivory + navy + sky + gold. Built for
   senior readers: larger type, strong contrast, big targets.
   Light mode only by explicit brand requirement.
   ============================================================ */

:root {
  /* Type scale (fluid clamp) — bumped up a notch for 55+ readers */
  --text-xs: clamp(0.875rem, 0.84rem + 0.2vw, 0.95rem);
  --text-sm: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  --text-base: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
  --text-lg: clamp(1.3rem, 1.18rem + 0.6vw, 1.6rem);
  --text-xl: clamp(1.7rem, 1.45rem + 1.1vw, 2.4rem);
  --text-2xl: clamp(2.2rem, 1.6rem + 2.4vw, 3.5rem);
  --text-3xl: clamp(2.7rem, 1.5rem + 4vw, 4.7rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  /* Warm ivory neutrals + ULTALIFE navy/sky + savings gold */
  --color-bg: #faf7f1;
  --color-surface: #ffffff;
  --color-surface-2: #f7f2e9;
  --color-surface-offset: #f0e9da;
  --color-divider: #e4dac6;
  --color-border: #d3c7a9;

  --color-text: #1c2430;
  --color-text-muted: #49536a;
  --color-text-faint: #6d7688;
  --color-text-inverse: #f5fafd;

  --color-primary: #164e70;
  --color-primary-hover: #123f5a;
  --color-primary-active: #0d3a56;
  --color-primary-highlight: #dbe9f1;

  --color-secondary: #3eafe1;
  --color-secondary-hover: #2b98c8;
  --color-secondary-highlight: #d9f0fa;

  --color-navy: #0d3a56;

  --color-gold: #9a6a06;
  --color-gold-bright: #f5c04a;
  --color-gold-highlight: #f7e8c8;

  --color-success: #1f7a4d;
  --color-success-highlight: #d9efe3;
  --color-warning: #8a5f06;
  --color-warning-highlight: #f7e8c8;
  --color-error: #a3324a;
  --color-error-highlight: #f2dbe1;

  --radius-sm: 0.5rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-full: 9999px;

  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 3px rgba(43, 36, 20, 0.08);
  --shadow-md: 0 8px 24px rgba(43, 36, 20, 0.12);
  --shadow-lg: 0 20px 48px rgba(13, 40, 60, 0.22);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1240px;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* ---------------- Layout basics ---------------- */
.wrap { max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6); }
.wrap-narrow { max-width: var(--content-narrow); margin-inline: auto; padding-inline: var(--space-6); }
.wrap-default { max-width: var(--content-default); margin-inline: auto; padding-inline: var(--space-6); }

section { padding-block: clamp(var(--space-12), 6vw, var(--space-24)); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-navy); font-weight: 700; }
h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--text-lg); }
p { color: var(--color-text-muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-primary); background: var(--color-primary-highlight);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-full);
  border: 2px solid transparent; white-space: nowrap; min-height: 48px;
}
.btn-primary { background: var(--color-secondary); color: var(--color-navy); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-secondary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-primary); }
.btn-outline:hover { border-color: var(--color-primary); background: var(--color-primary-highlight); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 247, 241, 0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: var(--space-4); }
.logo { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: 800; font-size: var(--text-lg); color: var(--color-navy); text-decoration: none; }
.logo svg { width: 38px; height: 38px; flex-shrink: 0; }
.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav a { color: var(--color-text-muted); text-decoration: none; font-weight: 600; font-size: var(--text-sm); }
.site-nav a:hover { color: var(--color-primary); }
.nav-links { display: flex; gap: var(--space-6); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ---------------- Hero (deep navy cover) ---------------- */
.hero {
  background:
    radial-gradient(720px 340px at 88% -60px, rgba(62, 175, 225, 0.35), transparent 65%),
    radial-gradient(560px 300px at -80px 110%, rgba(245, 192, 74, 0.16), transparent 60%),
    linear-gradient(135deg, #0a2f47 0%, var(--color-navy) 46%, var(--color-primary) 100%);
  padding-top: clamp(var(--space-12), 7vw, var(--space-20));
  padding-bottom: clamp(var(--space-12), 6vw, var(--space-16));
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-12); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .eyebrow { background: rgba(255, 255, 255, 0.12); color: var(--color-gold-bright); }
.hero h1 { font-size: var(--text-3xl); letter-spacing: -0.01em; margin-block: var(--space-4); color: #ffffff; }
.hero h1 .accent { color: var(--color-gold-bright); }
.hero-sub { font-size: var(--text-lg); max-width: 52ch; margin-bottom: var(--space-6); color: #d7e6ef; }
.hero-stats { display: flex; gap: var(--space-4); margin-top: var(--space-8); flex-wrap: wrap; }
.hero-stat {
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5);
}
.hero-stat b { display: block; font-family: var(--font-display); font-size: var(--text-xl); color: #ffffff; }
.hero-stat span { font-size: var(--text-xs); color: #a9c6d8; text-transform: uppercase; letter-spacing: 0.05em; }

.hero-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-top: 5px solid var(--color-gold-bright);
  border-radius: var(--radius-xl); padding: var(--space-8); box-shadow: var(--shadow-lg); position: relative;
}
.hero-card h3 { margin-bottom: var(--space-2); }
.hero-card p { font-size: var(--text-sm); margin-bottom: var(--space-5); }
.form-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.form-row input[type="email"] {
  flex: 1 1 200px; min-width: 0; padding: var(--space-3) var(--space-4); min-height: 48px;
  border: 2px solid var(--color-border); border-radius: var(--radius-full); font-size: var(--text-sm);
  background: var(--color-surface-2);
}
.form-row input[type="email"]:focus { border-color: var(--color-secondary); outline: none; }
.form-note { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-3); margin-bottom: 0; }
.form-status { font-size: var(--text-sm); margin-top: var(--space-3); min-height: 1.2em; }
.form-status.success { color: var(--color-success); font-weight: 700; }
.form-status.error { color: var(--color-error); font-weight: 600; }

/* ---------------- Insight banner ---------------- */
.insight-banner {
  background: linear-gradient(120deg, var(--color-navy), var(--color-primary));
  color: var(--color-text-inverse); border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10); display: flex; gap: var(--space-6); align-items: flex-start;
  margin-block: var(--space-4); box-shadow: var(--shadow-md);
}
.insight-banner .icon {
  font-size: 1.7rem; flex-shrink: 0; line-height: 1;
  background: var(--color-gold-bright); border-radius: 50%;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
}
.insight-banner h3 { color: #fff; margin-bottom: var(--space-2); }
.insight-banner p { color: #d7e6ef; max-width: 68ch; }
@media (max-width: 640px) { .insight-banner { flex-direction: column; padding: var(--space-6); } }

/* ---------------- Filters ---------------- */
.filters-section { background: var(--color-surface-offset); }
.filters-bar {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  padding: var(--space-6); box-shadow: var(--shadow-md); margin-bottom: var(--space-8);
}
.filters-top { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.search-input, .zip-input, .state-select {
  padding: var(--space-3) var(--space-4); border: 2px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--text-sm); background: var(--color-surface-2); min-height: 48px;
}
.search-input { flex: 2 1 240px; }
.zip-input { flex: 1 1 140px; }
.state-select { flex: 1 1 180px; }
.search-input:focus, .zip-input:focus, .state-select:focus { border-color: var(--color-secondary); outline: none; }
.location-note { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-3); }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); border: 2px solid var(--color-border);
  background: var(--color-surface); font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted);
  min-height: 44px;
}
.chip:hover { border-color: var(--color-secondary); }
.chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.results-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-5); flex-wrap: wrap; gap: var(--space-2); }
.results-count { font-weight: 700; color: var(--color-navy); font-size: var(--text-base); }
.reset-link { font-size: var(--text-sm); color: var(--color-primary); font-weight: 600; text-decoration: underline; }

/* ---------------- Cards grid ---------------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-6); }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--space-3);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-secondary); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.card-brand { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--color-navy); line-height: 1.25; }
.card-cat { font-size: var(--text-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.card-discount { font-size: var(--text-base); font-weight: 700; color: var(--color-text); line-height: 1.45; }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.badge { font-size: var(--text-xs); font-weight: 700; padding: var(--space-2) var(--space-3); border-radius: var(--radius-full); }
.badge-age { background: var(--color-primary-highlight); color: var(--color-primary); }
.badge-membership { background: var(--color-warning-highlight); color: var(--color-warning); }
.badge-status-confirmed { background: var(--color-success-highlight); color: var(--color-success); }
.badge-status-changed { background: var(--color-warning-highlight); color: var(--color-warning); }
.badge-status-marginal { background: #ece7f5; color: #5a3fa0; }
.badge-region { background: var(--color-surface-2); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.card-notes { font-size: var(--text-sm); color: var(--color-text-muted); flex-grow: 1; line-height: 1.65; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); border-top: 1px solid var(--color-divider); padding-top: var(--space-3); }
.card-source { font-size: var(--text-xs); color: var(--color-text-faint); text-decoration: none; }
.card-source:hover { color: var(--color-primary); text-decoration: underline; }
.no-results { text-align: center; padding: var(--space-16) var(--space-6); color: var(--color-text-faint); font-size: var(--text-base); }

/* ---------------- Gate / locked overlay ---------------- */
.gate-wrap { position: relative; margin-top: var(--space-8); }
.gate-blur { filter: blur(6px); pointer-events: none; user-select: none; opacity: 0.7; }
.gate-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: var(--space-8);
}
.gate-card {
  background: var(--color-surface); border: 2px solid var(--color-gold-bright); border-radius: var(--radius-xl);
  padding: var(--space-8); max-width: 480px; text-align: center; box-shadow: var(--shadow-lg);
}
.gate-card h3 { margin-bottom: var(--space-2); }
.gate-card p { font-size: var(--text-sm); margin-bottom: var(--space-5); }
.gate-card .form-row { justify-content: center; }
.gate-card .form-row input[type="email"] { flex: 1 1 220px; }

/* ---------------- Submit a tip ---------------- */
.tip-section {
  background: linear-gradient(150deg, var(--color-navy), var(--color-primary));
  color: var(--color-text-inverse);
}
.tip-section h2 { color: #fff; margin-bottom: var(--space-3); }
.tip-section .eyebrow { background: rgba(255, 255, 255, 0.12); color: var(--color-gold-bright); }
.tip-section .section-sub { color: #d7e6ef; max-width: 62ch; margin-bottom: var(--space-8); font-size: var(--text-base); }
.tip-card { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius-xl); padding: var(--space-8); max-width: 640px; }
.tip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-bottom: var(--space-5); }
.tip-field { margin-bottom: var(--space-5); }
.tip-field label { display: block; font-size: var(--text-sm); font-weight: 600; color: #eaf3f9; margin-bottom: var(--space-2); }
.optional-tag { font-weight: 400; color: #a9c6d8; font-size: var(--text-xs); }
.tip-field input, .tip-field textarea {
  width: 100%; background: rgba(10, 47, 71, 0.55); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); font-size: var(--text-base); color: #fff; font-family: var(--font-body);
  min-height: 48px;
}
.tip-field input::placeholder, .tip-field textarea::placeholder { color: #7fa3b8; }
.tip-field input:focus, .tip-field textarea:focus { outline: 2px solid var(--color-secondary); outline-offset: 1px; }
.tip-form .form-note { color: #a9c6d8; }
.tip-form .form-status.success { color: #7fd8a8; }
.tip-form .form-status.error { color: #f3a3b4; }
@media (max-width: 640px) {
  .tip-grid { grid-template-columns: 1fr; gap: 0; }
  .tip-card { padding: var(--space-6); }
}

/* ---------------- Footer capture ---------------- */
.footer-capture { background: var(--color-gold-highlight); }
.footer-capture-inner { text-align: center; }
.footer-capture .form-row { justify-content: center; max-width: 520px; margin-inline: auto; }

.site-footer { padding-block: var(--space-10); font-size: var(--text-xs); color: var(--color-text-faint); text-align: center; }
.site-footer a { color: var(--color-text-faint); }
.footer-links { display: flex; justify-content: center; gap: var(--space-5); margin-bottom: var(--space-4); flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--color-primary); }

/* ---------------- Utility ---------------- */
.center { text-align: center; }
.mt-8 { margin-top: var(--space-8); }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-primary); color: #fff;
  padding: var(--space-2) var(--space-4); z-index: 100; border-radius: var(--radius-md);
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }
