/* ==========================================================================
   OFFGLASS · FILAMENT — production stylesheet
   One thread between two devices. Its physics are the truth.
   Shared by index.html (waitlist) and the legacy support.html / privacy.html
   docs, which inherit this theme via header/nav/main/footer + .article.
   ========================================================================== */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

/* ---------- tokens : light (default) ---------- */
:root {
  --page: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #FBFBFC;
  --ink: #0E1116;
  --muted: #5C6672;
  --hairline: #E2E6EB;
  --hairline-strong: #CBD1D8;
  --cyan: #2E9BD6;
  --amber: #E08A2B;
  --mint: #2FA37A;
  --slate: #8A94A0;
  --focus: #2E9BD6;
  --cta-fill: #E08A2B;
  --cta-ink: #0E1116;
  --backdrop-a: rgba(46, 155, 214, 0.06);
  --backdrop-b: rgba(224, 138, 43, 0.05);

  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-7: 28px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --r-card: 12px; --r-pill: 999px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #08090C;
    --surface: #101319;
    --surface-2: #14181F;
    --ink: #EAEEF3;
    --muted: #8A94A2;
    --hairline: #1C222B;
    --hairline-strong: #2A323D;
    --cyan: #57C7F5;
    --amber: #FFB454;
    --mint: #4FD6A0;
    --slate: #4A525C;
    --focus: #57C7F5;
    --cta-fill: #FFB454;
    --cta-ink: #0B0D11;
    --backdrop-a: rgba(87, 199, 245, 0.08);
    --backdrop-b: rgba(255, 180, 84, 0.06);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
body {
  font-family: var(--font-ui);
  background: var(--page);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(620px 420px at 12% 0%, var(--backdrop-a), transparent 60%),
    radial-gradient(620px 460px at 92% 30%, var(--backdrop-b), transparent 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 100;
  background: var(--ink);
  color: var(--surface);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  font-weight: 600;
  transition: top 180ms ease;
}
.skip-link:focus { top: 0; }

/* ---------- layout shell ---------- */
.wrap {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* ---------- header ---------- */
header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding: var(--sp-6);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark { width: 18px; height: 18px; flex: none; }
.brand-mark .bm-thread { fill: none; stroke: var(--hairline-strong); stroke-width: 2; stroke-linecap: round; }
.brand-mark .bm-cyan { fill: var(--cyan); }
.brand-mark .bm-amber { fill: var(--amber); }

nav[aria-label="Primary"] ul {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
nav[aria-label="Primary"] a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: var(--sp-1) 2px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
nav[aria-label="Primary"] a:hover { color: var(--ink); }
nav[aria-label="Primary"] a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

/* ---------- hero ---------- */
main { position: relative; z-index: 1; }

.hero {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding: var(--sp-10) var(--sp-6) var(--sp-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tether-wrap {
  width: 100%;
  max-width: 480px;
  margin-top: var(--sp-8);
}
.tether { width: 100%; }
.tether svg { width: 100%; height: auto; overflow: visible; }
.tether-glyph { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tether-glyph.mac { color: var(--cyan); }
.tether-glyph.phone { color: var(--amber); }
.tether-line { fill: none; stroke: var(--hairline-strong); stroke-width: 1.5; stroke-linecap: round; }
.tether-line-a { animation: driftA 6s ease-in-out infinite; }
.tether-line-b { opacity: 0; animation: driftB 6s ease-in-out infinite; }
@keyframes driftA { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes driftB { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

.eyebrow {
  margin-top: var(--sp-10);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.eyebrow .dot { width: 4px; height: 4px; border-radius: 999px; background: var(--amber); flex: none; }

h1.display {
  margin-top: var(--sp-4);
  text-wrap: balance;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 16ch;
}

.lede {
  margin-top: var(--sp-5);
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- waitlist form ---------- */
.waitlist-form {
  width: 100%;
  max-width: 420px;
  margin-top: var(--sp-8);
}
.hp-wrap {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  left: -9999px;
  top: auto;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.waitlist-form input[type="email"] {
  width: 100%;
  padding: 13px var(--sp-4);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.waitlist-form input[type="email"]::placeholder { color: var(--slate); }
.waitlist-form input[type="email"]:hover { border-color: var(--muted); }
.waitlist-form input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 22%, transparent);
}

.btn {
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(.34,1.56,.64,1), background-color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  width: 100%;
  padding: 14px var(--sp-6);
  background: var(--cta-fill);
  color: var(--cta-ink);
  border-color: var(--cta-fill);
}
.btn-primary:hover { opacity: 0.92; }

.trust-line {
  margin-top: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- how it works ---------- */
.how-it-works {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding: 0 var(--sp-6) var(--sp-16);
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
.card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  background: transparent;
  transition: border-color 200ms ease;
}
.card:hover { border-color: var(--hairline-strong); }
.card-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.card h3 {
  margin-top: var(--sp-3);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.card p {
  margin-top: var(--sp-2);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- footer ---------- */
footer {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-10);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--muted);
}
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--hairline-strong); }
footer a:hover { color: var(--ink); }
footer p:first-child { color: var(--ink); }

/* ==========================================================================
   Legacy document pages (support.html / privacy.html) — inherit the same
   header/nav/footer above; .article covers their body copy.
   ========================================================================== */
main.article {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-16);
}
main.article .eyebrow { margin-top: 0; }
main.article h1 {
  margin-top: var(--sp-3);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 22ch;
}
main.article .lede {
  margin-top: var(--sp-4);
  margin-inline: 0;
  max-width: 56ch;
  text-align: left;
}
main.article .meta {
  margin-top: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
main.article h2 {
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--hairline);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}
main.article p {
  margin-top: var(--sp-4);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
main.article strong { color: var(--ink); font-weight: 600; }
main.article a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
main.article a:hover { color: var(--ink); }
main.article ol, main.article ul {
  margin-top: var(--sp-4);
  padding-left: 1.3em;
  list-style: decimal;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
main.article ul { list-style: disc; }
main.article li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  padding-left: var(--sp-1);
}

/* generic doc/utility classes — kept styled for any future page reusing
   this stylesheet (waitlist, support, privacy, or a later notice page) */
.notice {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface-2);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px var(--sp-5);
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.button:hover { border-color: var(--muted); background: var(--surface-2); }
.button.primary { background: var(--cta-fill); color: var(--cta-ink); border-color: var(--cta-fill); }

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  h1.display { font-size: 40px; }
  .hero { padding-top: var(--sp-12); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { flex-direction: row; }
  .waitlist-form input[type="email"] { flex: 1; }
  .btn-primary { width: auto; white-space: nowrap; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .tether-line-a, .tether-line-b { animation: none; }
  .tether-line-a { opacity: 1; }
  .tether-line-b { opacity: 0; }
  * { transition-duration: 1ms !important; }
}
