/* Lucius site — mirrors the app's design system (LuciusExperimental/Core/Design).
   Black, quiet, native: true-black ground, glass panels, SF Pro capped at 400,
   sentence case, two radii (panel 28 / inner 12) plus capsules. */

:root {
  color-scheme: dark;

  /* Colour (AppColors) */
  --bg: #000;
  --text-hero: #fff;
  --text-primary: #f2f2f2;
  --text-secondary: #bfbfbf;
  --text-tertiary: #8c8c8c;
  --text-muted: rgba(255, 255, 255, 0.68);
  --signal-green: #2ba66e;

  /* Surfaces (HomeGlassPanel) */
  --panel-fill: rgba(255, 255, 255, 0.08);
  --panel-fill-reduced: rgb(31, 31, 31);
  --stroke-panel: rgba(255, 255, 255, 0.12);
  --fill-subtle: rgba(255, 255, 255, 0.06);
  --hairline: rgba(255, 255, 255, 0.12);

  /* Shape (AppRadii) */
  --radius-panel: 28px;
  --radius-inner: 12px;

  /* Space (Spacing) */
  --xs: 4px;
  --sm: 8px;
  --row-v: 12px;
  --md: 16px;
  --card-pad: 20px;
  --lg: 24px;
  --xl: 32px;
  --xxl: 48px;
  --tap: 44px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  --page-max: 640px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, b, strong, th { font-weight: 400; }
b, strong { color: var(--text-primary); }

a { color: var(--text-primary); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--text-hero); outline-offset: 3px; border-radius: 4px; }

[hidden] { display: none !important; }

/* ---------- Type roles (TypeScale) ---------- */
.t-hero { font-size: clamp(40px, 9vw, 52px); line-height: 1.04; letter-spacing: -2px; color: var(--text-hero); font-weight: 400; }
.t-page-title { font-size: 34px; line-height: 1.12; letter-spacing: -1px; color: var(--text-hero); font-weight: 400; }
.t-title { font-size: 28px; line-height: 1.14; letter-spacing: -1.1px; color: var(--text-hero); font-weight: 400; }
.t-card-title { font-size: 20px; line-height: 1.25; font-weight: 337; color: var(--text-hero); }
.t-section-label { font-size: 17px; line-height: 1.3; color: var(--text-secondary); font-weight: 400; }
.t-body { font-size: 17px; color: var(--text-primary); }
.t-subheadline { font-size: 15px; line-height: 1.47; color: var(--text-secondary); }
.t-footnote { font-size: 13px; line-height: 1.4; color: var(--text-tertiary); }
.t-muted { color: var(--text-muted); }

/* ---------- Header: official wordmark ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--lg) var(--md);
}
.wordmark { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; }
.wordmark img { display: block; height: 22px; width: auto; }

/* ---------- Page container ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--md) var(--md) var(--xxl);
}
.page > .t-page-title { margin-top: var(--lg); }
.page > .lede { margin-top: var(--sm); }

/* Section heading sits above the panel, outside the rim */
.section { margin-top: var(--xl); }
.section > .t-section-label { display: block; margin: 0 0 var(--sm) var(--xs); }

/* ---------- Glass panel (HomeGlassPanel) ---------- */
.panel {
  background: var(--panel-fill);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--stroke-panel);
  border-radius: var(--radius-panel);
  padding: var(--card-pad);
}
@media (prefers-reduced-transparency: reduce) {
  .panel { background: var(--panel-fill-reduced); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.panel > * + * { margin-top: var(--row-v); }

/* Rows inside a panel, separated by a hairline */
.rows { padding: 0; }
.row { padding: var(--row-v) var(--card-pad); min-height: var(--tap); }
.row + .row { border-top: 0.5px solid var(--hairline); margin-top: 0; }
.row .t-body { display: block; }
.row .t-subheadline { margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn-primary {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sm);
  width: 100%;
  min-height: 56px;
  padding: 0 var(--lg);
  border-radius: 999px;
  background: #fff;
  color: #000;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-primary svg { width: 15px; height: 15px; }

.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--card-pad);
  border-radius: 999px;
  background: var(--fill-subtle);
  border: 1px solid var(--stroke-panel);
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.store-badge { display: inline-flex; min-height: var(--tap); align-items: center; }
.store-badge img { display: block; height: 54px; width: auto; }

/* Capsule text field (waitlist) */
.field {
  appearance: none;
  width: 100%;
  min-height: 56px;
  padding: 0 var(--lg);
  border-radius: 999px;
  background: var(--fill-subtle);
  border: 1px solid var(--stroke-panel);
  color: var(--text-primary);
  font: inherit;
  font-size: 17px;
}
.field::placeholder { color: var(--text-tertiary); }
.field:focus { outline: none; border-color: rgba(255, 255, 255, 0.32); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--sm);
  padding: var(--lg) var(--md) var(--xl);
  font-size: 13px;
  color: var(--text-tertiary);
}
.site-footer a { color: var(--text-tertiary); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--xs); }
.site-footer a:hover { color: var(--text-primary); }
.site-footer .sep { display: inline-flex; align-items: center; }

/* ---------- Home ---------- */
.home {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--md) var(--md) var(--xxl);
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: var(--xl);
}
.home-copy { max-width: 520px; }
.home-copy .t-hero { margin-bottom: var(--md); }
.home-copy .status { font-size: 17px; color: var(--text-muted); }
.waitlist { margin-top: var(--xl); display: grid; gap: var(--row-v); max-width: 420px; }
.waitlist .note { min-height: 20px; }
.home-icon { display: flex; justify-content: center; }
.home-icon img {
  width: min(240px, 52vw);
  height: auto;
  border-radius: 22.37%; /* iOS app-icon squircle approximation */
  border: 1px solid var(--stroke-panel);
}
@media (min-width: 860px) {
  .home { grid-template-columns: 1.2fr 1fr; align-items: center; gap: var(--xxl); }
  .home-copy .t-hero { font-size: 64px; letter-spacing: -2.5px; }
  .home-icon img { width: 280px; }
}

/* ---------- Invite card ---------- */
.invite {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--md) var(--md) var(--xxl);
}
.invite .panel { width: 100%; max-width: 420px; padding: var(--xl) var(--lg); text-align: center; }
.invite .t-title { overflow-wrap: anywhere; }
.invite .meta { margin-top: var(--sm); font-size: 17px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.invite .actions { margin-top: var(--lg); display: flex; flex-direction: column; align-items: center; gap: var(--row-v); }
.invite .hint { margin-top: var(--card-pad); }
.invite .manual { margin-top: var(--md); font-size: 15px; color: var(--text-secondary); }
.invite .manual code {
  display: block;
  margin-top: var(--sm);
  padding: var(--row-v) var(--md);
  border-radius: var(--radius-inner);
  background: var(--fill-subtle);
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: anywhere;
}

/* ---------- Support FAQ ---------- */
.faq .row .t-body { margin-bottom: var(--xs); }

/* ---------- Legal (Termly markup) ---------- */
.legal { max-width: 760px; }
.legal [data-custom-class='body'] { background: transparent !important; }
.legal [data-custom-class='body'] * { font-family: var(--font) !important; }
.legal [data-custom-class='title'], .legal [data-custom-class='title'] * { font-size: 34px !important; letter-spacing: -1px; color: var(--text-hero) !important; font-weight: 400 !important; }
.legal [data-custom-class='subtitle'], .legal [data-custom-class='subtitle'] * { font-size: 15px !important; color: var(--text-tertiary) !important; font-weight: 400 !important; }
.legal [data-custom-class='heading_1'], .legal [data-custom-class='heading_1'] * { font-size: 20px !important; color: var(--text-hero) !important; font-weight: 337 !important; }
.legal [data-custom-class='heading_2'], .legal [data-custom-class='heading_2'] * { font-size: 17px !important; color: var(--text-primary) !important; font-weight: 400 !important; }
.legal [data-custom-class='body_text'], .legal [data-custom-class='body_text'] * { font-size: 15px !important; color: var(--text-secondary) !important; }
.legal [data-custom-class='link'], .legal [data-custom-class='link'] * { font-size: inherit !important; color: var(--text-primary) !important; word-break: break-word; }
.legal strong, .legal b { font-weight: 400 !important; color: var(--text-primary) !important; }
.legal h1, .legal h2, .legal h3 { font-weight: inherit; margin: var(--lg) 0 var(--sm); }
.legal h1 { margin-top: var(--lg); }
.legal h2 { padding-top: var(--lg); border-top: 0.5px solid var(--hairline); margin-top: var(--xl); }
.legal p { margin-bottom: var(--row-v); }
.legal ul { padding-left: var(--lg); margin-bottom: var(--row-v); }
.legal li { margin-bottom: var(--sm); font-size: 15px; color: var(--text-secondary); }
.legal table { width: 100%; border-collapse: collapse; margin: var(--md) 0; font-size: 15px; color: var(--text-secondary); display: block; overflow-x: auto; }
.legal th, .legal td { border: 0.5px solid var(--hairline); padding: var(--sm) var(--row-v); text-align: left; vertical-align: top; }
.legal th { color: var(--text-primary); font-weight: 400; background: var(--fill-subtle); }
.legal [style*="color: rgb(127, 127, 127)"] { color: var(--text-tertiary) !important; }
