/* ==========================================================================
   EGOWAVES — Design System v3
   Inspired by Erica Synths Bullfrog
   Header: white | Hero: stone | Content: off-white | Footer: dark
   Typography: Inter only
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-stone:      #87837E;
  --color-bg:         #F2F0ED;
  --color-surface:    #FAFAF8;
  --color-text:       #1A1A18;
  --color-text-muted: #6A6560;
  --color-text-on-stone: #FFFFFF;
  --color-text-muted-on-stone: rgba(255,255,255,0.65);
  --color-border:     rgba(26,26,24,0.10);
  --color-border-on-stone: rgba(255,255,255,0.18);
  --color-footer:     #252320;

  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --step--1: clamp(0.78rem, 0.75rem + 0.1vw, 0.85rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.2vw, 1.05rem);
  --step-1:  clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  --step-2:  clamp(1.4rem,  1.2rem  + 0.8vw, 1.75rem);
  --step-3:  clamp(1.8rem,  1.5rem  + 1.4vw, 2.4rem);
  --step-4:  clamp(2.2rem,  1.8rem  + 2.2vw, 3.4rem);
  --step-5:  clamp(2.8rem,  2.0rem  + 3.4vw, 4.6rem);

  --container-max: 1100px;
  --container-narrow: 740px;
  --space-section: clamp(3.5rem, 5.5vw, 7rem);
  --radius: 100px;
}

/* ---- 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; transition-duration: 0.001ms !important; }
}

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

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: var(--step-5); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-2); font-weight: 600; }
h4 { font-size: var(--step-0); font-weight: 700; }

.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 ---- */
.eyebrow {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.hero .eyebrow { color: var(--color-text-muted-on-stone); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8em 1.6em;
  font-family: var(--font-base);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}
.btn-primary:hover { background: #333; border-color: #333; }

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

.btn-secondary {
  background: #6A6560;
  color: #F2F0ED;
  border-color: #6A6560;
}
.btn-secondary:hover { background: #555250; border-color: #555250; }

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

/* Coming soon badge — same shape as .btn, swap back to .btn-primary when the product ships */
.btn-soon {
  background: transparent;
  color: var(--color-text-on-stone);
  border-color: var(--color-border-on-stone);
  cursor: default;
}

.text-link {
  font-weight: 500;
  font-size: var(--step--1);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.1em;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.text-link:hover { color: var(--color-text); border-bottom-color: var(--color-text-muted); }

/* ---- Header — WHITE ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.wordmark {
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-text);
}
.wordmark span { color: inherit; }

.main-nav ul { display: flex; gap: clamp(1.2rem, 3vw, 2.2rem); }
.main-nav a {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  transition: color 0.18s 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;
  color: var(--color-text);
}
.nav-toggle svg { display: block; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open { max-height: 400px; }
  .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; }
}

/* ---- Hero — STONE, title BLACK, body WHITE ---- */
.hero {
  background: var(--color-stone);
  padding-block: clamp(3rem, 6vw, 6rem);
  text-align: center;
}
.hero h1 {
  color: var(--color-text);
  white-space: nowrap;
}
.hero__inner { max-width: 860px; margin-inline: auto; }
.hero__lede {
  margin-top: 1.2rem;
  font-size: var(--step-0);
  font-weight: 400;
  color: var(--color-text-on-stone);
  max-width: 620px;
  margin-inline: auto;
  line-height: 1.6;
}
.hero__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* ---- Home hero (has illustration, left-aligned) ---- */
.hero--home { text-align: left; }
.hero--home .hero__lede { margin-inline: 0; }
.hero--home .hero__actions { justify-content: flex-start; }
.hero--home h1 { white-space: nowrap; }

/* Product page hero — tighter bottom gap before the shot */
.hero--product { padding-bottom: clamp(1.2rem, 2.5vw, 2rem); }

/* ---- Product shot ---- */
.product-shot-wrap {
  background: var(--color-stone);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}
.product-shot {
  display: block;
  width: 100%;
  max-width: 860px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 32px 64px -24px rgba(26,26,24,0.40);
  margin-inline: auto;
}

/* ---- Section heading ---- */
.section-head {
  max-width: 600px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head h2 { margin-top: 0.5rem; }
.section-head p {
  margin-top: 0.9rem;
  color: var(--color-text-muted);
  font-size: var(--step-0);
  line-height: 1.65;
}

/* ---- Philosophy (about) ---- */
.philosophy { background: var(--color-stone); }
.philosophy p { color: var(--color-text-on-stone); }
.philosophy .lead {
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--color-text-on-stone);
}

/* ---- Feature list ---- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.feature-list__item { border-top: 1px solid var(--color-border); padding-top: 1.1rem; }
.feature-list__item h4 { font-size: var(--step-0); font-weight: 700; margin-bottom: 0.4rem; color: var(--color-text-muted); }
.feature-list__item p { color: var(--color-text-muted); font-size: var(--step--1); line-height: 1.6; }
.feature-list__item .tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Product intro ---- */
.product-intro { background: var(--color-bg); padding-block: var(--space-section); }
.product-intro__text { max-width: 680px; }
.product-intro__text p { font-size: var(--step-0); line-height: 1.75; color: var(--color-text-muted); }
.product-intro__text p + p { margin-top: 1.2rem; }
.product-intro__text strong { color: var(--color-text); font-weight: 600; }

/* ---- Audio before/after ---- */
.av-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 600px) { .av-grid { grid-template-columns: 1fr; } }
.av-card { border-top: 1px solid var(--color-border); padding-top: 1rem; padding-bottom: 1rem; }
.av-card .eyebrow { margin-bottom: 0.8rem; }
.av-card iframe { width: 100%; }

/* ---- Video embed (16:9 responsive) ---- */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 48px -20px rgba(26,26,24,0.28);
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--color-stone);
  padding-block: clamp(2.5rem, 5vw, 5rem);
  text-align: center;
}
.cta-band h2 { color: var(--color-text); }
.cta-band .eyebrow { color: var(--color-text-muted-on-stone); margin-bottom: 0.5rem; }
.cta-band .btn-primary {
  margin-top: 1.8rem;
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
  display: inline-flex;
}
.cta-band .btn-primary:hover { background: #333; border-color: #333; }
.cta-band .btn-secondary { margin-top: 1.8rem; display: inline-flex; }

/* ---- Home plugin sections ---- */
.plugin-section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.plugin-section + .plugin-section { border-top: 1px solid var(--color-border); }
.plugin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.plugin-layout.reverse { direction: rtl; }
.plugin-layout.reverse > * { direction: ltr; }
@media (max-width: 820px) {
  .plugin-layout, .plugin-layout.reverse { grid-template-columns: 1fr; direction: ltr; }
}
.plugin-meta h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-top: 0.4rem; }
.plugin-meta p { margin-top: 0.9rem; color: var(--color-text-muted); max-width: 400px; }
.plugin-actions { margin-top: 1.8rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.plugin-img img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 48px -20px rgba(26,26,24,0.28);
  display: block;
}

/* ---- Home hero layout ---- */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 600px) { .hero-inner { grid-template-columns: 1fr; } .hero-illustration { display: none; } }
.hero-illustration img {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.55;
  display: block;
}

/* ---- About grid ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid img { width: 100%; border-radius: 10px; box-shadow: 0 20px 40px -18px rgba(26,26,24,0.22); display: block; }

/* ---- Contact form ---- */
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.form-field input, .form-field textarea {
  width: 100%;
  font-family: var(--font-base);
  font-size: var(--step-0);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.65em 1em;
  transition: border-color 0.18s ease;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--color-stone); }
.form-field textarea { resize: vertical; min-height: 100px; }

/* ---- Footer ---- */
.site-footer { background: var(--color-footer); padding-block: clamp(2.5rem, 5vw, 4rem); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.site-footer .wordmark { color: #F2F0ED; }
.footer-col h4 {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242,240,237,0.35);
  margin-bottom: 0.9rem;
}
.footer-col a, .footer-col p { display: block; margin-top: 0.5rem; color: rgba(242,240,237,0.65); font-size: var(--step--1); }
.footer-col a:hover { color: #F2F0ED; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(242,240,237,0.08);
  font-size: var(--step--1);
  color: rgba(242,240,237,0.3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

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

/* ---- Overrides v4 ---- */

/* Hero: title BLACK, eyebrow WHITE */
.hero h1 { color: var(--color-text); }
.hero .eyebrow { color: var(--color-text-on-stone) !important; letter-spacing: 0.14em; }

/* Product shot smaller */
.product-shot { max-width: 660px; }

/* DrumSequencer — wide UI image, full container width */
.product-shot--wide { max-width: 100%; }

/* Product intro — centered, no muted color */
.product-intro { text-align: center; }
.product-intro__text { margin-inline: auto; }
.product-intro__text p { color: var(--color-text-muted); }

/* h1 on stone hero — always black */
.hero h1 { color: #1A1A18 !important; }

/* About text justify */
.about-text-justify p { text-align: justify; }

/* Home plugin grid, 2 per row */
.plugin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
}
@media (max-width: 720px) { .plugin-grid { grid-template-columns: 1fr; } }
.plugin-card { display: flex; flex-direction: column; }
.plugin-card__img {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
}
.plugin-card__img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 48px -20px rgba(26,26,24,0.28);
}
.plugin-card .plugin-meta { display: flex; flex-direction: column; flex: 1; }
.plugin-card .plugin-actions { margin-top: auto; padding-top: 1.4rem; }

/* Home hero, 30% shorter (padding only) */
.hero--home { padding-block: clamp(1.4rem, 2.8vw, 2.8rem); }

/* About photo, left margin on wide screens, above text otherwise */
.about-passion { position: relative; }
.about-photo {
  width: 280px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 40px -18px rgba(26,26,24,0.35);
  margin: 0 auto 1.6rem;
}
@media (min-width: 1100px) {
  .about-photo { position: absolute; top: 0; right: calc(100% + 1.5rem); width: 160px; margin: 0; }
}
