/* HealthyLyfe marketing — healthylyfe.fit */
:root {
  /* Align with app theme: frontend/constants/colors.ts (dark mode) */
  --bg: #121212;
  --bg-elevated: #161616;
  --surface: #1e1e1e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --muted: #a0a0a0;
  --accent: #4f8ef7;
  --accent-secondary: #9f7aea;
  --accent-dim: rgba(79, 142, 247, 0.18);
  --accent-glow: rgba(79, 142, 247, 0.35);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  position: relative;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.logo span.brand-accent {
  color: var(--accent);
}

/* Unregistered trademark — display only; consult counsel for registration strategy */
.tm {
  font-size: 0.55em;
  font-weight: 700;
  vertical-align: super;
  margin-left: 0.06em;
  color: var(--muted);
  line-height: 0;
}

.logo .tm {
  color: var(--accent-secondary);
  font-size: 0.5em;
}

.hl-inline {
  font-weight: inherit;
}

h1 .hl-inline .tm,
h2 .hl-inline .tm {
  font-size: 0.45em;
}

summary .hl-inline .tm {
  font-size: 0.65em;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 899px) {
  .site-header {
    z-index: 100;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    flex: 1 0 100%;
    width: 100%;
    order: 3;
    gap: 0;
    margin: 0;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid var(--border);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a:not(.btn-primary) {
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav > a:not(.btn-primary):last-child {
    border-bottom: none;
  }

  .nav a.btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    justify-content: center;
    text-align: center;
    border: none;
    background: linear-gradient(135deg, #4f8ef7, #2563eb);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 4px 24px var(--accent-glow);
  }

  .nav a.btn-primary:hover {
    color: #fff;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none !important;
  }

  .nav {
    display: flex !important;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, #4f8ef7, #2563eb);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  text-decoration: none;
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(4rem, 10vw, 6rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 20% auto -20%;
  height: 80%;
  background: radial-gradient(ellipse, var(--accent-dim) 0%, rgba(159, 122, 234, 0.08) 40%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    /* Slightly wider visual column so the hero screenshot reads larger */
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1.18fr);
    gap: 3rem;
  }
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 800;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36ch;
  margin: 0 0 1.75rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  border-radius: 28px;
  border: 3px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  overflow: hidden;
  max-width: 280px;
  background: var(--surface);
}

/* Hero only: was 280px — use most of the 560px-wide asset for a much larger, clearer preview */
.hero-visual .phone-frame {
  max-width: min(520px, min(100%, 92vw));
  width: 100%;
  border-radius: 32px;
  border-width: 4px;
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 0 80px rgba(79, 142, 247, 0.12);
}

.phone-frame img {
  width: 100%;
  vertical-align: middle;
}

.hero-visual .phone-frame img {
  /* Slight punch for UI screenshots; same PNG, better legibility on dark backgrounds */
  filter: contrast(1.05) saturate(1.06);
}

.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.75rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: rgba(79, 142, 247, 0.4);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  font-size: 1.25rem;
}

.shots {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .shots {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.shot figcaption {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.roadmap {
  display: grid;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.road-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.road-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
}

.road-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.road-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.65rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  margin-bottom: 0.65rem;
}

.faq p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta-band {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 3.5rem);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface), var(--bg-elevated));
  border: 1px solid var(--border);
  margin: 2rem 0 0;
}

.cta-band h2 {
  margin: 0 0 0.5rem;
}

.cta-band p {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* Long-form SEO / editorial blocks */
.seo-block {
  max-width: 900px;
  margin: 0 auto;
}

.seo-block h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--text);
}

.seo-block p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.seo-block .topic-grid {
  display: grid;
  gap: 0.35rem 1.5rem;
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.25rem 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: disc;
}

@media (min-width: 640px) {
  .seo-block .topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .seo-block .topic-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.seo-block .topic-grid li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

/* Legal pages */
.legal-doc {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.legal-doc h1 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.legal-doc .legal-updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

.legal-doc h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.65rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.legal-doc h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

.legal-doc p,
.legal-doc li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.legal-doc ul,
.legal-doc ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.legal-doc li {
  margin-bottom: 0.4rem;
}

.legal-doc .legal-note {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 600;
}

/* Early access form */
.early-page {
  padding-top: 0.5rem;
}

.early-intro {
  max-width: 640px;
  margin: 0 auto 2rem;
  text-align: center;
}

.early-intro h1 {
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.early-intro .lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}

.early-intro .badge-soon {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 1rem;
}

.early-form-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 2rem;
}

@media (min-width: 540px) {
  .early-form-card {
    padding: 2rem 2rem 2.25rem;
  }
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label,
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-group .hint,
.form-hint {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.45;
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

.early-form-card input[type="text"],
.early-form-card input[type="email"],
.early-form-card input[type="tel"],
.early-form-card textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.early-form-card input:focus,
.early-form-card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.early-form-card textarea {
  min-height: 120px;
  resize: vertical;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
}

.radio-option input {
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.radio-option span {
  line-height: 1.45;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.checkbox-row input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.form-actions {
  margin-top: 1.5rem;
}

.form-actions .btn-primary {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
}

.form-footnote {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.thank-you-box {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.thank-you-box h1 {
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.thank-you-box p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 1rem;
}
