/* CukeStudio marketing site.
   Deliberately single-theme: it wears the product's own chrome — the dark
   console the app's toolbar and mode bar already use, the emerald lamp, and
   the real suite-tag colours (amber = smoke, violet = regression) — so the
   page and the app read as one thing. Every colour is painted explicitly
   rather than inherited from the host. */

:root {
  --console: #151c2c;
  --console-raised: #1e2739;
  --console-line: #2c3752;
  --console-text: #e2e8f0;
  --console-muted: #8fa0bd;
  --accent: #4ade80;
  --accent-deep: #15803d;

  /* Product semantics, not decoration: these are the colours a scenario's
     suite tags actually carry inside the app. */
  --smoke: #f59e0b;
  --regression: #a78bfa;
  --reject: #dc2626;

  --paper: #f8fafc;
  --surface: #ffffff;
  --line: #e2e8f0;
  --ink: #1e293b;
  --ink-soft: #556277;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --page: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

.mono { font-family: var(--mono); font-size: 0.94em; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  /* Locked (was content-driven) so .brand-logo-lg can run bigger than the
     bar without growing it -- border-box means this height already
     accounts for the padding below, so raising it doesn't also require
     touching the padding. overflow: visible (the default) is what lets the
     oversized logo actually paint outside this box instead of clipping. */
  height: 62px;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: var(--console);
  border-bottom: 1px solid var(--console-line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--console-text);
  text-decoration: none;
}
.brand img { border-radius: 0.5rem; }
.brand-sm { font-size: 0.9rem; }
/* Taller than .topbar's own locked height (62px) on purpose -- the bar
   stays put and this overhangs above and below it, rather than the more
   ordinary "bigger logo, bigger bar" -- see .topbar's own comment. */
.brand-logo-lg {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}

.topnav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.88rem;
}
.topnav a { color: var(--console-muted); text-decoration: none; }
.topnav a:hover { color: var(--console-text); }
.topnav-cta {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--console-line);
  border-radius: 999px;
  color: var(--accent) !important;
}
.topnav-cta:hover { border-color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  background: var(--console);
  color: var(--console-text);
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(4rem, 9vw, 7rem);
}

.hero-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.2rem, 5.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 680;
  text-wrap: balance;
}
.mono-accent { font-family: var(--mono); color: var(--accent); font-size: 0.85em; }

.lede {
  margin: 0 0 1.9rem;
  max-width: 34em;
  font-size: 1.06rem;
  color: var(--console-muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-block;
  padding: 0.72rem 1.35rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 620;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #06240f; }
.btn-primary:hover { background: #6ee79a; }
/* background here (not left to the generic button.btn reset below) because
   a <button class="btn btn-ghost">'s UA-default background has to lose to
   THIS rule — button.btn's higher specificity (element+class beats class
   alone) would otherwise make a bare `background: none` there win over
   .btn-primary's real background too, on any button using both classes
   (see the consent banner's Accept button, the first one on the site). */
.btn-ghost { border-color: var(--console-line); color: var(--console-text); background: none; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
/* button.btn reuses the <a class="btn"> look (see the instance-request
   dialog trigger and its own submit/cancel buttons) — strips native button
   chrome so it's indistinguishable from the anchor version. Deliberately no
   `background` here — see .btn-ghost's comment for why. */
button.btn { font: inherit; cursor: pointer; }

.hero-note {
  margin: 1.2rem 0 0;
  font-size: 0.85rem;
  color: var(--console-muted);
}

/* the fake editor panel */
.hero-panel {
  border: 1px solid var(--console-line);
  border-radius: 12px;
  background: var(--console-raised);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.panel-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--console-line);
}
.dot { width: 0.62rem; height: 0.62rem; border-radius: 50%; display: inline-block; }
.dot-r { background: #ef5f56; } .dot-y { background: #f5bf4f; } .dot-g { background: #62c554; }
.panel-file {
  margin-left: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--console-muted);
}

.code {
  margin: 0;
  padding: 1.1rem 1.1rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.85;
  color: #cbd5e1;
  overflow-x: auto;
}
.code .ln {
  display: inline-block;
  width: 2.1rem;
  color: #4b5a76;
  user-select: none;
}
.code .k { color: var(--accent); font-weight: 600; }
.code .kw { color: #7dd3fc; font-weight: 600; }
.code .tag { color: var(--smoke); }
.squiggle {
  text-decoration: underline wavy var(--reject);
  text-underline-offset: 4px;
}

.lint {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--console-line);
  background: rgba(220, 38, 38, 0.07);
  font-size: 0.82rem;
  color: var(--console-muted);
}
.lint-badge {
  flex: 0 0 auto;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.18);
  color: #fca5a5;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lint em { color: var(--console-text); font-style: italic; }

/* ---------- alternating feature sections ---------- */

.feature { padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem); }
.feature-alt { background: var(--surface); }

.feature-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* The alternating section leads with the screenshot, so the wide column has
   to swap sides too — otherwise that shot renders smaller than the others
   and the run of three looks accidental. */
.feature-alt .feature-inner {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.section-kicker {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.feature h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 660;
  text-wrap: balance;
}
.feature p { margin: 0 0 1.2rem; color: var(--ink-soft); max-width: 36em; }

.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.ticks li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent-deep);
}

.chip {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 650;
}
.chip-smoke { background: rgba(245, 158, 11, 0.16); color: #a16207; }
.chip-regression { background: rgba(167, 139, 250, 0.18); color: #6d3fd4; }
.chip-extended { background: rgba(251, 113, 133, 0.16); color: #be123c; }

.shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

/* ---------- audience band ---------- */

.band {
  background: var(--console);
  color: var(--console-text);
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem);
}
.band-inner { max-width: var(--page); margin: 0 auto; }
.band-title {
  margin: 0 0 2rem;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  letter-spacing: -0.02em;
  font-weight: 640;
  text-wrap: balance;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.card {
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--console-line);
  border-radius: 12px;
  background: var(--console-raised);
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 640;
  color: var(--accent);
}
.card p { margin: 0; font-size: 0.92rem; color: var(--console-muted); }

/* ---------- closing CTAs ---------- */

.cta { padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem); background: var(--surface); }
.cta-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: grid;
  /* 380px (not 300px) is deliberate: with four cards now in this section,
     that's just wide enough that three can't fit alongside the page's
     max-width, forcing a clean 2x2 instead of an awkward 3-then-1. */
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
}
.cta-block {
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.cta-block h2 {
  margin: 0 0 0.7rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-weight: 660;
}
.cta-block-title-icon { display: flex; align-items: center; gap: 0.55rem; }
.docker-icon { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; fill: currentColor; color: #2496ed; }
.cta-block p { margin: 0 0 1.3rem; color: var(--ink-soft); font-size: 0.96rem; }
.cta-block .btn-primary { background: var(--accent-deep); color: #ffffff; }
.cta-block .btn-primary:hover { background: #166534; }
.cta-block .btn-ghost { border-color: var(--line); color: var(--ink); }
.cta-block .btn-ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); }

/* ---------- instance-request dialog ---------- */

.dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(440px, calc(100vw - 2.5rem));
  color: var(--ink);
  background: var(--surface);
}
.dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.dialog-form { padding: clamp(1.5rem, 4vw, 2.2rem); display: flex; flex-direction: column; }
.dialog-form h2 { margin: 0 0 0.35rem; font-size: 1.25rem; letter-spacing: -0.02em; }
.dialog-lede { margin: 0 0 1.3rem; color: var(--ink-soft); font-size: 0.92rem; }
.dialog-form label {
  font-size: 0.82rem;
  font-weight: 620;
  color: var(--ink-soft);
  margin: 0.9rem 0 0.35rem;
}
.dialog-form label:first-of-type { margin-top: 0; }
.dialog-form input[type="text"],
.dialog-form input[type="email"],
.dialog-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--paper);
}
.dialog-form input:focus, .dialog-form textarea:focus { outline: 2px solid var(--accent-deep); outline-offset: 1px; }
.dialog-form textarea { resize: vertical; }
.dialog-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dialog-message { margin: 0.9rem 0 0; font-size: 0.86rem; min-height: 1.2em; }
.dialog-message-ok { color: var(--accent-deep); }
.dialog-message-error { color: #b91c1c; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.2rem; }
.dialog-actions .btn { padding: 0.6rem 1.15rem; font-size: 0.9rem; }
.dialog-actions .btn-primary:disabled { opacity: 0.65; cursor: default; transform: none; }

/* ---------- footer ---------- */

.footer {
  background: var(--console);
  color: var(--console-muted);
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--console-line);
}
.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.86rem;
}
.footer-note { margin: 0; }
.footer-note a { color: var(--console-text); }
.footer-links { margin-left: auto; display: flex; gap: 1.2rem; }
.footer-links a { color: var(--console-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
/* Contact opens the same dialog the "Request an instance" card does (see
   index.html's script), so it's a <button>, not an <a> — reset to look
   identical to its sibling links. */
.footer-link-btn {
  font: inherit;
  color: var(--console-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.footer-link-btn:hover { color: var(--accent); }

/* ---------- cookie consent banner ---------- */

/* Without this, the [hidden] attribute set/cleared by index.html's script
   silently does nothing: this rule's own `display: flex` below has equal
   specificity to the browser's default `[hidden] { display: none }`, and
   author styles win ties over the UA stylesheet — so [hidden] would be set
   correctly but the banner would stay visibly flexed regardless. */
.consent-banner[hidden] { display: none; }
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--console);
  border-top: 1px solid var(--console-line);
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.consent-banner p { margin: 0; font-size: 0.86rem; color: var(--console-muted); max-width: 60ch; }
.consent-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.consent-actions .btn { padding: 0.55rem 1.1rem; font-size: 0.88rem; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  /* .feature-alt .feature-inner above is (0,2,0), so the single-column
     override has to match that weight or the alternating section keeps its
     two columns and the copy gets squeezed into a strip. */
  .hero-inner,
  .feature-inner,
  .feature-alt .feature-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Keep the screenshot under its copy on narrow screens, whichever order
     the source uses for the alternating layout. */
  .feature-alt .shot { order: 2; }
  .topnav { gap: 0.9rem; font-size: 0.82rem; }
  .topnav a:not(.topnav-cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

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