/* MindWave site styles — v1 */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── 1. Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}

a {
  color: var(--link);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img,
svg {
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── 2. .site-header ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: auto;
  height: 32px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.site-nav a:hover {
  color: var(--link);
}

/* ── 3. .hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: clamp(3rem, 10vw, 7rem) clamp(1rem, 6vw, 5rem) clamp(6rem, 16vw, 11rem);
}

.hero h1,
.hero .hero-title {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0.25em 0;
  max-width: 14ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hero-soft);
}

.lede {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--hero-soft);
  max-width: 34ch;
}

.button {
  display: inline-block;
  margin-top: 1.5rem;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.06);
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(4.5rem, 14vw, 9rem);
  pointer-events: none;
}

/* Text and the button sit above the waves; the waves stay in the bottom padding band. */
.hero > :not(.wave) {
  position: relative;
  z-index: 1;
}

.hero .hero-art {
  position: absolute;
  z-index: 0;
  right: clamp(1rem, 5vw, 5rem);
  top: 50%;
  transform: translateY(-50%);
  height: min(85%, 560px);
  width: auto;
  pointer-events: none;
}

.wave path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.wave-1 {
  stroke: var(--wave-1);
}

.wave-2 {
  stroke: var(--wave-2);
  opacity: 0.8;
  animation: drift 14s ease-in-out infinite alternate;
}

.wave-3 {
  stroke: var(--wave-3);
  opacity: 0.7;
  animation: drift 19s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-4%); }
}

/* ── 4. .band ────────────────────────────────────────────── */
.band {
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1rem, 6vw, 5rem);
  max-width: 72rem;
  margin: 0 auto;
}

.band + .band {
  padding-top: 0;
}

.band h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

.band > p {
  max-width: 60ch;
}

/* ── 5. .steps / .step ─────────────────────────────────── */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--on-accent);
  color: var(--on-accent);
  font-weight: 800;
}

.step h3 {
  margin: 0.75rem 0 0.25rem;
}

/* ── 6. .cards / .card ──────────────────────────────────── */
.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

/* ── 7. .draft / .placeholder ───────────────────────────── */
.draft {
  position: relative;
  outline: 2px dashed color-mix(in srgb, var(--ink-soft) 45%, transparent);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.draft::after {
  content: "Draft";
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  vertical-align: middle;
}

.placeholder {
  color: var(--ink-soft);
  font-style: italic;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

/* video thumbnail slot (community.html); our own image goes here after consent */
.video .thumb {
  aspect-ratio: 16 / 9;
  border: 1px dashed var(--line);
  border-radius: 0.75rem;
  background: var(--bg);
  margin-bottom: 1rem;
}

/* ── 8. .site-footer ─────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1rem, 6vw, 5rem);
  color: var(--ink-soft);
  font-size: 1rem;
}

.disclaimer {
  font-weight: 600;
  color: var(--ink);
}

/* FCC 47 CFR 2.803 notice next to a price (demo page): small but conspicuous, never hidden. */
.fcc {
  font-size: 0.875rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ── 9. palettes.html specific ───────────────────────────── */
.compare {
  margin: 0 0 2.5rem;
}

.compare-label {
  padding: 0.75rem clamp(1rem, 6vw, 5rem) 0.5rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  margin: 0;
}

/* .palette-compare .hero-title already handled by .hero .hero-title (step 3) */

/* ── 10. Responsive ──────────────────────────────────────── */
@media (max-width: 40rem) {
  .site-nav a {
    font-size: 0.95rem;
  }

  .hero h1,
  .hero .hero-title {
    max-width: none;
  }
}

/* Keyboard + anchors (lead, after the mesh review 09-29) */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus);
  border-radius: .5rem;
  padding: .6rem 1rem;
  font-weight: 700;
}
.skip-link:focus {
  top: .75rem;
}
main [id] {
  scroll-margin-top: 6.5rem;
}
.site-nav a {
  display: inline-block;
  padding: .6rem .15rem;
}
/* Phones: the nav wraps to two rows, so the header scrolls away instead of covering a fifth of the screen. */
@media (max-width: 40rem) {
  .site-header {
    position: static;
  }
  main [id] {
    scroll-margin-top: 1rem;
  }
}

/* how.html diagram: sits close to the intro, full width of the band */
.band-diagram {
  padding-top: 0;
}
.diagram {
  margin: 0;
}
.diagram figcaption {
  margin-top: .75rem;
  display: inline-block;
}

/* Company-first home (Sina Q1, 09-29): the instrument as one section */
.kicker {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 .25rem;
}
.instrument-title {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--link);
}
.band .disclaimer {
  font-weight: 600;
  margin-top: 2rem;
}
.band .steps + p,
.band .cards {
  margin-top: 1.5rem;
}
#building .steps {
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
}

/* About: partners and support as calm pills */
.support-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.support-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .6rem 1.1rem;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .hero .hero-art {
    display: none;
  }
}

/* how.html diagram on phones: a stacked version, so the labels stay readable (UX pass 10-01) */
.diagram-tall {
  display: none;
  max-width: 340px;
}
@media (max-width: 600px) {
  .diagram .diagram-wide {
    display: none;
  }
  .diagram .diagram-tall {
    display: block;
  }
}

/* Ribbon band (Sina 10-01, card 3 Q3): faint brand ribbon behind the About/How intro. Decorative. */
.band-ribbon {
  position: relative;
  overflow: hidden;
}
.band-ribbon .ribbon {
  position: absolute;
  z-index: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: min(46%, 520px);
  height: auto;
  opacity: 0.35;
  pointer-events: none;
}
.band-ribbon > :not(.ribbon) {
  position: relative;
  z-index: 1;
}
@media (max-width: 600px) {
  .band-ribbon .ribbon {
    top: 0.5rem;
    transform: none;
    width: 70%;
    opacity: 0.22;
  }
}

/* Home: "Interest in our company" sign-up (listmonk form; not live until setup + Sina's go) */
.signup-form {
  display: grid;
  gap: .9rem;
  max-width: 34rem;
  margin-top: 1.25rem;
}
.signup-form .field {
  display: grid;
  gap: .35rem;
  margin: 0;
}
.signup-form label {
  font-weight: 600;
}
.signup-form input[type="email"],
.signup-form input[type="text"] {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink-soft);
  border-radius: .75rem;
  padding: .7rem .9rem;
}
.signup-form fieldset {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .75rem 1rem 1rem;
  margin: 0;
}
.signup-form legend {
  font-weight: 700;
  padding: 0 .35rem;
}
.signup-form .check {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: .4rem 0 0;
}
.signup-form .check label {
  font-weight: 500;
}
.signup-form input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--ink);
}
.signup-form .news label {
  font-weight: 700;
}
.signup-form :focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.signup .privacy {
  max-width: 34rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.signup-form button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ── Worlds page: click-to-load video card (nothing loads from YouTube before the click) ── */
.video-load {
  position: relative;
  display: block;
  width: min(100%, 40rem);
  aspect-ratio: 16 / 9;
  margin-top: 1rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.video-load img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-load span {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
}
.world iframe {
  display: block;
  width: min(100%, 40rem);
  aspect-ratio: 16 / 9;
  margin-top: 1rem;
  border: 0;
  border-radius: 1.25rem;
}
.video-note {
  font-size: .9rem;
  color: var(--ink-soft);
}

/* ── Worlds page layout (Sina 10-18 polish 1, 2, 4): stills two per row on wide screens, tall shots capped,
   text-only cards compact. Layout only, existing tokens. ── */
.world > img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  margin-top: 1rem;
  border-radius: 1.25rem;
}
.world:not(:has(img, .video-load)) h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}
.band.world:not(:has(img, .video-load)) {
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
@media (min-width: 900px) {
  .world { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; align-items: start; }
  .world > :not(img) { grid-column: 1 / -1; }
}
