/* TEOTWAWKI Off-grid Supply - Core Styles */
:root {
  --navy: #1c2d45;          /* ~10-12% lighter/brighter than original */
  --navy-light: #2a3f5c;
  --crimson: #7c1518;       /* ~20% darker than original */
  --crimson-hover: #9a1c20;
  --cream: #f5f0e6;
  --cream-dark: #e8e0d0;
  --olive: #4a5d23;
  --wood: #8b5e3c;
  --gold: #c9a227;
  --text: #1a1a1a;
  --text-light: #f5f0e6;
  --muted: #6b7280;
  --card-bg: #ffffff;
  --border: #d4cbb8;
  --shadow: 0 4px 20px rgba(28, 45, 69, 0.14);
  --radius: 8px;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--crimson); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--crimson-hover); }

/* Header */
.site-header {
  background: var(--navy);
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.featured-banner {
  display: block;
  background: var(--gold);
  color: var(--navy);
  text-align: center;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.featured-banner:hover {
  background: #d9b53c;
  color: var(--navy);
}
.featured-banner .fp-arrow {
  margin-left: 0.35rem;
}

.header-top {
  background: var(--crimson);
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-main {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-transform: uppercase;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--cream);
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--gold);
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--cream);
  color: var(--cream);
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Hero */
.hero {
  background: url('../images/hero-flag-navy.jpg') center center / cover no-repeat;
  color: var(--cream);
  padding: 3.5rem 1.25rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hero .tagline {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 1.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--crimson-hover);
  color: white;
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn-source {
  background: var(--navy);
  color: white;
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
}

.btn-source:hover {
  background: var(--navy-light);
  color: white;
}

.btn-source.walmart { background: #0071dc; }
.btn-source.walmart:hover { background: #005cb8; }
.btn-source.amazon { background: #ff9900; color: #111; }
.btn-source.amazon:hover { background: #e68a00; }
.btn-source.brownells { background: #3b2a1a; }
.btn-source.brownells:hover { background: #2a1d10; }
.btn-source.psa { background: #5a1f1f; }
.btn-source.psa:hover { background: #431717; }
.btn-source.patriotmobile { background: #7a1f1f; }
.btn-source.patriotmobile:hover { background: #611818; }
.btn-source.puretalk { background: #1f4d7a; }
.btn-source.puretalk:hover { background: #183d61; }
.btn-source.redpocket { background: #c9312f; }
.btn-source.redpocket:hover { background: #a52725; }
.btn-source.spirits { background: #4a3418; }
.btn-source.spirits:hover { background: #382712; }

/* Compliance / legal notice blocks */
.legal-notice {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--cream-dark);
  border-left: 4px solid var(--crimson);
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.legal-notice strong { color: var(--navy); }

/* Age gate overlay */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.age-gate-box {
  max-width: 460px;
  width: 100%;
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}
.age-gate-box h2 {
  margin-top: 0;
  color: var(--navy);
}
.age-gate-box p {
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.age-gate-actions .btn {
  width: 100%;
}
body.age-gate-active > *:not(.age-gate-overlay) {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

/* Sections */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-header p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(10, 22, 40, 0.18);
}

.category-icon {
  background: var(--navy);
  color: var(--gold);
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
}

.category-card h3 {
  padding: 1rem 1rem 0.35rem;
  font-size: 1.1rem;
  color: var(--navy);
}

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

.category-card a {
  display: block;
  padding: 0.75rem;
  background: var(--cream-dark);
  color: var(--navy);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.category-card a:hover {
  background: var(--crimson);
  color: white;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-image {
  background: linear-gradient(145deg, #e8eef5 0%, #dce4ef 100%);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  position: relative;
}

.product-image svg {
  width: 72px;
  height: 72px;
  fill: var(--navy);
  opacity: 0.85;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--crimson);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.product-body {
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-body h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.product-body .desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}

.product-source {
  color: var(--muted);
  font-weight: 600;
}

.product-price {
  font-weight: 800;
  color: var(--navy);
  font-size: 1.05rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Trust / Mission */
.mission-strip {
  background: var(--navy);
  color: var(--cream);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.mission-strip h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.mission-strip p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  opacity: 0.9;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.trust-item {
  background: rgba(255,255,255,0.06);
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
}

.trust-item strong {
  display: block;
  color: var(--gold);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.trust-item span {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  margin-top: auto;
  padding: 2.5rem 1.25rem 1.5rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

.footer-col a {
  color: rgba(245, 240, 230, 0.8);
  font-size: 0.9rem;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.75;
}

.affiliate-disclosure {
  background: var(--cream-dark);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Page specific */
.page-hero {
  background: url('../images/hero-flag-navy.jpg') center center / cover no-repeat;
  color: var(--cream);
  padding: 2.25rem 1.25rem;
  text-align: center;
}

.page-hero h1 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
}

.page-hero p {
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

/* About content */
.content-block {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.content-block h2 {
  color: var(--navy);
  margin: 1.75rem 0 0.75rem;
  font-size: 1.35rem;
}

.content-block p {
  margin-bottom: 1rem;
}

.content-block ul {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    background: var(--navy-light);
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0.5rem;
  }
  .nav.open { display: flex; }
  .header-main { flex-wrap: wrap; }
  .hero { padding: 2.5rem 1rem 3rem; }
  .section { padding: 2rem 1rem; }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
/* Guides / articles */
.article-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.content-block ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}
.content-block li {
  margin-bottom: 0.4rem;
}
.table-scroll {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.guide-table th,
.guide-table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.guide-table th {
  background: var(--navy);
  color: var(--cream);
}
.formula {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  background: var(--cream-dark);
  padding: 0.9rem;
  border-radius: 4px;
  margin: 1rem 0;
}
.callout {
  background: var(--cream-dark);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin: 1.5rem 0;
}
.callout.warn {
  border-left-color: var(--crimson);
}
.callout ul {
  margin: 0.5rem 0 0 1.25rem;
}

/* Daily boxes (flag status + spot prices) */
.daily-boxes {
  width: 100%;
  box-sizing: border-box;
  padding-top: 1.75rem;
  padding-bottom: 0.5rem;
}
.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}
.daily-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem 1.1rem;
  text-align: center;
}
.daily-box.silver { border-top-color: #9aa3ad; }
.daily-box.flag   { border-top-color: var(--crimson); }
.daily-title {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.daily-main {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}
.daily-box[data-state="half"] .daily-main { color: var(--crimson); }
.daily-box[data-state="unknown"] .daily-main { font-size: 1.15rem; }
.daily-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.flag-glyph {
  width: 38px;
  height: 50px;
  margin: 0 auto 0.15rem;
  display: block;
}
.flag-glyph .flag-cloth { transition: transform 0.3s; }
.daily-box[data-state="half"] .flag-glyph .flag-cloth { transform: translateY(16px); }
.daily-note {
  max-width: 1000px;
  margin: 0.9rem auto 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* Landing page zones */
.zones { width: 100%; box-sizing: border-box; padding-top: 1.5rem; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1.25rem; max-width: 1000px; margin: 0 auto; }
.zone-card { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--border); border-top: 4px solid var(--crimson); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; text-decoration: none; color: inherit; transition: transform .15s; }
a.zone-card:hover { transform: translateY(-3px); }
.zone-card h3 { margin: 0 0 .4rem; }
.zone-card p { margin: 0 0 1rem; flex: 1; }
.zone-go { font-weight: 700; color: var(--crimson); }
.zone-soon { opacity: .65; border-top-color: var(--border); }
.zone-soon .zone-go { color: inherit; }
.daily-box.space { border-top-color: #3b6ea5; }
.daily-box.quake { border-top-color: #8a5a2b; }

.flag-widget { min-height: 70px; display: flex; justify-content: center; align-items: center; font-size: .95rem; }
.flag-widget .halfstaffwidget_container { max-width: 100%; }
