/* Formant Lab: responsive layout and Brevo signup integration. */
html { scroll-padding-top: 6.5rem; }
*, *::before, *::after { box-sizing: border-box; }
button, input, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 5px;
}
body .site-nav { gap: 1rem; }
body .nav-actions { flex-shrink: 0; }
body .nav-update-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .65rem 1rem; border-radius: .5rem;
  background: var(--theme-primary); color: #07100b;
  font: 700 .8rem 'Chakra Petch', sans-serif;
  letter-spacing: .06em; text-transform: uppercase;
}
body .hero-primary-link {
  background: var(--theme-primary); color: #07100b;
  border: 1px solid var(--theme-primary);
}
body .hero-primary-link:hover, body .nav-update-link:hover { filter: brightness(1.1); }
body .hero-status { max-width: 100%; line-height: 1.65; }
body .hero-status > span:first-child { flex-shrink: 0; }
body .hero-status > span:last-child { min-width: 0; }

/* A single, visible signup rather than a timed popup. Form submission and
   confirmation handling remain owned by Brevo. */
body #newsletter { padding-top: 1rem; padding-bottom: 2rem; }
body .signup-card {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: 1.25rem;
  position: relative; isolation: isolate;
}
body .signup-card::before {
  content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, var(--theme-tint), transparent 65%);
  pointer-events: none;
}
body .signup-kicker {
  font: 500 .75rem/1.6 'JetBrains Mono', monospace;
  letter-spacing: .16em; color: var(--theme-primary); margin-bottom: .75rem;
}
body .signup-copy h2 {
  font: 700 clamp(1.85rem, 3.3vw, 2.65rem)/1.12 'Chakra Petch', sans-serif;
  color: #f3f5f4; text-transform: uppercase; margin: 0 0 1rem;
}
body .signup-copy > p:last-child { font-size: 1rem; line-height: 1.75; color: #b9c3ce; max-width: 32rem; }
body #newsletter .sib-form { width: 100%; min-width: 0; padding: 0; text-align: left; font: inherit; background: transparent; }
body #newsletter #sib-container { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; text-align: left; background: transparent; }
body #newsletter .sib-form-block { padding: 0; }
body #newsletter #sib-form { margin: 0; }
body #newsletter .form__entry { min-width: 0; }
body #newsletter .entry__label { display: block; color: #e6e9ef; font: inherit; font-size: .95rem; margin: 0 0 .5rem; }
body #newsletter .entry__field { width: 100%; min-width: 0; margin: 0; border: 0; border-radius: .5rem; background: transparent; }
body #newsletter #EMAIL { box-sizing: border-box; display: block; width: 100%; min-width: 0; height: auto; min-height: 54px; padding: .9rem 1rem; border: 1px solid #46505e; border-radius: .5rem; background: #080c10; color: #f3f5f4; font: inherit; font-size: 1rem; }
body #newsletter #EMAIL::placeholder { color: #8d99a8; opacity: 1; }
body #newsletter #EMAIL:focus { outline: 2px solid var(--theme-primary); outline-offset: 3px; }
body #newsletter .signup-submit-row { margin-top: .8rem; }
body #newsletter .sib-form-block__button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; min-height: 54px; border-radius: .5rem; border: 1px solid var(--theme-primary); background: var(--theme-primary); color: #07100b; cursor: pointer; padding: .9rem 1rem; font: 700 1rem/1.3 'Chakra Petch', sans-serif; letter-spacing: .05em; }
body #newsletter .sib-form-block__button:hover { filter: brightness(1.1); }
body #newsletter .sib-form-block__button:disabled { cursor: wait; }
body #newsletter .progress-indicator__icon { width: 20px; height: 20px; fill: currentColor; }
body #newsletter .signup-privacy, body #newsletter .signup-fallback { color: #a4afbd; font-size: .8125rem; line-height: 1.7; margin-top: .85rem; }
body #newsletter .signup-fallback a { text-decoration: underline; }
body #newsletter .sib-form-message-panel { width: 100%; max-width: none; margin: 0 0 1rem; border: 1px solid; border-radius: .5rem; padding: 1rem; font: inherit; font-size: 1rem; line-height: 1.6; }
body #newsletter .sib-form-message-panel__text { justify-content: flex-start; padding: 0; }
body #newsletter #error-message { background: #291512; color: #ffd0bd; border-color: #a96048; }
body #newsletter #success-message { background: #10261a; color: #c2f5cf; border-color: #4b9561; }
body #newsletter .entry__error { color: #ffd0bd; font: inherit; font-size: .875rem; margin: .5rem 0 0; }
body #newsletter .entry__error:empty { display: none; }
body #newsletter .signup-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body .formant-readouts { flex-wrap: wrap; gap: .65rem 1.5rem; font-size: .75rem; line-height: 1.7; }
body .formant-readouts > span { min-width: 0; }
body .vowel-controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 28rem; margin-inline: auto; gap: clamp(.5rem, 2vw, 1.25rem); }
body .vowel-controls .vowel-btn { width: 100%; height: auto; aspect-ratio: 1; min-height: 44px; }
body .skin-preview-header { gap: .75rem; }
body .skin-preview-header > * { min-width: 0; }
body .skin-preview-badge { white-space: nowrap; }
body .skin-lock-description { line-height: 1.6; }
body .skin-rack > div:first-child { opacity: .18; filter: blur(3px); pointer-events: none; }
body .skin-rack > div:last-child { background-color: rgba(5, 8, 7, .92); }

@media (max-width: 859px) {
  body .signup-card { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}
@media (max-width: 639px) {
  html { scroll-padding-top: 5.25rem; }
  body .site-nav { height: 68px; gap: .5rem; }
  body .site-brand { gap: .5rem; }
  body .site-brand > div:first-child { width: 36px; height: 36px; }
  body .site-brand > div:last-child > span:first-child { font-size: .875rem; letter-spacing: .17em; }
  body .nav-actions { gap: .5rem; }
  body #themeToggleBtn { display: inline-flex; justify-content: center; min-width: 44px; min-height: 44px; padding: .6rem; }
  body #themeLabel { display: none; }
  body .nav-update-link { padding: .65rem .75rem; font-size: .75rem; }
  body .hero-kicker { font-size: .875rem; letter-spacing: .15em; line-height: 1.6; }
  body .hero-status { padding: .65rem .85rem; }
  body .hero-status > span:last-child { font-size: .6875rem; letter-spacing: .1em; }
  body .hero-specs > div { min-width: 0; padding: .8rem .6rem; line-height: 1.6; }
  body .hero-specs > div > div:last-child { font-size: .75rem; }
  body #newsletter { padding-top: 0; padding-bottom: 1.5rem; }
  body #vowel-lab > div { padding: 1.5rem 1rem; }
  body #vowel-lab .formant-readouts { display: grid; gap: .5rem; }
  body #vowel-lab .formant-readouts > span { overflow-wrap: anywhere; }
  body .skin-preview-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem .5rem; padding: .85rem .65rem; }
  body .skin-preview-header > div:first-child { grid-column: 1 / -1; }
  body .skin-preview-header > div:nth-child(2) { font-size: .95rem; }
  body .skin-preview-badge { font-size: .5625rem; padding: .25rem .4rem; letter-spacing: .02em; }
  body .skin-lock-title { font-size: clamp(1.2rem, 6vw, 2rem); letter-spacing: .1em; line-height: 1.2; }
  body .skin-lock-badge { font-size: .55rem; letter-spacing: .12em; }
  body .skin-lock-description { font-size: .625rem; margin-top: .5rem; }
  body .skin-rack .hw-knob { width: 20px; height: 20px; flex-shrink: 0; }
  body .skin-rack .hw-knob::after { height: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  body .animate-pulse-slow { animation: none; }
  body .vowel-btn, body #newsletter .sib-form-block__button { transition: none; }
}

/* Supplied brand marks: fit the padded symbol inside the existing header. */
body .site-brand > div:first-child img { width: 145%; height: 145%; max-width: none; flex-shrink: 0; }

body #newsletter .sib-form-container, body #newsletter .sib-form-container * { box-sizing: border-box; }
