/* ======================================================================
   /try — PROFESSIONAL DESIGN PASS (v5 "pro" layer)
   ----------------------------------------------------------------------
   Loads AFTER try.css. Pure visual enhancement layer — does not touch any
   JS hook (ids / structural classes). Elevates the page from "functional
   dashboard" to a premium SaaS product: layered surfaces, ambient
   backdrop, glass panels, sharper type hierarchy, tinted category pills,
   richer depth, and smoother micro-interactions.

   Strategy:
     - Re-declare design tokens (richer palette, real elevation ramp).
     - Reuse every existing selector; only override paint, not structure.
     - Dark-first; light mode kept tasteful via the same token swaps.
   ====================================================================== */

:root {
  /* Brand — slightly punchier, with a usable gradient pair */
  --green: #00E6A4;
  --green-deep: #00B98A;
  --green-bright: #5BFFCB;
  --grad-brand: linear-gradient(135deg, #00E6A4 0%, #38BDF8 55%, #7C5CFC 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(0,230,164,0.16), rgba(124,92,252,0.16));

  /* Refined neutral ramp (light) */
  --bg-page: #F4F6FB;
  --bg-card: #FFFFFF;
  --bg-soft: #F6F8FC;
  --text: #0B1220;
  --muted: #5B6577;

  /* Elevation ramp — soft, layered, premium */
  --shadow-card: 0 1px 2px rgba(15,23,42,0.04), 0 6px 24px rgba(15,23,42,0.06);
  --shadow-pop: 0 18px 48px rgba(15,23,42,0.16);
  --ring: 0 0 0 1px rgba(15,23,42,0.04);

  /* Tighter, more editorial type rhythm */
  --display: clamp(34px, 4.6vw, 52px);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* A deeper, cooler canvas with real surface layering */
    --bg-page: #070B14;
    --bg-card: #0E1626;
    --bg-soft: #141E33;
    --text: #EEF2F9;
    --text-soft: #D4DCEC;
    --muted: #8B97AD;
    --muted-strong: #C3CCDD;
    --border: rgba(255,255,255,0.07);
    --border-strong: rgba(255,255,255,0.14);
    --border-soft: rgba(255,255,255,0.05);
    --green-soft: rgba(0,230,164,0.14);
    --green-line: rgba(0,230,164,0.42);

    --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 16px 48px rgba(0,0,0,0.55);
    --shadow-pop: 0 24px 64px rgba(0,0,0,0.7);
    --ring: 0 0 0 1px rgba(255,255,255,0.04);
    --grad-brand-soft: linear-gradient(135deg, rgba(0,230,164,0.18), rgba(124,92,252,0.18));
  }
}

/* ======================================================================
   AMBIENT PAGE BACKDROP
   Soft radial brand glows behind everything — gives depth without noise.
   ====================================================================== */
body {
  position: relative;
  background: var(--bg-page);
  letter-spacing: -0.005em;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(820px 420px at 18% -8%, rgba(0,230,164,0.10), transparent 60%),
    radial-gradient(760px 460px at 92% 4%, rgba(124,92,252,0.12), transparent 62%),
    radial-gradient(900px 600px at 50% 120%, rgba(56,189,248,0.07), transparent 60%);
}
.try-nav, .try-header, .try-main { position: relative; z-index: 1; }

/* ======================================================================
   TOP NAV — glassy, hairline
   ====================================================================== */
.try-nav {
  background: color-mix(in srgb, var(--bg-page) 72%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.try-logo { font-size: 16px; letter-spacing: -0.02em; }
.try-logo svg { filter: drop-shadow(0 2px 8px rgba(0,230,164,0.25)); }

/* ======================================================================
   HERO HEADER
   ====================================================================== */
.try-header { padding-top: clamp(40px, 7vw, 84px); padding-bottom: 28px; }
.try-header h1 {
  font-size: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 62%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.try-tagline {
  font-size: 17px;
  color: var(--muted);
  max-width: 580px;
  letter-spacing: -0.01em;
}
.banner-pill {
  background: var(--grad-brand-soft);
  border: 1px solid var(--green-line);
  color: var(--green-deep);
  letter-spacing: 1.6px;
  padding: 5px 13px;
  box-shadow: 0 2px 12px rgba(0,230,164,0.18);
}
.try-header-cta-link {
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--green-line);
  background: var(--green-soft);
}
.try-header-cta-link:hover {
  background: var(--green-deep);
  color: #04231a;
  border-color: var(--green-deep);
}
@media (prefers-color-scheme: dark) {
  .try-header-cta-link:hover { color: #04231a; }
}

/* ======================================================================
   DEMO CARD SHELL — the centerpiece
   ====================================================================== */
.try-main { max-width: 1220px; }
.demo-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
  position: relative;
  isolation: isolate;
  grid-template-columns: 372px minmax(0, 1fr);
}
/* Hairline gradient frame so the card edge catches light */
.demo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,0.10), transparent 36%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* ======================================================================
   LEFT RAIL
   ====================================================================== */
.try-rail { background: color-mix(in srgb, var(--bg-card) 88%, var(--bg-soft)); }
.rail-head {
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding-top: 22px;
  gap: 18px;
}
.rail-title { font-size: 15px; letter-spacing: -0.01em; }
.filter-label {
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--muted);
}

/* Filter pills — compact, tactile, brand-active */
.filter-pill {
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 550;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--muted-strong);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .08s ease;
}
.filter-pill:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.filter-pill.is-active {
  background: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green-deep);
  box-shadow: 0 2px 10px rgba(0,230,164,0.16);
}
.filter-pill.is-active:hover { transform: none; }

.rail-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Question cards */
.rail-list { padding: 14px 14px 20px; gap: 10px; }
.rail-item {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  padding: 14px 15px;
  transition: background .16s ease, border-color .16s ease, transform .14s ease, box-shadow .16s ease;
}
.rail-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.rail-item.is-active {
  background: color-mix(in srgb, var(--green-soft) 60%, var(--bg-card));
  border-color: var(--green-line);
  box-shadow: 0 0 0 1px var(--green-line), 0 10px 28px rgba(0,230,164,0.12);
}
.rail-item.is-active::before { width: 3px; background: var(--grad-brand); }
.rail-item-cat { font-size: 12px; font-weight: 600; }
.rail-item-cat .dot { width: 8px; height: 8px; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent); }
.rail-item-text { font-size: 14px; font-weight: 550; line-height: 1.5; }
.rail-item-diff { font-size: 10px; letter-spacing: 0.6px; padding: 3px 7px; }
.rail-item-play {
  width: 26px; height: 26px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
}
.rail-item:hover .rail-item-play { background: var(--grad-brand); border-color: transparent; color: #04231a; }
.rail-item.is-active .rail-item-play { background: var(--grad-brand); border-color: transparent; color: #04231a; }

/* ======================================================================
   STAGE — toolbar
   ====================================================================== */
.stage-top {
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.stage-toolbar-center { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.toolbar-avatar {
  background: var(--grad-brand);
  box-shadow: 0 2px 10px rgba(0,230,164,0.30);
}
.toolbar-avatar svg { color: #04231a !important; }
.try-icon-btn { border-radius: 10px; }
.try-icon-btn[aria-pressed="true"] {
  background: var(--green-soft);
  color: var(--green-deep);
  border-color: var(--green-line);
}

/* ======================================================================
   EMPTY STATE — richer, more inviting
   ====================================================================== */
.stage-empty { gap: 16px; min-height: 440px; padding: 40px 28px; }
.stage-empty-icon {
  width: 92px; height: 92px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--border);
  color: var(--green-deep);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 12px 36px rgba(0,230,164,0.10);
  position: relative;
}
.stage-empty-icon::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px dashed var(--green-line);
  opacity: 0.5;
}
.stage-empty-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.stage-empty-body { font-size: 15px; max-width: 480px; color: var(--muted); line-height: 1.6; }
.stage-empty-hint {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}
.stage-empty-hint kbd {
  background: var(--bg-card);
  border-color: var(--border-strong);
}

/* ======================================================================
   ACTIVE — question card
   ====================================================================== */
.stage-active { gap: 20px; }
.qa-card {
  background: var(--grad-brand-soft);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.qa-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(420px 180px at 0% 0%, rgba(0,230,164,0.10), transparent 70%);
  pointer-events: none;
}
.stage-avatar {
  background: var(--grad-brand);
  border: none;
  box-shadow: 0 8px 28px rgba(0,230,164,0.28);
}
.stage-avatar-fallback { color: #04231a; font-weight: 800; }
.stage-avatar.is-speaking { box-shadow: 0 0 0 4px var(--green-soft), 0 8px 28px rgba(0,230,164,0.42); }
.stage-question { font-size: 19px; font-weight: 550; letter-spacing: -0.01em; line-height: 1.5; }
.qa-meta .meta-pill {
  background: color-mix(in srgb, var(--bg-card) 78%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 11.5px;
}

/* ======================================================================
   AUDIO STRIP
   ====================================================================== */
.audio-strip {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 11px 14px;
}
.audio-btn { background: var(--bg-card); }
.audio-btn:hover { background: var(--green-soft); color: var(--green-deep); border-color: var(--green-line); }
.audio-progress-bar { background: var(--grad-brand); }

/* ======================================================================
   ANSWER AREA
   ====================================================================== */
.stage-textarea {
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 14.5px;
  padding: 16px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.stage-textarea:focus {
  border-color: var(--green);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* ======================================================================
   BUTTONS — confident, with brand gradient on primary
   ====================================================================== */
.btn-primary,
.btn-secondary,
.btn-ghost { border-radius: 12px; font-weight: 650; letter-spacing: -0.01em; }
.btn-primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  color: #04231a;
  border: none;
  box-shadow: 0 6px 20px rgba(0,230,164,0.28);
  transition: background-position .35s ease, transform .06s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover {
  background-position: 100% 100%;
  color: #04231a;
  filter: brightness(1.04);
  box-shadow: 0 10px 28px rgba(0,230,164,0.36);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] {
  background: var(--border-strong);
  color: var(--muted);
  box-shadow: none;
  filter: none;
}
.btn-secondary {
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-card); border-color: var(--green-line); }

/* ======================================================================
   CRITIQUE CARD
   ====================================================================== */
.critique {
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}
.critique-title { color: var(--muted); letter-spacing: 1px; }

/* Score chip — make it a focal brand element */
.critique-score {
  background: var(--grad-brand-soft);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 6px 14px;
}
.critique-score .score-num {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ======================================================================
   CODE BLOCK — slightly deeper surface for the pro look
   ====================================================================== */
.qa-code-body {
  background: #0A1120;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.3);
}

/* ======================================================================
   MODAL
   ====================================================================== */
.modal {
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--border);
}

/* ======================================================================
   MOTION POLISH
   ====================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .stage-active > * { animation: proRise .4s cubic-bezier(.22,.61,.36,1) both; }
  .stage-active > *:nth-child(2) { animation-delay: .04s; }
  .stage-active > *:nth-child(3) { animation-delay: .08s; }
  .stage-active > *:nth-child(4) { animation-delay: .12s; }
  @keyframes proRise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* == Layout round 2026-07: wider demo card, taller stage, promo section pushed down == */
@media (min-width: 980px) {
  .try-main { max-width: 1460px; }
  .demo-card {
    grid-template-columns: 344px minmax(0, 1fr);
    height: clamp(560px, calc(100vh - 128px), 1060px);
  }
  .try-below { margin-top: 130px; }
}

/* ======================================================================
   NAV + HERO POLISH
   ====================================================================== */
.try-nav-cta {
  box-shadow: 0 4px 14px rgba(0, 230, 164, 0.22);
}
.try-stats {
  padding: 10px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-card) 84%, transparent);
  border: 1px solid var(--border-soft);
}
.try-steps {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}
.try-demo-intro {
  padding: 0 2px;
}
.try-demo-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.try-demo-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Rail search + select */
.rail-search-input,
.filter-select {
  background: color-mix(in srgb, var(--bg-card) 90%, var(--bg-soft));
}
.rail-head { gap: 14px; padding-bottom: 12px; }

/* Critique promo + badge */
.critique-badge {
  gap: 5px;
}
.critique-promo {
  background: color-mix(in srgb, var(--green-soft) 70%, var(--bg-card));
  border-color: var(--green-line);
}

/* ======================================================================
   HOW IT WORKS — scroll expansion section (moved from inline styles)
   ====================================================================== */
.se {
  position: relative;
  background: #070b14;
  color: #e9eef7;
  font-family: var(--font-sans);
  margin-top: 72px;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
}
.se-track { height: 200vh; position: relative; }
.se-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 20px;
  text-align: center;
}
.se-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 28%, rgba(37, 99, 235, 0.22), transparent 70%),
    radial-gradient(50% 50% at 82% 82%, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(48% 50% at 14% 76%, rgba(16, 185, 129, 0.16), transparent 70%);
  transition: opacity 0.15s linear;
}
.se-eyebrow {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7fe9c4;
  margin-bottom: 14px;
}
.se-title {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(34px, 7vw, 72px);
  font-weight: 800;
  line-height: 1;
  display: flex;
  gap: 0.3em;
  justify-content: center;
  white-space: nowrap;
  will-change: transform;
}
.se-w1,
.se-w2 {
  display: inline-block;
  background: linear-gradient(90deg, #7fe9c4, #9ec1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  will-change: transform;
}
.se-media {
  position: relative;
  z-index: 1;
  width: 300px;
  height: 210px;
  max-width: 94vw;
  max-height: 64vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  margin: 26px 0 0;
  will-change: width, height;
}
.se-play {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #0b1322;
  cursor: pointer;
  position: relative;
}
.se-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}
.se-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(0, 229, 160, 0.94);
  color: #06231a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 40px -10px rgba(0, 229, 160, 0.7);
  transition: transform 0.2s ease;
}
.se-play-btn svg { width: 30px; height: 30px; margin-left: 3px; }
.se-play:hover .se-play-btn { transform: translate(-50%, -50%) scale(1.08); }
.se-hint {
  position: relative;
  z-index: 2;
  margin: 24px 0 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(233, 238, 247, 0.65);
  transition: opacity 0.15s linear;
}
.se-reveal {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 92px;
}
.se-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.se-step {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 26px 22px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.se-step.in { opacity: 1; transform: none; }
.se-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #2563eb 55%, #7c3aed);
  margin-bottom: 14px;
}
.se-step h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: #fff; }
.se-step p { margin: 0; font-size: 14.5px; line-height: 1.6; color: rgba(233, 238, 247, 0.72); }
.se-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 38px;
}
.se-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: #06231a;
  background: #00e5a0;
  box-shadow: 0 16px 40px -16px rgba(0, 229, 160, 0.7);
  transition: transform 0.2s ease;
}
.se-btn:hover { transform: translateY(-2px); }
.se-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: #cfe0ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.se-btn-ghost:hover { border-color: rgba(0, 229, 160, 0.5); color: #fff; }
@media (max-width: 760px) {
  .se-steps { grid-template-columns: 1fr; }
  .se-title { font-size: clamp(32px, 11vw, 52px); }
}
.se.no-motion .se-track { height: auto; }
.se.no-motion .se-pin { position: static; height: auto; padding: 72px 20px 40px; }
.se.no-motion .se-media { width: min(900px, 94vw); height: min(58vh, 480px); }
.se.no-motion .se-step { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .se-step { opacity: 1; transform: none; transition: none; }
  .se-play:hover .se-play-btn { transform: translate(-50%, -50%); }
}
