/* ==========================================================================
   GuardCy: base tokens
   ========================================================================== */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #12181F;
  --ink-soft: #4B5563;
  --ink-faint: #7A8288;
  --line: #E2DED3;
  --line-strong: #D3CDBF;

  --teal-900: #14332C;
  --teal-700: #1E4F46;
  --teal-500: #2F6F62;
  --teal-100: #E4EEEC;

  --amber-500: #D98936;
  --amber-600: #C0762A;

  --success-300: #BFE3D3;
  --error-300: #F2A38D;
  --error-400: #E27E5C;

  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", "URW Palladio", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --wrap: 1120px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, p { margin: 0; }

button { font: inherit; cursor: pointer; }

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

.sr-only {
  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;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--teal-700);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--teal-900); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-small { padding: 9px 18px; font-size: 0.875rem; }
.btn-large { padding: 16px 32px; font-size: 1rem; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 245, 241, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark { width: 28px; height: 28px; }

.logo-word {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.site-nav { flex: 1; display: flex; justify-content: center; }

.nav-list {
  display: flex;
  gap: 32px;
}

.nav-list a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.nav-list a:hover { color: var(--ink); }

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

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

/* ==========================================================================
   Eyebrow / badges
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-100);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.eyebrow-muted {
  background: transparent;
  color: var(--ink-faint);
  padding-left: 0;
}

.eyebrow-on-dark {
  background: rgba(255,255,255,0.08);
  color: #EDEBE3;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-500);
  flex-shrink: 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 40%, transparent 85%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 40%, transparent 85%);
  opacity: 0.7;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-metrics {
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-metric {
  margin: 0;
}

.hero-metric-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
  color: var(--ink);
}

.hero-metric-label {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --- Hero visual: posture card --- */

.hero-visual {
  display: flex;
  justify-content: center;
}

.posture-card {
  position: relative;
  width: 100%;
  max-width: 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -24px rgba(20, 51, 44, 0.28);
  padding: 28px 28px 24px;
  text-align: center;
}

.posture-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.gauge {
  width: 100%;
  height: auto;
  overflow: visible;
}

.gauge-track { stroke: var(--teal-100); }

.gauge-fill {
  stroke: var(--teal-700);
  transition: stroke-dashoffset 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-score {
  margin-top: -34px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}

.gauge-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--ink);
}

.gauge-max {
  font-size: 0.95rem;
  color: var(--ink-faint);
}

.posture-status {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-700);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-500);
}

.posture-caption {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   Section shell
   ========================================================================== */

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
}

.section-lede {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ==========================================================================
   Value grid
   ========================================================================== */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.value-card {
  background: var(--surface);
  padding: 32px 28px;
}

.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--teal-100);
  color: var(--teal-700);
  margin-bottom: 18px;
}

.value-icon svg { width: 22px; height: 22px; }

.value-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.value-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ==========================================================================
   Steps
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: step;
  position: relative;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--amber-600);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--teal-700);
  margin-bottom: 18px;
}

.step-icon svg { width: 22px; height: 22px; }

.step h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 32ch;
}

/* ==========================================================================
   Trust band
   ========================================================================== */

.section-compact { padding: 48px 0; }

.trust-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.trust-line {
  font-size: 1.1rem;
  color: var(--ink);
}

/* ==========================================================================
   Reports section
   ========================================================================== */

.reports-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}

.report-flow {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-flow-step {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-100);
  padding: 7px 12px;
  border-radius: 999px;
}

.report-flow-arrow {
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.report-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -24px rgba(20, 51, 44, 0.18);
  padding: 28px;
}

.report-rows {
  margin-top: 16px;
}

.report-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.report-row:last-child { border-bottom: none; }

.report-row dt {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.report-row dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: right;
}

/* ==========================================================================
   Beta section
   ========================================================================== */

.beta {
  background: var(--teal-900);
  color: #F3F1EA;
  text-align: center;
}

.beta-inner {
  max-width: 620px;
}

.beta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  color: #FFFFFF;
}

.beta-copy {
  margin-top: 18px;
  color: #C9D2CE;
  font-size: 1.05rem;
}

.beta .btn-primary {
  background: var(--amber-500);
  color: var(--teal-900);
}
.beta .btn-primary:hover { background: var(--amber-600); }

.beta-fine {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #93A19B;
}

.beta-fine a {
  color: var(--amber-500);
  text-decoration: underline;
}
.beta-fine a:hover { color: var(--amber-600); }

/* --- Waitlist form --- */

.waitlist-form {
  margin: 32px auto 0;
  max-width: 480px;
  text-align: left;
}

.waitlist-field {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.waitlist-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-family: inherit;
}

.waitlist-input::placeholder { color: #8FA39C; }

.waitlist-input:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 2px;
  border-color: var(--amber-500);
}

.waitlist-input[aria-invalid="true"] {
  border-color: var(--error-400);
}

.waitlist-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.waitlist-submit { flex-shrink: 0; }

.waitlist-message {
  margin-top: 12px;
  min-height: 1.3em;
  font-size: 0.9rem;
}

.waitlist-message.is-error { color: var(--error-300); }

.waitlist-message.is-success {
  color: var(--success-300);
  font-weight: 600;
}

/* ==========================================================================
   Legal pages (Privacy / Terms)
   ========================================================================== */

.legal {
  padding: 64px 0 96px;
}

.legal-back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: underline;
}
.legal-back:hover { color: var(--ink); }

.legal-header {
  max-width: 720px;
  margin: 0 auto 32px;
}

.legal-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--ink);
}

.legal-updated {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.legal-notice {
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 20px 24px;
  background: var(--teal-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--teal-900);
  font-size: 0.92rem;
}

.legal-body {
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1rem;
}

.legal-body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--ink);
  margin-top: 44px;
  margin-bottom: 14px;
}
.legal-body h2:first-child { margin-top: 0; }

.legal-body h3 {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  margin-top: 26px;
  margin-bottom: 10px;
}

.legal-body p { margin-top: 14px; }
.legal-body p:first-child { margin-top: 0; }

.legal-body a {
  color: var(--teal-700);
  text-decoration: underline;
}
.legal-body a:hover { color: var(--teal-900); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--teal-900);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 32px 24px;
}

.logo-footer .logo-word { color: #F3F1EA; }

.footer-copy {
  font-size: 0.85rem;
  color: #93A19B;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: #C9D2CE;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: #FFFFFF; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-visual { order: -1; }
  .posture-card { max-width: 260px; margin: 0 auto; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 44px; }
  .steps-6 { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
  .reports-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .steps-6 { grid-template-columns: 1fr; }
  .hero-metrics { gap: 24px; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    justify-content: flex-start;
  }

  .site-nav.is-open { display: flex; }

  .nav-list {
    flex-direction: column;
    width: 100%;
    padding: 8px 24px 20px;
    gap: 4px;
  }

  .nav-list a {
    display: block;
    padding: 10px 0;
  }

  .nav-toggle { display: inline-flex; }

  .value-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 56px 0 64px; }
  .section { padding: 64px 0; }
  .hero-actions .btn { width: 100%; }
  .hero-actions { flex-direction: column; }

  .waitlist-field { flex-direction: column; }
  .waitlist-input,
  .waitlist-submit { width: 100%; }
}
