/* ==========================================================================
   EGOWAVES — Design System
   Cream / warm brown / restrained warm-orange accent
   Typography: DM Serif Display (headings) + Inter (body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Color tokens */
  --color-bg: #F4EEE2;
  --color-bg-alt: #ECE2CC;
  --color-surface: #FAF6EE;
  --color-text: #2A2118;
  --color-text-muted: #6E6052;
  --font-display: 'DM Serif Display', Georgia, serif;
  --color-border: rgba(42, 33, 24, 0.12);
  --color-accent: #C2602A;
  --color-accent-hover: #A84E20;
  --color-accent-soft: #E8B468;

  /* Type */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.4vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.9rem + 2.4vw, 3.6rem);
  --step-5: clamp(3rem, 2.2rem + 3.6vw, 5rem);

  /* Layout */
  --container-max: 1120px;
  --container-narrow: 760px;
  --space-section: clamp(4rem, 6vw, 8rem);
  --radius: 3px;
  --radius-lg: 16px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle grain overlay — very light texture per brand direction */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.12;
}
h1, h2, h3 {
  font-family: var(--font-display);
}
h4 {
  font-family: var(--font-base);
  font-weight: 700;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--container-narrow); }

section { padding-block: var(--space-section); }

/* ---- Eyebrow / kicker label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.eyebrow::before {
  content: "";
  width: 1.4em;
  height: 1px;
  background: var(--color-accent);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.85em 1.7em;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-surface);
}
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-text); }

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.text-link {
  font-weight: 600;
  border-bottom: 1px solid var(--color-accent-soft);
  padding-bottom: 0.1em;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.text-link:hover { border-color: var(--color-accent); color: var(--color-accent-hover); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 238, 226, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}
.wordmark {
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: 0.02em;
}
.wordmark span { color: var(--color-accent); }

.main-nav ul {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.main-nav a {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle svg { display: block; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open { max-height: 280px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem; }
  .main-nav li { padding-block: 0.6rem; border-bottom: 1px solid var(--color-border); }
  .main-nav li:last-child { border-bottom: none; }
}

/* ---- Divider: tick-rule motif (calibration marks, nods to analog gear) ---- */
.tick-rule {
  height: 14px;
  background-image: repeating-linear-gradient(
    to right,
    var(--color-border) 0,
    var(--color-border) 1px,
    transparent 1px,
    transparent 16px
  );
  background-position: center;
  background-size: 100% 1px;
  background-repeat: no-repeat, repeat-x;
  position: relative;
}
.tick-rule::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--color-border),
    var(--color-border) 1px,
    transparent 1px,
    transparent 16px
  );
}

/* ---- Home fold: hero + featured product + catalog band auto-fit the viewport height on desktop ---- */
@media (min-width: 821px) and (min-height: 600px) {
  .home-fold {
    min-height: calc(100vh - 73px); /* 73px ≈ sticky header height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

/* ---- Hero ---- */
.hero {
  padding-block: clamp(1.6rem, 4vw, 2.8rem) clamp(1.3rem, 3vw, 2.2rem);
}
.hero__inner {
  max-width: 840px;
}
.hero h1 {
  margin-top: 0.6rem;
}
.hero__lede {
  margin-top: 1.6rem;
  font-size: var(--step-1);
  color: var(--color-text-muted);
  max-width: 620px;
}
.hero__actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- Section heading pattern ---- */
.section-head {
  max-width: 620px;
  margin-bottom: clamp(2.2rem, 4vw, 3.2rem);
}
.section-head h2 { margin-top: 0.6rem; }
.section-head p {
  margin-top: 1rem;
  color: var(--color-text-muted);
  font-size: var(--step-1);
}

/* ---- Philosophy strip ---- */
.philosophy {
  background: var(--color-bg-alt);
}
.philosophy blockquote {
  margin: 0;
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  max-width: 880px;
}
.philosophy cite {
  display: block;
  margin-top: 1.4rem;
  font-style: normal;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Category quick-nav (products page) ---- */
.category-nav {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: rgba(244, 238, 226, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.category-nav__inner {
  display: flex;
  gap: clamp(1.4rem, 3.5vw, 2.6rem);
  padding-block: 1.1rem;
  flex-wrap: wrap;
}
.category-nav a {
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}
.category-nav a:hover { color: var(--color-accent-hover); }

.section-head[id], section[id] {
  scroll-margin-top: 130px;
}

/* ---- YouTube embed ---- */
.yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  box-shadow: 0 14px 28px -16px rgba(42, 33, 24, 0.28);
}
.yt-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* ---- Featured product card ---- */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 820px) {
  .featured { grid-template-columns: 1fr; }
}
.product-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 28px 56px -24px rgba(42, 33, 24, 0.32);
}
.featured__meta {
  margin-top: 1.6rem;
  color: var(--color-text-muted);
}
.featured__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- Product grid (catalog) ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.product-card:hover {
  box-shadow: 0 24px 48px -24px rgba(42, 33, 24, 0.22);
  transform: translateY(-2px);
}
.product-card__art {
  margin-bottom: 1.4rem;
}
.product-card__art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 14px 28px -16px rgba(42, 33, 24, 0.28);
}
.product-card h3 { font-size: var(--step-1); }
.product-card p {
  margin-top: 0.7rem;
  color: var(--color-text-muted);
  flex-grow: 1;
}
.product-card .text-link { margin-top: 1.4rem; align-self: flex-start; }

.product-card--soon {
  justify-content: center;
  align-items: center;
  text-align: center;
  border-style: dashed;
  color: var(--color-text-muted);
}

.product-card--viewall {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ---- Before / after audio examples ---- */
.av-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
@media (max-width: 600px) {
  .av-grid { grid-template-columns: 1fr; }
}
.av-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  background: var(--color-surface);
}
.av-card .eyebrow { margin-bottom: 0.9rem; }
.av-card audio, .av-card iframe { width: 100%; }
.av-placeholder {
  aspect-ratio: 16/4;
  background: var(--color-bg-alt);
  border-radius: calc(var(--radius-lg) - 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--step--1);
  color: var(--color-text-muted);
}

/* ---- Feature list (param groups) ---- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
}
.feature-list__item h4 {
  font-size: var(--step-0);
  font-weight: 700;
}
.feature-list__item p {
  margin-top: 0.5rem;
  color: var(--color-text-muted);
  font-size: var(--step--1);
}
.feature-list__item .tag {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--color-bg-alt);
  color: var(--color-text);
}
.cta-band h2 { color: var(--color-text); }
.cta-band p { color: var(--color-text-muted); }
.cta-band .eyebrow { color: var(--color-text-muted); }
.cta-band .btn-ghost { color: var(--color-text); border-color: var(--color-border); }
.cta-band .btn-ghost:hover { border-color: var(--color-text); }
.cta-band .btn-primary { background: var(--color-accent); color: var(--color-surface); }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-text);
  border-top: none;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}
.footer-col h4 {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 238, 226, 0.45);
  margin-bottom: 0.9rem;
}
.footer-col a, .footer-col p {
  display: block;
  margin-top: 0.5rem;
  color: rgba(244, 238, 226, 0.75);
}
.footer-col a:hover { color: var(--color-bg); }
.wordmark span { color: var(--color-accent); }
.footer-col a:hover { color: var(--color-bg); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(244, 238, 226, 0.12);
  font-size: var(--step--1);
  color: rgba(244, 238, 226, 0.4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Reveal on scroll ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Utility ---- */
.text-muted { color: var(--color-text-muted); }
.mt-lg { margin-top: var(--space-section); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
