/* ============================================================
   AIPro Bot — концепт C «Скрол-історія» · спільна дизайн-система
   Manrope (display/body) · IBM Plex Mono (службовий)
   ============================================================ */

/* ── TOKENS ── */
:root {
  --ink:      #0E1526;
  --ink-mid:  #1A2340;
  --ink-soft: #253050;
  --ivory:    #F5EFE2;
  --ivory-dim:#C8C0AF;
  --honey:    #E5A33D;
  --honey-glow: rgba(229,163,61,.18);
  --honey-deep: #B87E22;
  --tg:       #2AABEE;
  --tg-dark:  #1A8BC9;
  --danger:   #F08A6C;
  --r: 24px;
  --r-lg: 28px;
  --phone-w: 320px;
  --phone-h: 580px;
  --sans: 'Manrope', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 80px; /* bottom dock space */
}
::selection { background: var(--honey); color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--honey); outline-offset: 3px; border-radius: 4px;
}

/* ── NOISE TEXTURE ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
}

/* ── BOKEH STARS ── */
.stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.star {
  position: absolute;
  border-radius: 50%;
  background: var(--ivory);
  animation: twinkle var(--dur, 4s) ease-in-out infinite alternate;
  animation-delay: var(--del, 0s);
}
@keyframes twinkle { from { opacity: var(--lo, .08); } to { opacity: var(--hi, .28); } }

/* ── HEADER ── */
.site-head {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 40px; max-width: 1100px; margin: 0 auto;
}
.head-left { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.head-brand { white-space: nowrap; }
.head-brand {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .14em;
  color: var(--honey); text-decoration: none;
}
.head-back {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  color: var(--ivory-dim); text-decoration: none; transition: color .2s;
  white-space: nowrap;
}
.head-back:hover { color: var(--honey); }
.head-tg {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  color: var(--ivory-dim); text-decoration: none; padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  transition: border-color .2s, color .2s; white-space: nowrap;
}
.head-tg:hover { border-color: var(--honey); color: var(--honey); }

/* ── LAYOUT: MAIN STAGE ── */
main { position: relative; z-index: 1; }
.stage {
  display: grid;
  grid-template-columns: 1fr var(--phone-w);
  gap: 0 56px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  align-items: start;
}
.chapters { grid-column: 1; }
.phone-col {
  grid-column: 2;
  position: sticky;
  top: 32px;
  height: calc(100dvh - 64px);
  display: flex;
  align-items: center;
}

/* ── CHAPTER ── */
.chapter {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s ease, transform .6s ease;
}
.chapter.visible { opacity: 1; transform: none; }

/* ── HERO ── */
.hero-mono {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  color: var(--honey); text-transform: uppercase; margin-bottom: 28px;
  display: flex; align-items: center; gap: 10px;
}
.hero-mono::before { content: ''; display: inline-block; width: 28px; height: 1px; background: var(--honey); }
h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.08;
  color: var(--ivory); margin-bottom: 24px;
}
h1 em { font-style: normal; color: var(--honey); }
.hero-sub {
  font-size: 1.1rem; color: var(--ivory-dim); max-width: 460px;
  margin-bottom: 40px; line-height: 1.7;
}
.scroll-hint {
  font-family: var(--mono); font-size: .7rem; color: var(--ivory-dim);
  letter-spacing: .12em; opacity: .6; display: flex; align-items: center; gap: 8px;
}
.scroll-hint::after {
  content: ''; display: inline-block; width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--ivory-dim), transparent); margin-left: 2px;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }

/* ── CHAPTER LABELS / HEADINGS ── */
.ch-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
  color: var(--honey); text-transform: uppercase; margin-bottom: 16px; opacity: .85;
}
.ch-title {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.12;
  color: var(--ivory); margin-bottom: 20px;
}
.ch-body { font-size: 1rem; color: var(--ivory-dim); max-width: 420px; line-height: 1.75; }
.ch-body strong { color: var(--ivory); font-weight: 500; }

/* ── GENERIC SECTION ── */
.sec {
  padding: 0 40px 100px;
  max-width: 1100px; margin: 0 auto;
  position: relative; z-index: 1;
}
.mono-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
  color: var(--honey); text-transform: uppercase; margin-bottom: 32px;
}
.sec-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; letter-spacing: -.025em; line-height: 1.15;
  margin: -16px 0 28px;
}

/* ── HUD MODULE PANEL (shared: niches, plans) ── */
.hud-panel {
  border-radius: 8px;
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid rgba(255,255,255,.09);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hud-panel::before, .hud-panel::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid rgba(245,239,226,.25);
  transition: border-color .25s;
  pointer-events: none;
}
.hud-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-top-left-radius: 8px; }
.hud-panel::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; border-bottom-right-radius: 8px; }
.hud-panel:hover {
  border-color: rgba(229,163,61,.45);
  box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(229,163,61,.12);
}
.hud-panel:hover::before, .hud-panel:hover::after { border-color: var(--honey); }

/* ── NICHES STRIP ── */
#niches { padding: 80px 0 100px; overflow: hidden; position: relative; z-index: 1; }
.niches-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
  color: var(--honey); text-transform: uppercase;
  margin: 0 auto 32px; max-width: 1100px; padding: 0 40px;
}
.niches-scroll {
  display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 40px 24px;
  scrollbar-width: none; cursor: grab;
}
.niches-scroll::-webkit-scrollbar { display: none; }
.niches-scroll:active { cursor: grabbing; }

.niche-card {
  flex: 0 0 290px;
  scroll-snap-align: start;
  padding: 24px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  text-decoration: none;
}
.niche-card:hover { transform: translateY(-4px); }
.niche-card:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; }

.nc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nc-mod {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em;
  color: var(--ivory-dim); text-transform: uppercase;
}
.niche-card:hover .nc-mod { color: var(--honey); }
.nc-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .58rem; letter-spacing: .14em;
  color: var(--ivory-dim); text-transform: uppercase;
}
.nc-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--honey); box-shadow: 0 0 8px rgba(229,163,61,.8);
  animation: ncblink 2.4s infinite;
}
@keyframes ncblink { 0%,100%{opacity:1} 50%{opacity:.3} }
.nc-icon {
  width: 40px; height: 40px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--ivory-dim); transition: color .25s, border-color .25s;
}
.nc-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.niche-card:hover .nc-icon { color: var(--honey); border-color: rgba(229,163,61,.45); }
.nc-name { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; color: var(--ivory); }
.nc-desc { font-size: .85rem; color: var(--ivory-dim); line-height: 1.55; flex: 1; }
.nc-foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px dashed rgba(255,255,255,.12); padding-top: 14px;
}
.nc-price {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  color: var(--honey); text-transform: uppercase;
}
.nc-arrow { font-family: var(--mono); font-size: .8rem; color: var(--ivory-dim); transition: color .2s, transform .2s; }
.niche-card:hover .nc-arrow { color: var(--honey); transform: translate(2px,-2px); }

/* ── BENTO GRID ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.bento-tile {
  background: var(--ink-mid);
  border-radius: var(--r);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.06);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .25s;
}
.bento-tile:hover { border-color: rgba(229,163,61,.25); }
.bento-tile::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(229,163,61,.05), transparent 60%);
  pointer-events: none;
}
.bento-wide { grid-column: span 2; }
.tile-num {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800; letter-spacing: -.04em;
  color: var(--honey); line-height: 1;
}
.tile-num small { font-size: 1.8rem; }
.tile-unit { font-size: .9rem; font-weight: 500; color: var(--ivory-dim); display: block; margin-top: -4px; }
.tile-label { font-size: .88rem; color: var(--ivory); font-weight: 500; line-height: 1.4; }
.tile-sub { font-size: .78rem; color: var(--ivory-dim); line-height: 1.5; }

.mini-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.mbar-row { display: flex; align-items: center; gap: 10px; }
.mbar-name { font-family: var(--mono); font-size: .62rem; color: var(--ivory-dim); width: 60px; flex-shrink: 0; }
.mbar-track { flex: 1; height: 5px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.mbar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--honey-deep), var(--honey)); }
.mbar-val { font-family: var(--mono); font-size: .62rem; color: var(--honey); width: 28px; text-align: right; }

/* ── PLANS (pricing modules) ── */
.plans-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.plan-card {
  padding: 24px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.plan-card.featured { border-color: rgba(229,163,61,.5); box-shadow: 0 0 0 1px rgba(229,163,61,.15); }
.plan-badge {
  position: absolute; top: -10px; left: 20px;
  font-family: var(--mono); font-size: .58rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  background: var(--honey); color: var(--ink);
  padding: 4px 10px; border-radius: 5px;
}
.plan-name {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em;
  color: var(--ivory-dim); text-transform: uppercase;
}
.plan-card:hover .plan-name { color: var(--honey); }
.plan-price {
  font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--ivory); line-height: 1;
}
.plan-price span { font-family: var(--mono); font-size: .72rem; font-weight: 400; color: var(--ivory-dim); letter-spacing: .04em; }
.plan-trial {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  color: var(--honey); text-transform: uppercase;
}
.plan-feats { list-style: none; flex: 1; }
.plan-feats li {
  font-size: .82rem; color: var(--ivory-dim);
  padding: 7px 0 7px 18px; position: relative;
  border-bottom: 1px dashed rgba(255,255,255,.08);
}
.plan-feats li:last-child { border-bottom: none; }
.plan-feats li::before { content: '▸'; position: absolute; left: 0; color: var(--honey); font-family: var(--mono); font-size: .72rem; }
.plan-note { font-family: var(--mono); font-size: .68rem; color: rgba(200,192,175,.8); }
.plan-btn {
  display: block; width: 100%; text-align: center;
  border: 1.5px solid rgba(245,239,226,.25); background: transparent;
  color: var(--ivory); padding: 12px; border-radius: 12px;
  font-family: var(--sans); font-weight: 700; font-size: .88rem;
  cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.plan-btn:hover { border-color: var(--honey); color: var(--honey); background: rgba(229,163,61,.06); }
.plan-card.featured .plan-btn { background: var(--honey); border-color: var(--honey); color: var(--ink); }
.plan-card.featured .plan-btn:hover { background: #f0af48; }

/* ── QUOTES (reviews strip) ── */
.quotes-scroll {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 40px 24px;
  scrollbar-width: none; cursor: grab;
  max-width: 1100px; margin: 0 auto;
}
.quotes-scroll::-webkit-scrollbar { display: none; }
.quote-card {
  flex: 0 0 330px;
  scroll-snap-align: start;
  background: var(--ink-mid);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .25s;
}
.quote-card:hover { border-color: rgba(229,163,61,.25); }
.q-text { font-size: .88rem; color: var(--ivory-dim); line-height: 1.65; flex: 1; }
.q-text::before { content: '« '; color: var(--honey); }
.q-text::after { content: ' »'; color: var(--honey); }
.q-author { display: flex; align-items: center; gap: 12px; }
.q-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(229,163,61,.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .68rem; color: var(--honey); flex-shrink: 0;
}
.q-name { font-size: .82rem; font-weight: 700; color: var(--ivory); }
.q-role { font-family: var(--mono); font-size: .62rem; color: var(--ivory-dim); letter-spacing: .06em; margin-top: 2px; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item {
  background: var(--ink-mid);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; overflow: hidden;
  transition: border-color .25s;
}
.faq-item.open { border-color: rgba(229,163,61,.3); }
.faq-q {
  width: 100%; padding: 18px 22px;
  background: transparent; border: none;
  color: var(--ivory); font-family: var(--sans);
  font-size: .95rem; font-weight: 700; text-align: left;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q::after {
  content: '+'; font-family: var(--mono); font-size: 1.1rem;
  color: var(--honey); transition: transform .3s; flex-shrink: 0;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease, padding .4s ease; }
.faq-item.open .faq-a { max-height: 420px; padding: 0 22px 18px; }
.faq-a p { color: var(--ivory-dim); font-size: .9rem; line-height: 1.7; }

/* ── LEAD FORM ── */
.lead-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.lead-copy .sec-title { margin-top: 0; }
.lead-copy p { color: var(--ivory-dim); max-width: 400px; margin-bottom: 22px; line-height: 1.7; }
.lead-tg {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: .92rem; color: var(--honey); text-decoration: none;
}
.lead-tg:hover { text-decoration: underline; }
.lead-tg svg { width: 18px; height: 18px; fill: currentColor; }
.lead-form {
  background: var(--ink-mid);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  padding: 28px;
}
.lf-row { margin-bottom: 16px; }
.lf-label {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ivory-dim);
  display: block; margin-bottom: 7px;
}
.lf-label .req { color: var(--honey); }
.lead-form input, .lead-form textarea {
  width: 100%;
  background: rgba(14,21,38,.7);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--ivory);
  font-family: var(--sans); font-size: .95rem;
  transition: border-color .2s;
}
.lead-form input:focus, .lead-form textarea:focus { border-color: var(--honey); outline: none; }
.lead-form textarea { min-height: 84px; resize: vertical; }
.lead-submit {
  display: block; width: 100%;
  background: var(--honey); color: var(--ink);
  border: none; border-radius: 12px;
  padding: 14px; font-family: var(--sans);
  font-weight: 800; font-size: .95rem; cursor: pointer;
  transition: background .2s, transform .15s;
}
.lead-submit:hover { background: #f0af48; transform: translateY(-1px); }
.lead-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.form-status { font-family: var(--mono); font-size: .76rem; min-height: 22px; margin-top: 12px; text-align: center; }
.form-status.success { color: var(--honey); }
.form-status.error { color: var(--danger); }
.plan-selected {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(229,163,61,.1); border: 1px solid rgba(229,163,61,.35);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 16px;
  font-family: var(--mono); font-size: .72rem; color: var(--honey); letter-spacing: .04em;
}
.plan-selected button {
  background: none; border: none; color: var(--ivory-dim);
  font-size: 1.1rem; cursor: pointer; transition: color .2s; line-height: 1;
}
.plan-selected button:hover { color: var(--danger); }

/* ── FINAL CTA ── */
#final {
  padding: 80px 40px 120px;
  max-width: 800px; margin: 0 auto;
  text-align: center; position: relative; z-index: 1;
}
.final-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 100%); height: 300px;
  background: radial-gradient(ellipse, rgba(229,163,61,.12) 0%, transparent 70%);
  pointer-events: none;
}
#final { overflow: hidden; }
.final-mono {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
  color: var(--honey); text-transform: uppercase; margin-bottom: 24px;
}
.final-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 16px;
}
.final-sub { font-size: 1rem; color: var(--ivory-dim); margin-bottom: 44px; line-height: 1.7; }
.btn-row { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--honey); color: var(--ink);
  padding: 15px 30px; border-radius: 14px;
  font-family: var(--sans); font-weight: 800; font-size: .95rem;
  letter-spacing: -.01em; text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 24px rgba(229,163,61,.30);
}
.btn-primary:hover { background: #f0af48; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(229,163,61,.45); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid rgba(245,239,226,.25); color: var(--ivory);
  padding: 14px 28px; border-radius: 14px;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  text-decoration: none; background: transparent; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.btn-ghost:hover { border-color: var(--honey); background: rgba(229,163,61,.06); transform: translateY(-2px); }

/* ── BOTTOM DOCK ── */
#dock {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(14,21,38,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,.07);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
#dock.visible { transform: none; }
.dock-brand {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .15em;
  color: var(--honey); text-transform: uppercase; flex-shrink: 0;
}
.dock-price { font-family: var(--mono); font-size: .7rem; color: var(--ivory-dim); text-align: center; flex: 1; }
.dock-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--honey); color: var(--ink);
  padding: 9px 20px; border-radius: 10px;
  font-family: var(--sans); font-weight: 800; font-size: .82rem;
  text-decoration: none; flex-shrink: 0; letter-spacing: -.01em;
  transition: background .2s;
}
.dock-btn:hover { background: #f0af48; }
.dock-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── PHONE SHELL ── */
.phone-wrap { width: var(--phone-w); height: var(--phone-h); position: relative; }
.phone-shell {
  width: 100%; height: 100%;
  background: #111827;
  border-radius: 36px;
  border: 2px solid rgba(255,255,255,.1);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 30px 80px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.12);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.phone-shell::before {
  content: ''; display: block;
  width: 100px; height: 26px;
  background: #111827;
  border-radius: 0 0 18px 18px;
  margin: 0 auto; position: relative; z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.phone-wrap::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 110%; height: 140%;
  background: radial-gradient(ellipse, rgba(42,171,238,.08) 0%, transparent 60%);
  pointer-events: none; z-index: -1;
}

/* Telegram chrome */
.tg-header {
  background: #17212b; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.05); flex-shrink: 0;
}
.tg-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tg) 0%, var(--tg-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tg-name { font-size: .82rem; font-weight: 600; color: #fff; }
.tg-status { font-size: .68rem; color: var(--tg); margin-top: 1px; }
.tg-dots { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.tg-dots span { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.3); }

.tg-messages {
  flex: 1; overflow: hidden;
  padding: 10px 10px 4px;
  display: flex; flex-direction: column; gap: 4px;
  background: #0d1117; position: relative;
}
.tg-messages::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 24px;
  background: linear-gradient(to bottom, #0d1117, transparent);
  z-index: 2; pointer-events: none;
}
.msg-date {
  text-align: center; font-size: .6rem;
  color: rgba(255,255,255,.35); font-family: var(--mono); margin: 6px 0 2px;
}
.bubble {
  max-width: 82%; padding: 7px 10px; border-radius: 14px;
  font-size: .74rem; line-height: 1.45; position: relative;
  word-break: break-word;
  animation: popIn .25s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn {
  from { transform: scale(.85) translateY(6px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.bubble-bot {
  background: #1e2c3a; color: #e8f4ff;
  border-bottom-left-radius: 4px; align-self: flex-start; margin-left: 2px;
}
.bubble-bot::before {
  content: ''; position: absolute; bottom: 0; left: -6px;
  border: 6px solid transparent;
  border-right-color: #1e2c3a; border-bottom-color: #1e2c3a;
}
.bubble-user {
  background: #2b5278; color: #e8f4ff;
  border-bottom-right-radius: 4px; align-self: flex-end; margin-right: 2px;
}
.bubble-user::after {
  content: ''; position: absolute; bottom: 0; right: -6px;
  border: 6px solid transparent;
  border-left-color: #2b5278; border-bottom-color: #2b5278;
}
.bubble-meta { display: flex; justify-content: flex-end; align-items: center; gap: 3px; margin-top: 3px; }
.bubble-time { font-size: .57rem; color: rgba(255,255,255,.4); font-family: var(--mono); }
.bubble-check { font-size: .6rem; color: var(--tg); }
.tg-keyboard {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px;
  align-self: flex-start; max-width: 82%; margin-left: 2px;
}
.tg-key {
  background: rgba(42,171,238,.12);
  border: 1px solid rgba(42,171,238,.3);
  color: var(--tg); padding: 5px 10px; border-radius: 8px;
  font-size: .68rem; white-space: nowrap; cursor: default;
  transition: background .15s;
}
.tg-key.active { background: var(--tg); color: #fff; border-color: var(--tg); }
.typing-dots {
  display: flex; gap: 4px; align-items: center;
  padding: 8px 12px; background: #1e2c3a;
  border-radius: 14px 14px 14px 4px;
  align-self: flex-start; margin-left: 2px; width: fit-content;
}
.typing-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  animation: tblink 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes tblink {
  0%,80%,100% { opacity: .25; transform: scale(.9); }
  40% { opacity: 1; transform: scale(1.15); }
}
.tg-input-bar {
  background: #17212b; padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid rgba(255,255,255,.05); flex-shrink: 0;
}
.tg-input-field {
  flex: 1; background: #242f3d; border-radius: 20px;
  padding: 6px 12px; font-size: .72rem;
  color: rgba(255,255,255,.4); font-family: var(--sans);
}
.tg-send {
  width: 28px; height: 28px; background: var(--tg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: #fff; flex-shrink: 0;
}

/* ── LINGUA INTERACTIVE DEMO ── */
.demo-wrap { max-width: 640px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.demo-chip {
  background: rgba(42,171,238,.1);
  border: 1px solid rgba(42,171,238,.3);
  color: var(--tg); padding: 8px 16px; border-radius: 10px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  cursor: pointer; transition: .2s;
}
.demo-chip:hover { border-color: var(--tg); background: rgba(42,171,238,.18); }
.demo-chip.active { background: var(--tg); color: #fff; border-color: var(--tg); }
.demo-chip .ai { font-size: .56rem; color: var(--honey); margin-left: 5px; letter-spacing: .1em; }
.demo-chip.active .ai { color: rgba(255,255,255,.85); }
.demo-box {
  background: var(--ink-mid);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  padding: 32px 28px;
  text-align: center;
}
.demo-word { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--ivory); margin-bottom: 24px; }
.demo-word.describing {
  font-size: .98rem; font-weight: 400; font-style: italic;
  color: var(--ivory-dim); line-height: 1.7; text-align: left;
}
.demo-word .gap {
  display: inline-block; min-width: 64px; padding: 0 8px;
  border-bottom: 2px dashed var(--honey);
  color: var(--honey); font-weight: 700; font-style: normal; letter-spacing: 1px;
}
.demo-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.demo-opt {
  padding: 13px; border-radius: 12px;
  background: rgba(14,21,38,.7);
  border: 1px solid rgba(255,255,255,.14);
  cursor: pointer; font-size: .92rem; font-weight: 500;
  color: var(--ivory); transition: .2s; font-family: var(--sans);
}
.demo-opt:hover { border-color: var(--honey); }
.demo-opt.right { border-color: var(--honey); background: rgba(229,163,61,.14); color: var(--honey); animation: dpop .3s ease; }
.demo-opt.wrong { border-color: var(--danger); background: rgba(240,138,108,.1); color: var(--danger); animation: dshake .4s ease; }
@keyframes dpop { 50% { transform: scale(1.04); } }
@keyframes dshake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.demo-result { font-size: .95rem; font-weight: 600; min-height: 28px; margin-bottom: 8px; }
.demo-score { font-family: var(--mono); font-size: .78rem; color: var(--ivory-dim); margin-top: 16px; }
.demo-score span { color: var(--honey); font-weight: 500; }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 32px 40px;
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
.footer-brand { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; color: var(--honey); }
.footer-copy { font-size: .78rem; color: rgba(200,192,175,.4); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  color: var(--ivory-dim); text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--honey); }

/* ── RESPONSIVE ── */
@media (min-width: 768px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .lead-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}
@media (min-width: 1100px) {
  .plans-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  :root { --phone-w: 300px; --phone-h: 500px; }
  .site-head { padding: 18px 20px; }
  /* Linear flow: hero → inline phone (full demo) → benefit blocks.
     display:contents promotes chapters into the flex stage so we can
     interleave the phone between the hero and the rest via order. */
  .stage { display: flex; flex-direction: column; gap: 0; padding: 0 20px; }
  .chapters { display: contents; }
  .chapter[data-chapter="0"] { order: 0; }
  .phone-col { order: 1; }
  .chapter[data-chapter="1"] { order: 2; }
  .chapter[data-chapter="2"] { order: 3; }
  .chapter[data-chapter="3"] { order: 4; }
  .phone-col {
    position: static;
    height: auto;
    justify-content: center;
    padding: 8px 0 32px;
  }
  .phone-wrap {
    width: 100%; max-width: 300px;
    height: 500px;
    margin: 0 auto;
  }
  /* halo glow shrunk so it can't bleed past the viewport on narrow screens */
  .phone-wrap::before { width: 100%; height: 120%; }
  .phone-shell { border-radius: 30px; }
  .chapter { padding: 40px 0; min-height: auto; }
  .chapter[data-chapter="0"] { padding: 24px 0 8px; }
  h1 { font-size: 2.1rem; }
  .sec { padding: 0 20px 60px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-wide { grid-column: span 2; }
  .niches-scroll, .quotes-scroll { padding: 8px 20px 24px; }
  .niches-label { padding: 0 20px; }
  footer { padding: 24px 20px; }
  #final { padding: 60px 20px 100px; }
  .btn-row { gap: 10px; }
}
@media (max-width: 480px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: 1; }
  .dock-price { display: none; }
  .demo-options { grid-template-columns: 1fr; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .chapter { opacity: 1; transform: none; transition: none; }
  .bubble { animation: none; }
  .typing-dots span { animation: none; }
  .star { animation: none; }
  .nc-status::before { animation: none; }
  html { scroll-behavior: auto; }
}
