/* CupOfBrew Design System */
:root {
  --cream: #F8F4EE;
  --warm-white: #FFFCFA;
  --espresso: #2C1E16;
  --coffee: #4A3728;
  --mocha: #6B4F3A;
  --caramel: #D4A574;
  --caramel-dark: #B8834A;
  --sage: #8B9A7D;
  --sage-light: #A8B59C;
  --text: #2C1E16;
  --text-muted: #6B5B4F;
  --border: #E8E0D5;
  --success: #5C7A5A;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(44, 30, 22, 0.08);
  --shadow-lg: 0 12px 40px rgba(44, 30, 22, 0.12);
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--warm-white);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: 800px;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 252, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--espresso);
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--caramel);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--espresso);
}

.nav-cta {
  background: var(--espresso);
  color: white !important;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem !important;
}

.nav-cta:hover {
  background: var(--coffee);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--espresso);
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(180deg, var(--cream) 0%, var(--warm-white) 100%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--caramel-dark);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.15;
  color: var(--espresso);
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--coffee);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: white;
  color: var(--espresso);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--caramel);
  background: var(--cream);
}

.btn-accent {
  background: var(--caramel);
  color: var(--espresso);
}

.btn-accent:hover {
  background: var(--caramel-dark);
  color: white;
}

/* Sections */
.section {
  padding: 4rem 0;
}

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

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--espresso);
  margin-bottom: 0.6rem;
}

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

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.category-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--caramel);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.category-card .icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.category-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--espresso);
}

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

.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

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

.product-image {
  aspect-ratio: 1;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--espresso);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.product-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--espresso);
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.rating {
  color: var(--caramel-dark);
  font-weight: 600;
}

.price {
  font-weight: 700;
  color: var(--espresso);
}

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

.product-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.product-footer .btn {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}

/* Tools / Calculators */
.tool-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.tool-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--espresso);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--warm-white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--caramel);
}

.calc-result {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  text-align: center;
}

.calc-result .big-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--espresso);
  line-height: 1.1;
}

.calc-result .label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Quiz */
.quiz-container {
  max-width: 640px;
  margin: 0 auto;
}

.quiz-progress {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--caramel);
  transition: width 0.3s ease;
}

.quiz-question h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: var(--espresso);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  text-align: left;
}

.quiz-option:hover,
.quiz-option.selected {
  border-color: var(--caramel);
  background: var(--cream);
}

/* Email Capture */
.email-capture {
  background: var(--espresso);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.email-capture h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.email-capture p {
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.email-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 0 auto;
}

.email-form input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
}

.email-form .btn {
  background: var(--caramel);
  color: var(--espresso);
  white-space: nowrap;
}

/* Footer */
.site-footer {
  background: var(--espresso);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}

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

.footer-brand .logo {
  color: white;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.95rem;
  opacity: 0.75;
  max-width: 280px;
}

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

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

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

.footer-col a {
  font-size: 0.95rem;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

.affiliate-note {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 1rem;
}

/* Utility */
.badge {
  display: inline-block;
  background: var(--cream);
  color: var(--mocha);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 2.75rem 0 2.25rem;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .hero p {
    font-size: 1.05rem;
  }
  .section {
    padding: 2.75rem 0;
  }
  .section-header {
    margin-bottom: 1.75rem;
  }
  .email-form {
    flex-direction: column;
  }
  .email-form .btn {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-footer {
    flex-direction: column;
  }
  .tool-card {
    padding: 1.35rem;
  }
  /* Calculator forms stack better */
  .tool-card [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .calc-result .big-number {
    font-size: 2rem;
  }
  .disclosure {
    font-size: 0.78rem;
  }
  /* Digital product split becomes single column */
  .section [style*="grid-template-columns:1fr 1fr"],
  .section [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Micro interactions */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeUp 0.5s ease forwards;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: var(--cream);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

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

/* Disclosure */
.disclosure {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--cream);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}
