/* ═══════════════════════════════════════════════════════════
   Cocoa Sandwich — cocoasandwich.com
   Brand: Midnight Ember palette, Space Grotesk + Inter
   ═══════════════════════════════════════════════════════════ */

/* ── Brand Tokens ── */
:root {
  /* Colors */
  --color-primary: #0f172a;
  --color-secondary: #1e293b;
  --color-accent: #d97706;
  --color-accent-dark: #b45309;
  --color-accent-light: #f59e0b;
  --color-info: #14b8a6;
  --color-info-dark: #0f766e;

  --color-dark: #0f172a;
  --color-mid: #64748b;
  --color-light: #cbd5e1;
  --color-surface: #f1f5f9;
  --color-bg: #f8fafc;

  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-400: #94a3b8;

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-pad: 120px;
  --container: 1100px;
  --gutter: 24px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; cursor: pointer; }

/* ── Base ── */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: #e2e8f0;
  background: var(--color-primary);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-heading); }

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}
h4 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
}

.accent-dot { color: var(--color-accent); }

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
}

.site-nav.scrolled {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.1);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.nav-brand span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-slate-400);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #e2e8f0;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px var(--gutter) 120px;
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(100, 116, 139, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-icon {
  width: 260px;
  height: 260px;
  margin: 0 auto 40px;
  position: relative;
}

.hero-icon img {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Teal glow behind icon — mirrors the cream filling's luminosity */
.hero-icon::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.16) 0%, rgba(20, 184, 166, 0.05) 40%, transparent 70%);
  z-index: 0;
  border-radius: 50%;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.hero-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-info);
  margin-bottom: 16px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-slate-400);
  max-width: 520px;
  margin: 0 auto 36px;
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.15s ease;
}

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

/* ── About / Mission ── */
.about {
  padding: var(--section-pad) 0;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.about-header {
  text-align: center;
  margin-bottom: 64px;
}

.about-header .section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-info);
  margin-bottom: 16px;
}

.about-header h2 {
  margin-bottom: 16px;
}

.about-header p {
  font-size: 1.0625rem;
  color: var(--color-slate-400);
  max-width: 560px;
  margin: 0 auto;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(100, 116, 139, 0.1);
  border-radius: 16px;
  padding: 32px;
}

.pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 18px;
}

.pillar h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

/* Pillar color variants */
.pillar--accent .pillar-icon { background: rgba(217, 119, 6, 0.1); color: var(--color-accent); }
.pillar--accent h3 { color: var(--color-accent); }

.pillar--info .pillar-icon { background: rgba(20, 184, 166, 0.1); color: var(--color-info); }
.pillar--info h3 { color: var(--color-info); }

.pillar--slate .pillar-icon { background: rgba(100, 116, 139, 0.1); color: var(--color-slate-400); }
.pillar--slate h3 { color: var(--color-slate-400); }

.pillar p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-slate-400);
}

.founder-credit {
  text-align: center;
  margin-top: 56px;
  font-size: 0.8125rem;
  color: var(--color-mid);
}

.founder-credit a {
  color: var(--color-info);
  transition: color 0.2s ease;
}

.founder-credit a:hover {
  color: var(--color-info-dark);
}

/* ── Traits ── */
.traits {
  padding: 80px 0;
  background: var(--color-secondary);
  border-top: 1px solid rgba(100, 116, 139, 0.08);
  border-bottom: 1px solid rgba(100, 116, 139, 0.08);
}

.traits-grid {
  display: flex;
  gap: 0;
}

.trait {
  flex: 1;
  text-align: center;
  padding: 0 20px;
  position: relative;
}

.trait:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(100, 116, 139, 0.15);
}

.trait-word {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.trait-desc {
  font-size: 0.8125rem;
  color: var(--color-mid);
  line-height: 1.5;
}

/* ── Products ── */
.products {
  padding: var(--section-pad) 0;
  background: var(--color-primary);
  position: relative;
}

.products::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(100, 116, 139, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.products .container {
  position: relative;
  z-index: 1;
}

.products-header {
  text-align: center;
  margin-bottom: 56px;
}

.products-header .section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.products-header h2 {
  margin-bottom: 12px;
}

.products-header p {
  font-size: 1.0625rem;
  color: var(--color-slate-400);
  max-width: 480px;
  margin: 0 auto;
}

/* Featured product card */
.product-card {
  background: var(--color-secondary);
  border: 1px solid rgba(100, 116, 139, 0.1);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 960px;
  margin: 0 auto 40px;
}

.product-info {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-info);
  background: rgba(20, 184, 166, 0.1);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  width: fit-content;
}

.product-info h3 {
  font-size: 1.75rem;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.product-info p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-slate-400);
  margin-bottom: 24px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-accent);
  transition: gap 0.2s ease;
}

.product-link:hover {
  gap: 12px;
}

.product-link .arrow {
  transition: transform 0.2s ease;
}

.product-link:hover .arrow {
  transform: translateX(2px);
}

/* Product visual area */
.product-visual {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.06) 0%, rgba(217, 119, 6, 0.06) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  min-height: 320px;
}

.product-visual-inner {
  text-align: center;
}

.product-icon-large {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.product-tagline {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-mid);
}

/* Secondary product (compact row) */
.product-secondary {
  background: var(--color-secondary);
  border: 1px solid rgba(100, 116, 139, 0.1);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.product-secondary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.product-secondary h4 {
  font-size: 1.0625rem;
  margin-bottom: 6px;
  color: #e2e8f0;
}

.product-secondary p {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-mid);
  max-width: 480px;
}

.product-secondary-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.product-rating {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-accent);
}

.product-store-links {
  display: flex;
  gap: 16px;
}

/* More coming teaser */
.more-coming {
  text-align: center;
  padding: 40px;
  border: 1px dashed rgba(100, 116, 139, 0.2);
  border-radius: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.more-coming p {
  font-size: 0.9375rem;
  color: var(--color-mid);
}

.more-coming p strong {
  color: var(--color-slate-400);
}

/* ── Footer ── */
.site-footer {
  padding: 56px 0 48px;
  border-top: 1px solid rgba(100, 116, 139, 0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.footer-brand span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--color-mid);
  max-width: 320px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-mid);
  margin-bottom: 14px;
}

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

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--color-slate-400);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #e2e8f0;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(100, 116, 139, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--color-mid);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --section-pad: 80px;
    --gutter: 20px;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  .hero {
    min-height: auto;
    padding: 140px var(--gutter) 80px;
  }

  .hero-icon {
    width: 180px;
    height: 180px;
    margin-bottom: 32px;
  }

  .product-secondary-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-secondary-meta {
    align-items: flex-start;
  }

  .hero-subtitle { font-size: 1rem; }

  .pillars {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .traits-grid {
    flex-direction: column;
    gap: 24px;
  }

  .trait:not(:last-child)::after {
    display: none;
  }

  .trait {
    padding: 0;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-info {
    padding: 32px 24px;
  }

  .product-visual {
    min-height: 200px;
    padding: 32px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 13px;
  }
}

/* ── Legal Pages ── */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 24px 80px;
}

.legal-page h1 {
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.legal-page .updated {
  font-size: 0.8125rem;
  color: var(--color-mid);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-slate-400);
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-page a {
  color: var(--color-info);
  text-decoration: underline;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--color-mid);
  margin-bottom: 32px;
  text-decoration: none;
  transition: color 0.2s;
}

.legal-back:hover {
  color: #e2e8f0;
}

@media (max-width: 480px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 120px var(--gutter) 60px; }

  .hero-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
  }

  .btn-primary {
    padding: 12px 24px;
    font-size: 0.875rem;
  }
}
