/* ==========================================================================
   Octadock — paid-beta website styles
   "Obsidian Instrument" — grounded in the shipped WPF dark theme
   (src/Octadock.App/Resources/Themes/Dark.xaml). Teal = local / interaction;
   violet is reserved strictly for cloud / Pro surfaces.
   Self-contained: no @import, no external fonts, no CDN. System font stack.
   ========================================================================== */

:root {
  /* Surfaces — the obsidian blue-black identity */
  --bg:            #0b101c;
  --bg-2:          #0d1424;
  --surface:       #0c1220;
  --surface-alt:   #141e32;
  --input-bg:      #0f182a;
  --border:        #25334e;
  --glass-border:  rgba(255, 255, 255, 0.12);

  /* Ink */
  --text:          #f2f6fc;
  --text-muted:    #a7b6cf;   /* lifted from app's #8DA0BC for 4.5:1 on --surface */
  --text-faint:    #7f90ac;   /* labels / captions only, on darkest bg */

  /* Teal — local, interaction, primary CTA */
  --accent:        #2dd4bf;
  --accent-bright: #5eead4;
  --accent-cyan:   #38bdf8;
  --accent-ink:    #04201c;   /* text ON teal */
  --accent-soft:   rgba(45, 212, 191, 0.12);
  --accent-line:   rgba(45, 212, 191, 0.32);

  /* Violet — RESERVED for cloud / Pro only. Never on a local/CTA element. */
  --cloud:         #a78bfa;
  --cloud-bright:  #c4b5fd;
  --cloud-ink:     #1a1030;
  --cloud-soft:    rgba(167, 139, 250, 0.12);
  --cloud-line:    rgba(167, 139, 250, 0.34);

  /* Status */
  --success:       #4ade80;
  --warning:       #fbbf24;
  --danger:        #fb7185;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Segoe UI Variable",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: "Cascadia Code", "Cascadia Mono", ui-monospace, "SF Mono",
    "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Rhythm */
  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.75vw, 2rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.5vw, 2.9rem);
  --step-4:  clamp(2.4rem, 1.9rem + 2.6vw, 4.1rem);

  --measure: 68ch;
  --radius:   14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* ease-out-expo-ish */
  --dur:      180ms;

  /* z-scale (semantic, no magic 9999) */
  --z-sticky: 100;
  --z-skip:   200;

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(45, 212, 191, 0.10), transparent 60%),
    radial-gradient(900px 500px at 8% 4%, rgba(56, 189, 248, 0.07), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 46%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 640;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.015em; }

p { text-wrap: pretty; }
p, li { max-width: var(--measure); }

strong { color: var(--text); font-weight: 650; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   Focus — visible, teal, never removed
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: var(--z-skip);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 640;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2.5rem, 46rem); }

section { padding-block: clamp(2.75rem, 6vw, 5rem); }

.stack > * + * { margin-top: 1rem; }
.lede {
  font-size: var(--step-1);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 56ch;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--glass-border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-block: 0.85rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 680;
  letter-spacing: -0.01em;
  color: var(--text);
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 26px; height: 26px; flex: none;
}
.nav__links {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}
.nav__links a {
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 550;
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.nav__links a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--accent-bright); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-alt);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 620;
  font-size: var(--step-0);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.btn:hover { text-decoration: none; border-color: var(--accent-line); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset,
              0 10px 30px -12px rgba(45, 212, 191, 0.6);
  font-weight: 680;
}
.btn--primary:hover { border-color: transparent; box-shadow: 0 12px 34px -12px rgba(45, 212, 191, 0.75); }

.btn--ghost { background: transparent; }
.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--step-1); }
.btn--block { width: 100%; }

/* Cloud/Pro affordance uses violet — the ONLY place violet touches a control */
.btn--cloud {
  background: var(--cloud-soft);
  color: var(--cloud-bright);
  border-color: var(--cloud-line);
}
.btn--cloud:hover { border-color: var(--cloud); background: color-mix(in oklab, var(--cloud) 18%, transparent); }

/* Motion is intentionally suppressed on the download hero CTA (critical action):
   it never transforms on hover; only a subtle shadow lift. */
.btn--nomotion { transition: box-shadow var(--dur) var(--ease-out); }
.btn--nomotion:active { transform: none; }

/* --------------------------------------------------------------------------
   Waitlist form — Pro uses the violet/cloud affordance (palette contract)
   -------------------------------------------------------------------------- */
.waitlist { margin-top: 1.1rem; }
.waitlist__label { display: block; margin-bottom: 0.6rem; color: var(--text-muted); font-size: var(--step--1); }
.waitlist__row { display: flex; gap: 0.6rem; align-items: stretch; }
.waitlist__input {
  flex: 1 1 auto; min-width: 0; min-height: 2.9rem; padding: 0.7rem 1rem;
  color: var(--text); font: inherit; font-size: var(--step-0);
  background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.waitlist__input::placeholder { color: var(--text-faint); }
.waitlist__input:hover { border-color: var(--cloud-line); }
.waitlist__input:focus-visible { outline: 2px solid var(--cloud-bright); outline-offset: 2px; border-color: var(--cloud); border-radius: var(--radius-sm); }
.waitlist__row .btn { flex: 0 0 auto; white-space: nowrap; }
.waitlist__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.waitlist__status { min-height: 1.3rem; margin: 0.7rem 0 0; font-size: var(--step--1); color: var(--cloud-bright); }
.waitlist__status[data-state="error"] { color: var(--warning); }
.waitlist__status[data-state="busy"] { color: var(--text-muted); }
@media (max-width: 560px) {
  .waitlist__row { flex-direction: column; }
  .waitlist__row .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem);
}
.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}
.hero h1 { margin-bottom: 0.6rem; }
.hero .lede { font-size: var(--step-2); max-width: 22ch; color: var(--text); line-height: 1.15; }
.hero__sub { font-size: var(--step-1); color: var(--text-muted); max-width: 46ch; margin-top: 1.1rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
  align-items: center;
}
.cta-note {
  font-size: var(--step--1);
  color: var(--text-faint);
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cta-note code { color: var(--text-muted); }

/* Trust chips under the CTA */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--1);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface-alt) 60%, transparent);
}
.chip svg { width: 14px; height: 14px; color: var(--accent); flex: none; }

/* --------------------------------------------------------------------------
   Panels / callouts
   -------------------------------------------------------------------------- */
.panel {
  background: linear-gradient(180deg, color-mix(in oklab, var(--surface-alt) 82%, transparent), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.8rem);
}
.panel--glass { border-color: var(--glass-border); }

.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: var(--surface-alt);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}
.callout__icon { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.callout p { margin: 0.2rem 0 0; color: var(--text-muted); }
.callout h3 { margin: 0; font-size: var(--step-0); }
.callout--accent { background: var(--accent-soft); border-color: var(--accent-line); }
.callout--accent .callout__icon { color: var(--accent); }
.callout--cloud  { background: var(--cloud-soft);  border-color: var(--cloud-line); }
.callout--cloud .callout__icon { color: var(--cloud); }
.callout--warn   { background: color-mix(in oklab, var(--warning) 8%, var(--surface)); border-color: color-mix(in oklab, var(--warning) 34%, var(--border)); }
.callout--warn .callout__icon { color: var(--warning); }

/* Draft banner for legal pages */
.draft-banner {
  border: 1px dashed color-mix(in oklab, var(--warning) 50%, var(--border));
  background: color-mix(in oklab, var(--warning) 9%, var(--surface));
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}
.draft-banner svg { width: 20px; height: 20px; color: var(--warning); flex: none; margin-top: 3px; }
.draft-banner p { margin: 0; color: var(--text); font-size: var(--step--1); }
.draft-banner strong { color: var(--warning); }

/* --------------------------------------------------------------------------
   Feature grid
   -------------------------------------------------------------------------- */
.features {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature {
  background: var(--surface);
  padding: 1.4rem 1.3rem;
  transition: background var(--dur) var(--ease-out);
}
.feature:hover { background: var(--surface-alt); }
.feature__ic { width: 22px; height: 22px; color: var(--accent); margin-bottom: 0.7rem; }
.feature h3 { font-size: var(--step-0); margin-bottom: 0.3rem; }
.feature p { font-size: var(--step--1); color: var(--text-muted); margin: 0; }
.feature .tag {
  font-size: 0.72rem;
  font-weight: 640;
  color: var(--accent-bright);
  border: 1px solid var(--accent-line);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Tables (egress table, storage table, pricing compare)
   -------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  min-width: 34rem;
}
table.data caption {
  text-align: left;
  color: var(--text-faint);
  font-size: var(--step--1);
  padding: 0 0 0.7rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data thead th {
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 640;
  position: sticky;
  top: 0;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: color-mix(in oklab, var(--surface-alt) 50%, transparent); }
table.data td code { color: var(--accent-bright); }
.tag-inline {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 640;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  border: 1px solid;
}
.tag-inline.local  { color: var(--accent-bright); border-color: var(--accent-line); background: var(--accent-soft); }
.tag-inline.optin  { color: var(--cloud-bright);  border-color: var(--cloud-line);  background: var(--cloud-soft); }
.tag-inline.onetime{ color: var(--warning); border-color: color-mix(in oklab, var(--warning) 40%, var(--border)); background: color-mix(in oklab, var(--warning) 10%, transparent); }

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */
.price-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
  .price-grid { grid-template-columns: 1fr 1fr; align-items: stretch; }
}
.plan {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(180deg, var(--surface-alt), var(--surface));
}
.plan--local { border-color: var(--accent-line); box-shadow: 0 24px 60px -40px rgba(45, 212, 191, 0.55); }
.plan--pro   { border-color: var(--cloud-line); }
.plan__name { display: flex; align-items: center; gap: 0.6rem; font-size: var(--step-1); margin: 0; }
.plan__badge {
  font-size: 0.72rem; font-weight: 680; letter-spacing: 0.02em;
  padding: 0.15rem 0.55rem; border-radius: 999px;
}
.plan--local .plan__badge { color: var(--accent-ink); background: var(--accent); }
.plan--pro   .plan__badge { color: var(--cloud-ink);  background: var(--cloud); }
.plan__price { display: flex; align-items: baseline; gap: 0.5rem; margin: 1rem 0 0.15rem; }
.plan__amount { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.plan__unit { color: var(--text-muted); font-size: var(--step--1); }
.plan__meta { color: var(--text-muted); font-size: var(--step--1); margin: 0 0 1.2rem; }
.plan ul.checklist { flex: 1; }
.plan .btn { margin-top: 1.4rem; }
.plan__foot { font-size: var(--step--1); color: var(--text-faint); margin: 0.9rem 0 0; }

ul.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
ul.checklist li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: var(--step--1);
  color: var(--text);
  line-height: 1.45;
  max-width: none;
}
ul.checklist li svg { width: 18px; height: 18px; margin-top: 2px; flex: none; }
ul.checklist li.yes svg { color: var(--accent); }
ul.checklist li.cloud svg { color: var(--cloud); }
ul.checklist li.dev svg  { color: var(--warning); }
ul.checklist li.no  { color: var(--text-muted); }
ul.checklist li.no svg { color: var(--text-faint); }
ul.checklist li small { display: block; color: var(--text-muted); font-size: 0.85em; margin-top: 1px; }

/* --------------------------------------------------------------------------
   Legal / prose pages
   -------------------------------------------------------------------------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.prose h2:first-of-type { border-top: none; padding-top: 0; }
.prose h3 { margin-top: 1.75rem; font-size: var(--step-1); }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--accent); }
.prose .meta { color: var(--text-faint); font-size: var(--step--1); }
.prose dl { margin: 0; }
.prose dt { color: var(--text); font-weight: 640; margin-top: 1rem; }
.prose dd { margin: 0.25rem 0 0; color: var(--text-muted); }

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--surface-alt);
  margin: 1.5rem 0 2.5rem;
}
.toc p { margin: 0 0 0.5rem; font-weight: 640; color: var(--text); font-size: var(--step--1); }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.toc a { color: var(--text-muted); font-size: var(--step--1); }
.toc a:hover { color: var(--accent-bright); }

/* Page header block for interior pages */
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1rem; }
.page-head h1 { font-size: var(--step-3); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-block: 2.5rem 3rem;
  color: var(--text-muted);
  font-size: var(--step--1);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: space-between;
}
.footer__col h4 {
  font-size: var(--step--1);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.7rem;
  font-weight: 640;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer__col a { color: var(--text-muted); }
.footer__col a:hover { color: var(--accent-bright); }
.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   Small utilities
   -------------------------------------------------------------------------- */
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.hash {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  word-break: break-all;
  color: var(--accent-bright);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: block;
}
.pending {
  color: var(--warning);
  font-weight: 640;
}
.section-title { max-width: 30ch; }
.divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* Reveal-on-load: enhances an already-visible default (never gates content) */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: reveal 480ms var(--ease-out) forwards;
  }
  .reveal[data-delay="1"] { animation-delay: 70ms; }
  .reveal[data-delay="2"] { animation-delay: 140ms; }
  .reveal[data-delay="3"] { animation-delay: 210ms; }
}
@keyframes reveal {
  to { opacity: 1; transform: none; }
}
