/* CompyLab waitlist page.
   Every color, radius and font comes from the plugin's design kit
   (tools/ui_assets/ui_kit.py, v2_base.py) and marketing/poster.html. */

:root {
  /* plate and panels */
  --plate-top: #16181d;
  --plate-bot: #0e1013;
  --bg: #121418;
  --panel-top: #1c1f23;
  --panel-bot: #15171a;
  --panel-outline: #070809;
  --key-rim: #2a2e33;

  /* readout well */
  --well-top: #0b0d0f;
  --well-bot: #121417;
  --well-rim: #2c3036;
  --well-tick: #4a5058;

  /* plum (mood panel) */
  --plum-top: #231a35;
  --plum-bot: #17112a;
  --plum-row-top: #2c2442;
  --plum-row-bot: #231c36;
  --plum-label: #8a80a8;
  --lavender: #b9b0d6;

  /* accents */
  --cyan: #00d4ff;
  --cyan-bright: #52e3ff;
  --cyan-rim: #4fb9d6;
  --orange: #ff7a33;
  --arp-orange: #e97837;
  --amber: #ffb547;
  --amber-text: #ffc46b;
  --teal: #2fd4cc;

  /* text */
  --ink: #f4f1ec;
  --txt: #c5cbd2;
  --dim: #8a9198;
  --label: #6c737b;

  /* GENERATE button */
  --gen-top: #ffa25e;
  --gen-bot: #d8541a;
  --gen-hover-top: #ffb274;
  --gen-hover-bot: #e6621f;
  --gen-down-top: #f08a48;
  --gen-down-bot: #c04a14;
  --gen-rim: #5a2410;
  --gen-text: #2e0f03;
  --gen-sheen: #ffe2c4;

  /* transport key */
  --key-top: #1a1d21;
  --key-bot: #0d0f11;
  --key-outer: #3a3f45;

  /* radii */
  --r-panel: 14px;
  --r-row: 9px;
  --r-well: 8px;
  --r-small: 4px;
  --r-pill: 999px;

  --font: 'Poppins', system-ui, sans-serif;
  --gutter: 16px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--txt);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 600px at 88% 4%, rgba(90, 60, 140, .38), transparent 60%),
    radial-gradient(800px 520px at 6% 40%, rgba(0, 212, 255, .10), transparent 60%),
    radial-gradient(700px 500px at 96% 92%, rgba(233, 120, 55, .16), transparent 60%),
    linear-gradient(180deg, var(--plate-top) 0%, var(--plate-bot) 100%);
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

/* brushed-metal grain, as on the plugin's plate */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: .05;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px);
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(var(--gutter), 4vw, 40px);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* section label, like "SCALE" / "HARMONY · VOICE-LEADING" */
.label {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--label);
}
.label-plum { color: var(--plum-label); }

/* ── panels: the plugin's panel() ───────────────────────────────────────── */
.panel {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  border: 1px solid var(--panel-outline);
  border-radius: var(--r-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    0 4px 20px rgba(0, 0, 0, .65);
}

.panel-plum {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--plum-top), var(--plum-bot));
  border: 1px solid var(--panel-outline);
  border-radius: var(--r-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 20px rgba(0, 0, 0, .65);
}

/* ── header ─────────────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

/* marketing/compylab_logo with unrule_01.png, cropped to its content */
.brand-logo {
  height: 36px;
  width: auto;
  max-width: 100%;
}

.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1.5px solid rgba(0, 212, 255, .45);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; box-shadow: 0 0 2px var(--cyan); } }

/* ── hero: full-bleed studio render ─────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  min-height: clamp(560px, 80vh, 820px);
  padding-block: 56px;
  /* dark on the left where the copy sits, lighter on the right behind the demo
     frame; top and bottom edges blend into the page */
  background:
    linear-gradient(180deg, rgba(14, 16, 19, .55) 0%, rgba(14, 16, 19, 0) 16%, rgba(14, 16, 19, 0) 78%, var(--bg) 100%),
    linear-gradient(90deg, rgba(14, 16, 19, .70) 0%, rgba(14, 16, 19, .55) 30%, rgba(14, 16, 19, .30) 55%, rgba(14, 16, 19, .25) 100%),
    url("assets/studio-warm.jpg");
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
}
.hero-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.hero-copy {
  padding: 32px 32px 44px;
  background: rgba(18, 20, 24, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
.hero-copy .sub { color: var(--txt); }
.hero-copy .label { color: var(--dim); }
.hero-copy .micro { color: var(--dim); }

h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}
h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  margin: 22px 0 32px;
  max-width: 560px;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--dim);
  text-wrap: pretty;
}

/* ── waitlist form ──────────────────────────────────────────────────────── */
.waitlist { max-width: 560px; }

.field-row {
  display: flex;
  gap: 10px;
}

/* email input = the plugin's readout well */
.well-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  font: 500 16px var(--font);
  color: var(--amber-text);
  caret-color: var(--amber);
  background:
    repeating-linear-gradient(90deg, var(--well-tick) 0 1px, transparent 1px 6px) top 3px left 6px / calc(100% - 12px) 3px no-repeat,
    repeating-linear-gradient(90deg, var(--well-tick) 0 1px, transparent 1px 6px) bottom 3px left 6px / calc(100% - 12px) 3px no-repeat,
    linear-gradient(180deg, var(--well-top), var(--well-bot));
  border: 1px solid var(--well-rim);
  border-radius: var(--r-well);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .8);
  transition: border-color .15s, box-shadow .15s;
}
.well-input::placeholder { color: #a0a6ad; }
.well-input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .8), 0 0 0 3px rgba(255, 181, 71, .18), 0 0 14px rgba(255, 181, 71, .25);
}
.well-input[aria-invalid="true"] { border-color: var(--orange); }

/* CTA = the GENERATE button */
.btn-generate {
  flex: none;
  height: 54px;
  padding: 0 24px;
  font: 700 15px var(--font);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gen-text);
  background:
    linear-gradient(180deg, rgba(255, 226, 196, .45) 0%, rgba(255, 226, 196, 0) 50%),
    linear-gradient(180deg, var(--gen-top), var(--gen-bot));
  border: 2px solid var(--gen-rim);
  border-radius: var(--r-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 224, .55),
    0 6px 8px rgba(0, 0, 0, .55),
    0 0 18px rgba(255, 122, 51, .45);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .08s, box-shadow .15s;
}
.btn-generate:hover {
  background:
    linear-gradient(180deg, rgba(255, 226, 196, .5) 0%, rgba(255, 226, 196, 0) 50%),
    linear-gradient(180deg, var(--gen-hover-top), var(--gen-hover-bot));
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 224, .55),
    0 6px 8px rgba(0, 0, 0, .55),
    0 0 22px rgba(255, 122, 51, .65);
}
.btn-generate:active {
  transform: translateY(1px);
  background:
    linear-gradient(180deg, rgba(255, 226, 196, .2) 0%, rgba(255, 226, 196, 0) 50%),
    linear-gradient(180deg, var(--gen-down-top), var(--gen-down-bot));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5), 0 3px 4px rgba(0, 0, 0, .55), 0 0 12px rgba(255, 122, 51, .35);
}

.micro {
  margin: 14px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--label);
}

.form-error { margin: 10px 0 0; font-size: 13px; color: var(--orange); }

/* success = the selected mood row */
.form-success {
  margin: 0;
  padding: 16px 20px;
  font-weight: 500;
  color: #ffb57e;
  background: linear-gradient(180deg, #47190a, #2a0d05);
  border: 1.5px solid #ff9150;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(255, 122, 51, .35);
}

/* ── media placeholder ──────────────────────────────────────────────────── */
.media {
  margin: 0;
  padding: 12px;
}
.media-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-well);
  border: 1px solid var(--well-rim);
  background: var(--well-top);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8);
}
.media-screen img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: .45;
  filter: saturate(.85);
}

/* play key = the PLAY transport icon */
.play-key {
  position: absolute;
  left: 50%; top: 50%;
  width: 84px; height: 84px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1.5px solid var(--key-outer);
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 6px 14px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(79, 185, 214, .55),
    0 0 26px rgba(0, 212, 255, .25);
  cursor: pointer;
  transition: box-shadow .15s, transform .08s;
}
.play-key:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 6px 14px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(79, 185, 214, .9),
    0 0 34px rgba(0, 212, 255, .45);
}
.play-key:active { transform: translate(-50%, -50%) translateY(1px); }
.play-tri {
  width: 0; height: 0;
  margin-left: 6px;
  border-style: solid;
  border-width: 16px 0 16px 28px;
  border-color: transparent transparent transparent var(--cyan-bright);
  filter: drop-shadow(0 0 7px var(--cyan));
}

.media figcaption {
  padding: 12px 4px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--label);
}

/* ── differentiation callout ────────────────────────────────────────────── */
.callout-section { padding-bottom: 72px; }
.callout { padding: clamp(24px, 4vw, 44px); }
.callout blockquote { margin: 0; }
.callout blockquote p {
  margin: 0;
  max-width: 880px;
  font-size: clamp(19px, 2.3vw, 26px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--lavender);
}
.callout .hl { color: #ffb57e; }

/* ── features ───────────────────────────────────────────────────────────── */
.features { padding-bottom: 72px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  padding: 26px 26px 28px;
  transition: border-color .15s, box-shadow .15s;
}
.feature:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    0 4px 20px rgba(0, 0, 0, .65),
    0 0 18px color-mix(in srgb, var(--accent) 18%, transparent);
}
.feature-dot {
  display: block;
  width: 10px; height: 10px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.feature h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}
.feature p { margin: 0; font-size: 15px; color: var(--dim); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-footer { padding-bottom: 40px; }
.final-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(28px, 5vw, 52px) clamp(18px, 4vw, 40px);
}
.final-cta h2 {
  margin: 0 0 22px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  color: var(--ink);
}
.final-cta .waitlist { width: 100%; }

/* label style, like "SCALE" / "HARMONY · VOICE-LEADING" */
.byline {
  margin: 32px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .26em;
  text-align: center;
  color: var(--dim);
}

.copyright {
  margin: 8px 0 0;
  font-size: 12px;
  text-align: center;
  color: var(--label);
}

/* ── responsive ─────────────────────────────────────────────────────────── */
/* wide screens: copy card and demo frame side by side */
@media (min-width: 1000px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 56px;
  }
}

/* narrower screens: card above the frame, image darkened evenly */
@media (max-width: 900px) {
  .hero {
    align-items: flex-start;
    min-height: 0;
    padding-top: 32px;
    padding-bottom: 56px;
    background:
      linear-gradient(180deg, rgba(14, 16, 19, .70) 0%, rgba(14, 16, 19, .50) 55%, rgba(14, 16, 19, .35) 80%, var(--bg) 100%),
      url("assets/studio-warm.jpg");
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
  }
}

@media (max-width: 640px) {
  .hero-copy { padding: 22px 18px 30px; }
  .site-header { padding-top: 20px; padding-bottom: 20px; }
  .brand-logo { height: 26px; }
  .badge { padding: 6px 11px; font-size: 10px; letter-spacing: .08em; }
  .field-row { flex-direction: column; }
  .btn-generate { width: 100%; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .play-key { width: 64px; height: 64px; border-radius: 14px; }
  .play-tri { border-width: 12px 0 12px 21px; margin-left: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* demo video, swapped in by the play key */
.media-video {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
