/* ============ Tokens ============ */
:root {
  --bg: #f3f5f7;
  --bg-2: #e9edf1;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --line: #dfe5ea;
  --text: #0c1317;
  --muted: #5a6670;
  --accent: #0b9a69;
  --accent-strong: #08835a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 154, 105, .1);
  --warm: #e8890c;
  --warm-soft: rgba(232, 137, 12, .12);
  --shadow: 0 1px 2px rgba(12, 19, 23, .04), 0 12px 32px -12px rgba(12, 19, 23, .12);
  --shadow-lg: 0 30px 80px -30px rgba(12, 19, 23, .28);
  --glow: rgba(11, 154, 105, .16);
  --phone: #0c1317;
  --radius: 22px;
  --max: 1180px;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #080d11;
  --bg-2: #0d141a;
  --surface: #0f171d;
  --surface-2: #142028;
  --line: #1f2d36;
  --text: #edf3f6;
  --muted: #8b9aa5;
  --accent: #34e0a1;
  --accent-strong: #5cf0b8;
  --accent-ink: #03140d;
  --accent-soft: rgba(52, 224, 161, .1);
  --warm: #ffb547;
  --warm-soft: rgba(255, 181, 71, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -16px rgba(0, 0, 0, .6);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .8);
  --glow: rgba(52, 224, 161, .14);
  --phone: #05090c;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font: 500 16px/1.6 var(--sans);
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
p { margin: 0; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 15px; letter-spacing: -.01em;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 30px -10px var(--glow);
}
.btn:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn-block { width: 100%; }

/* ============ Header ============ */
.site-header { position: sticky; top: 12px; z-index: 50; margin-top: 12px; }
.header-bar {
  display: flex; align-items: center; gap: 20px;
  min-height: 64px; padding: 8px 8px 8px 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--text); color: var(--bg); }
.brand-mark svg { width: 18px; height: 18px; }
.brand-mark path { stroke: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 14px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn { min-height: 46px; padding: 0 20px; font-size: 14px; }

.icon-btn {
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--text);
  transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, opacity .25s; }
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ============ Hero ============ */
.hero { position: relative; padding: 72px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 380px at 78% 30%, var(--glow), transparent 70%),
    radial-gradient(500px 300px at 10% 10%, var(--warm-soft), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: -120px 0 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 13px; font-weight: 700; color: var(--muted);
}
.eyebrow b { padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.hero-copy { min-width: 0; container-type: inline-size; }
/* Размер от ширины колонки, а не окна: самое длинное слово всегда помещается целиком */
.hero h1 { margin: 24px 0 22px; font-size: clamp(28px, 12cqi, 84px); hyphens: none; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { max-width: 560px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; font-weight: 700; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--accent); }

/* Phone mockup */
.device { position: relative; justify-self: center; width: min(100%, 340px); }
.phone {
  position: relative; padding: 12px; border-radius: 48px;
  background: var(--phone); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.screen {
  position: relative; overflow: hidden; padding: 22px 20px 20px; border-radius: 38px;
  background: linear-gradient(180deg, #101a21 0%, #0a1015 100%); color: #eaf2f5;
  min-height: 600px; display: flex; flex-direction: column;
}
.notch { width: 96px; height: 26px; margin: -8px auto 18px; border-radius: 999px; background: #000; }
.screen-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: #8fa1ac; }
.screen-top .app-name { display: flex; align-items: center; gap: 8px; color: #eaf2f5; font-family: var(--display); font-size: 16px; }
.screen-top .app-name i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #34e0a1; color: #03140d; font-style: normal; font-size: 13px; font-weight: 800; }
.power-zone { position: relative; display: grid; place-items: center; margin: 40px 0 28px; }
.power-zone .ring { position: absolute; width: 170px; height: 170px; border-radius: 50%; border: 1px solid rgba(52,224,161,.35); animation: pulse 2.8s ease-out infinite; }
.power-zone .ring:nth-child(2) { animation-delay: 1.4s; }
.power {
  position: relative; display: grid; place-items: center; width: 150px; height: 150px; border: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #46f0b0, #10a874); color: #03140d;
  box-shadow: 0 0 0 10px rgba(52,224,161,.08), 0 20px 60px -10px rgba(52,224,161,.6);
  transition: background .35s, box-shadow .35s, transform .2s;
}
.power:hover { transform: scale(1.02); }
.power svg { width: 52px; height: 52px; }
.device.is-off .power { background: radial-gradient(circle at 50% 35%, #2a3741, #18222a); color: #8fa1ac; box-shadow: 0 0 0 10px rgba(255,255,255,.03), 0 20px 50px -20px rgba(0,0,0,.8); }
.device.is-off .ring { animation: none; opacity: 0; }
@keyframes pulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.status { text-align: center; }
.status small { display: block; color: #8fa1ac; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.status strong { display: block; margin-top: 6px; font-family: var(--display); font-size: 22px; font-weight: 600; }
.status .timer { display: block; margin-top: 4px; color: #34e0a1; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.device.is-off .status .timer { color: #8fa1ac; }
.server-card { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 14px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.server-card .globe { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(52,224,161,.12); color: #34e0a1; }
.server-card .globe svg { width: 22px; height: 22px; }
.server-card div { flex: 1; min-width: 0; }
.server-card b { display: block; font-size: 15px; }
.server-card span { color: #8fa1ac; font-size: 12px; font-weight: 600; }
.server-card .ping { color: #34e0a1; font-weight: 800; font-size: 13px; }
.screen-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.screen-stats div { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); }
.screen-stats span { display: block; color: #8fa1ac; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.screen-stats b { display: block; margin-top: 2px; font-size: 15px; }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.float-chip svg { width: 18px; height: 18px; color: var(--accent); }
.float-chip.c1 { top: 90px; left: -70px; }
.float-chip.c2 { bottom: 40px; right: -60px; }
.device-note { margin-top: 14px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; }

/* ============ Stats ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--display); font-size: clamp(30px, 3.4vw, 42px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 700; }

/* ============ Section ============ */
.section { padding: 112px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--accent); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.section-title { font-size: clamp(32px, 4.6vw, 56px); }
.section-lead { max-width: 440px; color: var(--muted); font-size: 17px; }

/* ============ Pricing ============ */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 28px 24px 24px; border: 1px solid var(--line); border-radius: 26px;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease;
}
.plan:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.plan.featured { border: 2px solid var(--accent); padding: 27px 23px 23px; background: linear-gradient(180deg, var(--accent-soft), var(--surface) 55%); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 28px; }
.plan-term { font-size: 16px; font-weight: 800; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge-save { background: var(--warm-soft); color: var(--warm); }
.badge-hit { background: var(--accent); color: var(--accent-ink); }
.plan-price { margin-top: 26px; font-family: var(--display); font-size: 46px; font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.plan-price small { font-size: 24px; color: var(--muted); }
.plan-month { margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 700; }
.plan-month s { margin-left: 6px; opacity: .7; }
.plan ul { display: grid; gap: 10px; margin: 24px 0 28px; padding: 22px 0 0; border-top: 1px dashed var(--line); list-style: none; font-size: 14px; font-weight: 600; }
.plan li { display: flex; align-items: center; gap: 10px; }
.plan li svg { flex: none; width: 18px; height: 18px; color: var(--accent); }
.plan .btn { margin-top: auto; }
.plan:not(.featured) .btn { background: var(--text); color: var(--bg); box-shadow: none; }
.plan:not(.featured) .btn:hover { background: var(--accent); color: var(--accent-ink); }
.pricing-note { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 26px; color: var(--muted); font-size: 14px; font-weight: 700; }
.pricing-note span { display: inline-flex; align-items: center; gap: 8px; }
.pricing-note svg { width: 18px; height: 18px; color: var(--accent); }

/* ============ Features (bento) ============ */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tile { position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.tile.w3 { grid-column: span 3; }
.tile.w2 { grid-column: span 2; }
.tile.w4 { grid-column: span 4; }
.tile.w6 { grid-column: span 6; }
.tile-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); }
.tile-icon svg { width: 24px; height: 24px; }
.tile h3 { font-size: 21px; margin-bottom: 10px; }
.tile p { color: var(--muted); font-size: 15px; }
.tile.accent { background: var(--text); color: var(--bg); border-color: var(--text); }
.tile.accent p { color: color-mix(in srgb, var(--bg) 70%, var(--text)); }
.tile.accent .tile-icon { background: var(--accent); color: var(--accent-ink); }
.speed-bars { display: flex; align-items: end; gap: 6px; height: 64px; margin-top: 24px; }
.speed-bars i { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--accent); opacity: .85; animation: bars 2.4s ease-in-out infinite; transform-origin: bottom; }
.speed-bars i:nth-child(odd) { animation-delay: .4s; }
.speed-bars i:nth-child(3n) { animation-delay: .8s; }
@keyframes bars { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
.devices-row { display: flex; gap: 8px; margin-top: 22px; }
.devices-row span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.devices-row span svg { width: 20px; height: 20px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.platforms span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 800; }

/* ============ Steps ============ */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; }
.step { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 40px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 700; font-size: 18px;
  box-shadow: 0 0 0 8px var(--accent-soft);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 53px; left: 96px; right: -14px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.step h3 { font-size: 21px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* ============ FAQ ============ */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-aside { position: sticky; top: 110px; }
.faq-aside .section-lead { margin-top: 18px; }
.support-card { display: flex; align-items: center; gap: 14px; margin-top: 30px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.support-card .dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.support-card .dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); opacity: .4; animation: pulse 2s ease-out infinite; }
.support-card b { display: block; font-size: 15px; }
.support-card span { color: var(--muted); font-size: 13px; font-weight: 600; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); transition: border-color .2s; }
.faq-list details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 24px; list-style: none; cursor: pointer; font-weight: 800; font-size: 17px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary i { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); transition: transform .25s, background-color .25s; }
.faq-list summary i::before, .faq-list summary i::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: currentColor; }
.faq-list summary i::after { transform: rotate(90deg); transition: transform .25s; }
.faq-list details[open] summary i { background: var(--accent); color: var(--accent-ink); }
.faq-list details[open] summary i::after { transform: rotate(0); }
.faq-list .answer { padding: 0 24px 22px; color: var(--muted); font-size: 15px; }

/* ============ CTA ============ */
.cta { padding: 112px 0; }
.cta-panel {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
  padding: clamp(32px, 5vw, 64px); border-radius: 34px;
  background: var(--text); color: var(--bg);
}
.cta-panel::before {
  content: ""; position: absolute; right: -120px; top: -160px; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 65%); opacity: .7;
}
.cta-panel > * { position: relative; }
.cta-panel h2 { font-size: clamp(30px, 4.4vw, 54px); }
.cta-panel h2 span { color: var(--accent); }
.cta-panel p { margin-top: 16px; max-width: 520px; color: color-mix(in srgb, var(--bg) 68%, var(--text)); font-size: 17px; }
:root:not([data-theme="dark"]) .cta-panel h2 span { color: #34e0a1; }
:root:not([data-theme="dark"]) .cta-panel .btn { background: #34e0a1; color: #03140d; }

/* ============ Footer ============ */
.site-footer { padding: 40px 0 32px; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; font-weight: 700; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* ============ Checkout modal ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 9, 12, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease; }
.modal-card {
  position: relative; width: min(100%, 460px); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 28px; border: 1px solid var(--line); border-radius: 28px;
  background: var(--surface); box-shadow: var(--shadow-lg); animation: rise .25s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; }
.modal-card h2 { font-size: 24px; padding-right: 48px; }
.modal-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 22px; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.modal-summary span { color: var(--muted); font-size: 13px; font-weight: 700; }
.modal-summary b { display: block; font-size: 17px; }
.modal-summary .sum { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.04em; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span, .field legend { font-size: 14px; font-weight: 800; }
.field input[type="email"] {
  width: 100%; min-height: 54px; padding: 0 18px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg); font-size: 16px; font-weight: 600; transition: border-color .2s, box-shadow .2s;
}
.field input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: #e5484d; }
.field small { color: var(--muted); font-size: 12px; font-weight: 600; }
.field .error { color: #e5484d; }
fieldset.field { margin: 0 0 18px; padding: 0; border: 0; }
fieldset.field legend { margin-bottom: 8px; padding: 0; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method { position: relative; }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method label {
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg); cursor: pointer;
  font-weight: 800; font-size: 15px; transition: border-color .2s, background-color .2s;
}
.pay-method label svg { width: 22px; height: 22px; color: var(--muted); }
.pay-method label small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.pay-method input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.pay-method input:checked + label svg { color: var(--accent); }
.pay-method input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.agree input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.agree a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.modal-foot { margin-top: 14px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; }
body.modal-open { overflow: hidden; }

/* ============ Legal pages ============ */
.legal { padding: 56px 0 96px; }
.legal-card { max-width: 820px; margin-inline: auto; padding: clamp(24px, 5vw, 56px); border: 1px solid var(--line); border-radius: 30px; background: var(--surface); box-shadow: var(--shadow); }
.legal .back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--muted); font-size: 14px; font-weight: 800; }
.legal .back:hover { color: var(--text); }
.legal .back svg { width: 18px; height: 18px; }
.legal h1 { font-size: clamp(28px, 4vw, 42px); }
.legal .meta { margin-top: 14px; color: var(--muted); font-size: 14px; font-weight: 700; }
.legal h2 { margin: 40px 0 14px; font-size: 20px; letter-spacing: -.02em; }
.legal h3 { margin: 22px 0 10px; font-family: var(--sans); font-size: 16px; font-weight: 800; letter-spacing: 0; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; }
.legal p + p { margin-top: 10px; }
.legal ul { margin: 10px 0; padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal a:not(.back) { color: var(--accent); }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .float-chip.c1 { left: -30px; }
  .float-chip.c2 { right: -20px; }
}
@media (max-width: 900px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding-top: 88px; }
  .section-head { flex-direction: column; align-items: start; gap: 16px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile.w2, .tile.w3, .tile.w4, .tile.w6 { grid-column: span 2; }
  .tile.half { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .step-num { margin-bottom: 24px; }
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-aside { position: static; }
  .cta { padding: 88px 0; }
  .cta-panel { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 8px; margin: 0;
    border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 16px; font-size: 16px; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: grid; }
  .header-actions .btn { display: none; }
}
@media (max-width: 560px) {
  .header-bar { padding-left: 14px; }
  .plans { grid-template-columns: 1fr; }
  .stat { padding: 20px; }
  .tile.half { grid-column: span 2; }
  .hero-actions .btn { flex: 1 1 100%; }
  .float-chip { display: none; }
  .screen { min-height: 560px; }
  .pay-methods { grid-template-columns: 1fr; }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; border-radius: 28px 28px 0 0; max-height: 92dvh; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .faq-list summary { padding: 18px; font-size: 16px; }
  .faq-list .answer { padding: 0 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
