/* Cloud2Hide — landing page
   Token system bound verbatim from spec 01 (console design system). */

:root {
  /* hex fallbacks declared first; oklch overrides them where supported */
  --bg: #f6f7f9;                 --bg: oklch(0.970 0.004 250);
  --surface: #ffffff;            --surface: oklch(1 0 0);
  --surface-2: #fafbfc;          --surface-2: oklch(0.985 0.003 250);
  --fg: #23262b;                 --fg: oklch(0.225 0.018 260);
  --fg-strong: #181b20;          --fg-strong: oklch(0.175 0.02 260);
  --muted: #666b73;              --muted: oklch(0.50 0.018 255);
  --muted-2: #94989e;            --muted-2: oklch(0.64 0.014 250);
  --border: #dde0e4;             --border: oklch(0.905 0.006 250);
  --border-strong: #c7cbd0;      --border-strong: oklch(0.85 0.008 250);
  --accent: #2f5fd6;             --accent: oklch(0.47 0.18 256);
  --accent-hover: #2650b8;       --accent-hover: oklch(0.41 0.18 256);
  --accent-active: #1f4396;      --accent-active: oklch(0.37 0.18 256);
  --accent-soft: #e8edfb;        --accent-soft: oklch(0.945 0.035 255);
  --accent-border: #b9c8f0;      --accent-border: oklch(0.88 0.06 255);
  --on-accent: #ffffff;          --on-accent: oklch(0.99 0 0);
  --ok: #2f9e5c;                 --ok: oklch(0.53 0.14 152);
  --ok-soft: #e7f7ec;            --ok-soft: oklch(0.955 0.04 152);
  --warn: #b8862c;               --warn: oklch(0.58 0.13 78);
  --warn-soft: #fbf3e0;          --warn-soft: oklch(0.962 0.04 85);
  --danger: #d3382a;             --danger: oklch(0.54 0.19 25);
  --danger-soft: #fbeceb;        --danger-soft: oklch(0.962 0.025 25);
  --sidebar-bg: #1c2029;         --sidebar-bg: oklch(0.215 0.028 260);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;

  --radius-card: 14px;
  --radius-btn: 10px;
  --measure: 62ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--fg-strong); margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
code, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.visually-hidden {
  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: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-active); }

.btn-secondary {
  background: var(--surface);
  color: var(--fg-strong);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent-border); background: var(--accent-soft); }

.btn-ghost-invert {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}
.btn-ghost-invert:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand svg { width: 26px; height: 26px; flex: none; }
.brand span {
  font-size: 17px;
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-size: 15px;
  color: var(--fg);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--fg-strong); border-bottom-color: var(--border-strong); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */

.hero { padding: 64px 0 88px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: 46px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.015em;
  max-width: 14ch;
}

.hero-copy .sub {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted-2);
}

/* Browser-frame console illustration */

.frame-shell {
  border-radius: calc(var(--radius-card) + 6px);
  background: var(--sidebar-bg);
  padding: 20px;
  box-shadow: 0 24px 60px -24px rgba(20, 26, 45, 0.45);
}

.browser-chrome {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #14171f;
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.browser-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 5px 10px;
  text-align: center;
}

.console-shot {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
}

.console-side {
  background: var(--sidebar-bg);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.console-side .side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.console-side .side-brand .dot {
  width: 8px; height: 8px; border-radius: 3px; background: var(--accent);
}
.console-side .side-brand span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.01em;
}
.console-side .side-item {
  font-size: 13px;
  color: rgba(255,255,255,0.62);
  padding: 8px 10px;
  border-radius: 8px;
}
.console-side .side-item.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.console-main {
  background: var(--surface);
  padding: 20px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.metric-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
}
.metric-card .label {
  font-size: 11px;
  color: var(--muted-2);
}
.metric-card .value {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-strong);
}
.metric-card .spark {
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}
.metric-card .spark i {
  display: block;
  width: 5px;
  border-radius: 2px;
  background: var(--accent-border);
}
.metric-card .spark i.on { background: var(--accent); }

.service-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.service-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.service-row:last-child { border-bottom: none; }
.service-row .status {
  width: 7px; height: 7px; border-radius: 50%;
  flex: none;
}
.service-row .status.ok { background: var(--ok); }
.service-row .status.warn { background: var(--warn); }
.service-row .host {
  font-family: var(--font-mono);
  color: var(--fg);
  flex: 1;
}
.service-row .badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Social proof strip ---------- */

.strip {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 34px 0;
}
.strip p {
  text-align: center;
  font-size: 19px;
  font-weight: 500;
  color: var(--fg-strong);
  max-width: 46ch;
  margin: 0 auto;
  line-height: 1.55;
}

/* ---------- Section scaffolding ---------- */

section.block { padding: 88px 0; }
.block-head { max-width: 56ch; margin-bottom: 44px; }
.block-head h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.block-head p {
  margin-top: 12px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.feature {
  padding: 26px 28px 26px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
}
.feature:nth-child(odd) { border-right: 1px solid var(--border); padding-right: 28px; }
.feature:nth-child(even) { padding-left: 28px; }
.feature .icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature .icon svg { width: 17px; height: 17px; }
.feature h3 { font-size: 16.5px; font-weight: 600; }
.feature p { margin-top: 6px; font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 42ch; }

/* ---------- Setup ---------- */

.setup-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}
.setup-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.setup-step .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted-2);
  padding-top: 3px;
}
.setup-step h3 { font-size: 17px; font-weight: 600; }
.setup-step p { margin-top: 6px; font-size: 15px; color: var(--muted); max-width: 56ch; }
.setup-step .cmd {
  margin-top: 12px;
  background: var(--sidebar-bg);
  border-radius: 10px;
  padding: 13px 16px;
  overflow-x: auto;
}
.setup-step .cmd code {
  font-size: 13.5px;
  color: #dbe2f5;
  white-space: pre;
}

/* ---------- Pricing ---------- */

.pricing-note { font-size: 14px; color: var(--muted); margin-bottom: 22px; }

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  font-size: 14.5px;
}
.pricing-table thead th {
  background: var(--surface-2);
  text-align: left;
  font-weight: 600;
  color: var(--fg-strong);
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.pricing-table tbody td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: top;
}
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table td.plan { font-weight: 600; color: var(--fg-strong); }
.pricing-table td.num, .pricing-table th.num { font-family: var(--font-mono); }
.pricing-table tbody tr.highlight td { background: var(--accent-soft); }

.pricing-footnotes {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pricing-footnotes p { font-size: 14px; color: var(--muted); }
.pricing-footnotes .addon { color: var(--fg); }
.pricing-footnotes .addon .mono { color: var(--fg-strong); }

/* ---------- FAQ ---------- */

.faq-list { border-top: 1px solid var(--border); }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-strong);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  flex: none;
  width: 22px; height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  position: relative;
}
.faq-item summary .plus::before,
.faq-item summary .plus::after {
  content: "";
  position: absolute;
  background: var(--muted);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.faq-item summary .plus::before { width: 9px; height: 1.4px; }
.faq-item summary .plus::after { width: 1.4px; height: 9px; transition: transform 120ms ease; }
.faq-item[open] summary .plus::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0); }
.faq-item .faq-answer {
  padding: 0 0 22px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 62ch;
}

/* ---------- Downloads ---------- */

.download-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.download-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.download-row .os { font-size: 15px; font-weight: 600; color: var(--fg-strong); }
.download-row .cmd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  overflow-x: auto;
}
.download-row .cmd code { font-size: 13.5px; color: var(--fg); white-space: pre; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--sidebar-bg);
  padding: 56px 0 40px;
  margin-top: 40px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand span { font-size: 16px; font-weight: 600; color: #fff; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.68); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.45); }

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy h1 { font-size: 38px; max-width: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature:nth-child(odd) { border-right: none; padding-right: 0; }
  .feature:nth-child(even) { padding-left: 0; }
  .pricing-table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .header-login { display: none; }
  .hero { padding: 40px 0 56px; }
  .hero-copy h1 { font-size: 32px; }
  section.block { padding: 60px 0; }
  .frame-shell { padding: 12px; }
  .console-side { flex-direction: row; overflow-x: auto; }
  .setup-step { grid-template-columns: 1fr; gap: 8px; }
  .download-row { grid-template-columns: 1fr; gap: 8px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
