/* Wherry marketing site. Tokens come from tokens.css. No frameworks, no web fonts. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern";
  overflow-x: hidden;
}
img, video, svg, picture { max-width: 100%; }
img, video { height: auto; display: block; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.88em; }
code { background: var(--bg-raised); border: 1px solid var(--border-subtle); border-radius: 5px; padding: 0.08em 0.35em; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0.05em 0.4em; color: var(--text-secondary); background: var(--bg-surface); font-size: 0.78em; }
s { color: var(--text-tertiary); }
::selection { background: rgba(76, 141, 255, 0.35); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent-blue); color: #fff; padding: 8px 14px; border-radius: var(--radius-control); }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: 600 15px/1 var(--font-sans); letter-spacing: -0.005em;
  padding: 12px 18px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), transform var(--motion-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-blue); color: #fff; }
.btn-primary:hover { background: #5f9aff; }
.btn-secondary { background: var(--bg-raised); color: var(--text-primary); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: #4a5366; background: #222734; }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-subtle); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-lg { font-size: 16px; padding: 14px 22px; border-radius: 10px; }
.btn-sm { font-size: 13px; padding: 8px 12px; border-radius: var(--radius-control); }
.btn-block { width: 100%; }
.btn.is-disabled { color: var(--text-tertiary); cursor: default; }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn .price { display: inline-flex; align-items: baseline; gap: 0.35em; font-weight: 600; }
.btn .price-was { color: var(--text-tertiary); font-weight: 500; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 16, 20, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.site-nav { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.site-nav a { color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: var(--radius-control); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text-primary); background: var(--bg-raised); text-decoration: none; }
.header-cta { margin-left: auto; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px; border-radius: var(--radius-control); color: var(--text-primary); display: flex; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px;
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column;
}
.menu-panel a { color: var(--text-primary); padding: 10px 12px; border-radius: var(--radius-control); }
.menu-panel a:hover { background: var(--bg-surface); text-decoration: none; }

@media (max-width: 760px) {
  .site-nav { display: none; }
  .menu { display: block; }
  .header-inner { gap: 12px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-subtle); background: var(--bg-surface); margin-top: 96px; padding: 56px 0 28px; color: var(--text-secondary); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 48px; }
.footer-brand p { margin-top: 12px; max-width: 34ch; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-cols h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); margin-bottom: 12px; }
.footer-cols a { display: block; color: var(--text-secondary); padding: 3px 0; overflow-wrap: anywhere; }
.footer-cols a:hover { color: var(--text-primary); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-subtle); color: var(--text-tertiary); font-size: 13px; }
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 40px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 900px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 35% 45%, rgba(76, 141, 255, 0.22), transparent 70%),
    radial-gradient(closest-side at 65% 50%, rgba(139, 92, 246, 0.20), transparent 70%);
  filter: blur(10px);
}
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-icon { width: 112px; height: 112px; border-radius: 25px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06); margin-bottom: 28px; }
.hero h1 { font-size: clamp(36px, 6.2vw, 68px); letter-spacing: -0.035em; line-height: 1.04; max-width: 18ch; margin-bottom: 22px; }
.lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--text-secondary); max-width: 40em; margin: 0 auto 32px; line-height: 1.55; }
.lede-sm { font-size: 18px; color: var(--text-secondary); max-width: 42em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-meta { color: var(--text-tertiary); font-size: 14px; margin-top: 18px; }
.hero-meta.is-error, [data-checkout-status].is-error { color: var(--state-danger); }

.showcase { margin-top: 56px; }
.frame {
  border-radius: 14px; overflow: hidden; background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.frame .shot img, .showcase-video, .showcase-poster { width: 100%; }
.showcase-video { aspect-ratio: 16 / 9; background: var(--bg-inset); }

/* ---------- Protocol chips ---------- */
.protocols { padding: 56px 0 24px; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 14px; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow.eyebrow-blue { color: var(--accent-blue); }
.eyebrow.eyebrow-violet { color: #a88bfa; }
.chips { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 980px; }
.chips li { font-size: 14px; color: var(--text-secondary); padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); background: var(--bg-surface); }

/* ---------- Feature sections ---------- */
.feature { padding: 104px 0 24px; }
.feature h2, .section-head h2 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -0.03em; }
.feature-head { max-width: 760px; margin-bottom: 40px; }
.feature p { color: var(--text-secondary); }
.feature strong { color: var(--text-primary); font-weight: 600; }
.shot { display: block; }
.shot img { border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); background: var(--bg-surface); }
.shot-wide { margin: 0 0 48px; }

.points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.points h3 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 6px; }
.points p { font-size: 15px; margin: 0; }
@media (max-width: 960px) { .points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .points { grid-template-columns: 1fr; gap: 22px; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.split-reverse .split-text { order: 2; }
.split-reverse .split-media { order: 1; }
.split-text p { font-size: 17px; }
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split-reverse .split-text, .split-reverse .split-media { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { position: relative; padding-left: 28px; margin: 0 0 10px; color: var(--text-secondary); font-size: 16px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent-blue); border-bottom: 2px solid var(--accent-blue); transform: rotate(-45deg);
}
.ticks-violet li::before { border-color: var(--accent-violet); }

.badge { display: inline-block; font: 700 11px/1 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 7px; border-radius: var(--radius-full); vertical-align: middle; }
.badge-pro { background: var(--gradient); color: #fff; }
.badge-intro { background: rgba(52, 211, 153, 0.14); color: var(--state-success); border: 1px solid rgba(52, 211, 153, 0.3); }

/* Vault */
.feature-vault { position: relative; isolation: isolate; }
.feature-vault::before {
  content: ""; position: absolute; inset: 40px 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 70% 20%, rgba(139, 92, 246, 0.12), transparent 70%);
}
.threat { margin: 72px 0 56px; }
.threat > h3 { font-size: 22px; margin-bottom: 20px; }
.threat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.threat-col { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: 22px 22px 8px; }
.threat-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.threat-col h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.threat-yes h4 { color: var(--state-success); }
.threat-partly h4 { color: var(--state-warning); }
.threat-no h4 { color: var(--state-danger); }
.threat-col ul { list-style: none; margin: 0; padding: 0; }
.threat-col li { font-size: 15px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }
.threat-col li strong { display: block; color: var(--text-primary); margin-bottom: 2px; }
@media (max-width: 960px) { .threat-grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.section-pricing { padding: 120px 0 24px; }
.section-pricing-page { padding-top: 16px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .lede-sm { margin: 0 auto; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 28px;
}
.plan header { margin-bottom: 8px; }
.plan h2, .plan h3 { font-size: 18px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.plan-featured { position: relative; border-color: transparent; background: linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box, var(--gradient) border-box; border: 1px solid transparent; box-shadow: 0 30px 80px rgba(76, 141, 255, 0.12); }
.plan-price { margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { display: inline-flex; align-items: baseline; gap: 10px; }
.plan-price .price-now { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan-price .price-was { font-size: 22px; font-weight: 500; }
.price-suffix { color: var(--text-tertiary); font-size: 15px; font-weight: 500; }
.plan-terms { color: var(--text-secondary); font-size: 15px; min-height: 3.2em; }
.plan .ticks { margin: 8px 0 24px; flex: 1; }
.plan .ticks li { font-size: 15px; }
.plan-foot { color: var(--text-tertiary); font-size: 13px; margin: 14px 0 0; line-height: 1.5; }
.pricing-note { color: var(--text-tertiary); font-size: 14px; text-align: center; max-width: 64em; margin: 28px auto 0; }
@media (min-width: 1001px) {
  /* Line up headers, feature lists, buttons and footnotes across the three cards. */
  @supports (grid-template-rows: subgrid) {
    .pricing-grid { grid-template-rows: auto 1fr auto auto; row-gap: 0; }
    .pricing-grid .plan { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
  }
}
@media (max-width: 1000px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .plan-featured { order: -1; }
  .plan-terms { min-height: 0; }
}

.compare-title { font-size: 24px; text-align: center; margin: 88px 0 24px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); overflow: hidden; }
.compare-wrap { max-width: 900px; margin: 0 auto; border-radius: var(--radius-card); }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.compare thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); background: var(--bg-raised); }
.compare td, .compare thead th:not(:first-child) { text-align: center; width: 88px; }
.compare tbody th { font-weight: 500; color: var(--text-primary); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.ico-yes { color: var(--state-success); vertical-align: middle; }
.ico-no { color: var(--text-tertiary); }
.compare-note { color: var(--text-tertiary); font-size: 14px; max-width: 900px; margin: 16px auto 0; text-align: center; }
@media (max-width: 560px) {
  .compare th, .compare td { padding: 12px 10px; }
  .compare td, .compare thead th:not(:first-child) { width: 56px; }
  .compare tbody th { font-size: 14px; }
}

/* ---------- FAQ ---------- */
.section-faq { padding: 112px 0 0; }
.section-faq h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--border-subtle); }
.faq details:first-child { border-top: 1px solid var(--border-subtle); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--text-tertiary); border-bottom: 2px solid var(--text-tertiary); transform: translateY(-70%) rotate(45deg); transition: transform var(--motion-fast) var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { color: var(--text-secondary); margin: -4px 0 22px; max-width: 64ch; }

/* ---------- Closer ---------- */
.closer { padding: 120px 0 24px; text-align: center; }
.closer-inner { display: flex; flex-direction: column; align-items: center; }
.closer img { border-radius: 14px; margin-bottom: 20px; }
.closer h2 { font-size: clamp(30px, 4.2vw, 46px); }
.closer p { color: var(--text-secondary); margin-bottom: 28px; }

/* ---------- Generic pages ---------- */
.page-hero { padding: 72px 0 32px; text-align: center; }
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; }
.page-hero .lede, .page-hero .lede-sm { margin-left: auto; margin-right: auto; }
.page-article { padding-top: 64px; }
.page-head { margin-bottom: 36px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 48px); }
.notice { border-radius: var(--radius-card); padding: 12px 16px; font-size: 15px; border: 1px solid var(--border-strong); background: var(--bg-surface); }
.notice-warning { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); color: #fde68a; }
.notfound { padding: 120px 24px 40px; text-align: center; }
.notfound h1 { font-size: clamp(34px, 5vw, 52px); }
.notfound .lede-sm { margin: 0 auto 28px; }

.buy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 8px; }
.buy-grid .plan-terms { min-height: 0; }
.checkout-form { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: end; margin-top: auto; }
.checkout-form label { grid-column: 1 / -1; font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.checkout-form input {
  font: 15px var(--font-sans); color: var(--text-primary); background: var(--bg-inset); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 11px 12px; min-width: 0; width: 100%;
}
.checkout-form input:focus { outline: 2px solid var(--accent-blue); outline-offset: 0; border-color: transparent; }
.buy-grid .plan > .btn { margin-top: auto; }
@media (max-width: 760px) { .buy-grid { grid-template-columns: 1fr; } .checkout-form { grid-template-columns: 1fr; } }

/* Prose (generic pages; docs extend this in docs.css) */
.prose { font-size: 17px; line-height: 1.7; }
.prose h2 { font-size: 26px; margin-top: 2em; }
.prose h3 { font-size: 20px; margin-top: 1.6em; }
.prose p, .prose li { color: #c9cfdb; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--text-primary); }
.prose img { border-radius: var(--radius-card); border: 1px solid var(--border-subtle); }
.prose hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 2.5em 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 18px; border-left: 3px solid var(--border-strong); color: var(--text-secondary); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0 0 1.4em; }
.prose th, .prose td { border-bottom: 1px solid var(--border-subtle); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { color: var(--text-secondary); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.prose pre { background: var(--bg-inset); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: 16px 18px; overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 14px; }
.anchor { margin-left: 0.4em; color: var(--text-tertiary); opacity: 0; font-weight: 400; text-decoration: none; }
h2:hover > .anchor, h3:hover > .anchor, h4:hover > .anchor, .anchor:focus { opacity: 1; }

/* Syntax tokens (build-time highlighter) */
.tok-c { color: #6b7488; font-style: italic; }
.tok-s { color: #9fe0b9; }
.tok-n { color: #f5b97a; }
.tok-k { color: #a9b8ff; }
.tok-f { color: #8fd3ff; }
.tok-p { color: var(--text-tertiary); user-select: none; -webkit-user-select: none; }

/* Tour fallback (tour.css styles the live tour) */
.tour-fallback { padding-top: 72px; }
.tour-fallback h1 { font-size: clamp(34px, 5vw, 52px); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 56px; }
  .hero-icon { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 22px; }
  .cta-row { flex-direction: column; align-items: stretch; width: 100%; }
  .cta-row .btn { width: 100%; }
  .showcase { margin-top: 40px; }
  .frame { border-radius: 10px; }
  .feature { padding-top: 80px; }
  .plan { padding: 22px; }
  .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; }
}
.shot-narrow { max-width: 880px; margin-left: auto; margin-right: auto; }
.tour-page { --tour-sticky-top: 61px; }
.loop video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); background: var(--bg-surface); object-fit: cover; }
