/* ==========================================================================
   GoatLab Public Site (goat-lab.au) — Zero-Dependency Static Stylesheet
   Matches GoatLab Cockpit Palette (Obsidian Dark & Alpine Light)
   ========================================================================== */

:root {
  --bg-canvas: #0B0F14;
  --bg-surface: #131A24;
  --bg-elevated: #192230;
  --border: #222E3E;
  --border-strong: #334155;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --amber: #F59E0B;
  --amber-hover: #FBBF24;
  --amber-glow: rgba(245, 158, 11, 0.14);
  --cyan: #06B6D4;
  --cyan-glow: rgba(6, 182, 212, 0.14);
  --green: #10B981;
  --red: #F43F5E;
  --grid-line: rgba(148, 163, 184, 0.06);
  --font-display: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: 860px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 20, 0.86);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: 68px;
  padding: 0.6rem 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #0B0F14;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  white-space: nowrap;
}

.brand-wordmark span {
  color: var(--amber);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-links a.nav-item {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-links a.nav-item:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-links a.nav-item.is-active {
  color: var(--text-primary);
}

.label-short {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.56rem 1.02rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--amber);
  color: #0B0F14;
}

.btn-primary:hover {
  background: var(--amber-hover);
}

.btn-outline {
  background: rgba(25, 34, 48, 0.65);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-cyan {
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.45);
}

.btn-cyan:hover {
  background: rgba(6, 182, 212, 0.24);
  border-color: var(--cyan);
  color: var(--text-primary);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-lg {
  padding: 0.78rem 1.35rem;
  font-size: 0.95rem;
}

/* Hero Section */
.hero {
  padding: 4.25rem 0 3.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: var(--cyan-glow);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.15rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.75);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.4vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.1rem;
}

.hero h1 .accent-amber {
  color: var(--amber);
}

.hero-lead {
  font-size: 1.06rem;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Telemetry Mockup Card */
.telemetry-card {
  background: linear-gradient(180deg, rgba(25, 34, 48, 0.92) 0%, rgba(19, 26, 36, 0.98) 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

.telemetry-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.telemetry-card-title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.telemetry-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kpi-box {
  background: rgba(11, 15, 20, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.75rem;
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kpi-value.cyan { color: var(--cyan); }
.kpi-value.amber { color: var(--amber); }
.kpi-value.green { color: var(--green); }

.course-preview-box {
  background: rgba(11, 15, 20, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 0.9rem;
}

.course-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.course-preview-head strong {
  color: var(--text-primary);
}

.course-preview-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
}

.fuel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fuel-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.65);
}

.fuel-pill.carbs { color: #FB923C; border-color: rgba(249, 115, 22, 0.35); }
.fuel-pill.fluid { color: #60A5FA; border-color: rgba(59, 130, 246, 0.35); }
.fuel-pill.sodium { color: #FACC15; border-color: rgba(234, 179, 8, 0.35); }

.telemetry-card-cta {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.telemetry-card-cta-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.telemetry-card-cta-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
}

.telemetry-card-cta-link:hover {
  color: var(--amber-hover);
}

/* Request an Invite Section */
.invite-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 1.5rem;
  align-items: start;
}

.invite-aside {
  display: grid;
  gap: 1.15rem;
}

.demo-callout-card {
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.12) 0%, rgba(19, 26, 36, 0.96) 65%);
  border: 1px solid rgba(6, 182, 212, 0.36);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.demo-callout-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}

.demo-callout-card p {
  font-size: 0.89rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.invite-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.invite-form {
  display: grid;
  gap: 0.95rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.field-group {
  display: grid;
  gap: 0.35rem;
}

.field-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: rgba(11, 15, 20, 0.78);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  padding: 0.62rem 0.78rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--text-muted);
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.field-textarea {
  resize: vertical;
  min-height: 82px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.turnstile-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
}

.invite-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.invite-privacy-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: 34ch;
}

.invite-status {
  display: none;
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.invite-status.is-visible {
  display: block;
}

.invite-status.is-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #A7F3D0;
}

.invite-status.is-error {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.42);
  color: #FECDD3;
}

/* Sections */
.section {
  padding: 3.25rem 0;
  border-top: 1px solid var(--border);
}

.section-header {
  max-width: 68ch;
  margin-bottom: 2rem;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.45rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  transition: border-color 0.15s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--amber-glow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}

.feature-icon.cyan {
  background: var(--cyan-glow);
  border-color: rgba(6, 182, 212, 0.3);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Architecture & Security Strip */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.trust-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.45rem;
}

.trust-panel h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin-bottom: 0.65rem;
}

.trust-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.trust-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.trust-check {
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

/* Privacy Policy Page */
.legal-hero {
  padding: 3rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
}

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legal-content {
  padding: 2.25rem 0 3.75rem;
  display: grid;
  gap: 1.5rem;
}

.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.legal-card h2 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-card h2 .sec-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  background: var(--amber-glow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
}

.legal-card p,
.legal-card li {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.legal-card p + p,
.legal-card p + ul,
.legal-card ul + p {
  margin-top: 0.7rem;
}

.legal-card ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.legal-card strong {
  color: var(--text-primary);
}

.legal-highlight {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 0.8rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.92);
  padding: 2rem 0 2.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-disclaimer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .invite-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .header-inner {
    min-height: 58px;
    padding: 0.5rem 0;
    gap: 0.6rem;
  }
  .brand-link {
    gap: 0.55rem;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .brand-icon svg {
    width: 25px;
    height: 25px;
  }
  .brand-wordmark {
    font-size: 1.18rem;
  }
  .brand-sub {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .kpi-strip {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 0.7rem;
  }
  .nav-links a.nav-item {
    font-size: 0.84rem;
  }
  .nav-links a.hide-mobile {
    display: none;
  }
  .nav-links .btn {
    padding: 0.44rem 0.78rem;
    font-size: 0.82rem;
  }
  .label-full {
    display: none;
  }
  .label-short {
    display: inline;
  }
}

/* ==========================================================================
   Theme Toggle Button & Alpine Light Theme (3C.5)
   ========================================================================== */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--amber);
  background: var(--amber-glow);
  transform: translateY(-1px);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

html.light-theme {
  --bg-canvas: #F4F7FA;
  --bg-surface: #FFFFFF;
  --bg-elevated: #EDF2F7;
  --border: #D6E0EC;
  --border-strong: #B8C7D9;
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --amber: #D97706;
  --amber-hover: #B45309;
  --amber-glow: rgba(217, 119, 6, 0.12);
  --cyan: #0284C7;
  --cyan-glow: rgba(2, 132, 199, 0.12);
  --green: #059669;
  --red: #E11D48;
  --grid-line: rgba(15, 23, 42, 0.045);
}

html.light-theme .site-header {
  background: rgba(244, 247, 250, 0.88);
}

html.light-theme .telemetry-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html.light-theme .kpi-box,
html.light-theme .course-preview-box,
html.light-theme .fuel-pill {
  background: #F8FAFC;
}

html.light-theme .fuel-pill.carbs {
  color: #C2410C;
  border-color: rgba(194, 65, 12, 0.3);
}

html.light-theme .fuel-pill.fluid {
  color: #1D4ED8;
  border-color: rgba(29, 78, 216, 0.3);
}

html.light-theme .fuel-pill.sodium {
  color: #A16207;
  border-color: rgba(161, 98, 7, 0.35);
}

html.light-theme .demo-callout-card {
  background: linear-gradient(145deg, rgba(2, 132, 199, 0.08) 0%, #FFFFFF 70%);
  border-color: rgba(2, 132, 199, 0.32);
}

html.light-theme .field-input,
html.light-theme .field-select,
html.light-theme .field-textarea {
  background: #FFFFFF;
}

html.light-theme .site-footer {
  background: rgba(255, 255, 255, 0.92);
}

html.light-theme .btn-primary {
  color: #FFFFFF;
}

@media (max-width: 680px) {
  .theme-toggle-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}
