/* HeroFit public web — marketing + legal + community fallbacks */
:root {
  --hf-cyan: #22d3ee;
  --hf-indigo: #4f46e5;
  --hf-gold: #c9a227;
  --hf-gold-deep: #9a7b0a;
  --hf-bg: #0b1017;
  --hf-bg-elevated: #121a24;
  --hf-surface: #1a222c;
  --hf-surface-2: #222c38;
  --hf-text: #f4f6f8;
  --hf-muted: #9aa4b2;
  --hf-border: #2a3544;
  --hf-radius: 16px;
  --hf-radius-sm: 12px;
  --hf-max: 1080px;
  --hf-content: 760px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--hf-bg);
  color: var(--hf-text);
  line-height: 1.6;
}

a {
  color: var(--hf-cyan);
}

a:hover {
  color: #67e8f9;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  max-width: var(--hf-max);
  margin: 0 auto;
  padding: 0 20px 64px;
}

.wrap-narrow {
  max-width: var(--hf-content);
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 16, 23, 0.88);
  border-bottom: 1px solid var(--hf-border);
}

.site-nav-inner {
  max-width: var(--hf-max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

/* Official logo + HeroFit wordmark (header) */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: 0;
  max-width: min(100%, 320px);
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--hf-text);
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hf-muted);
  line-height: 1.25;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: min(200px, 42vw);
  display: block;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--hf-muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--hf-text);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--hf-border);
  color: var(--hf-text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* —— Hero —— */
.hero {
  padding: 48px 0 32px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--hf-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-brand-mark {
  margin: 0 auto 20px;
  width: 112px;
  height: 112px;
}

.hero-brand-mark img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(34, 211, 238, 0.2));
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-slogan {
  margin: 0 auto 8px;
  max-width: 42ch;
  font-size: 1.15rem;
  color: var(--hf-muted);
}

.hero-note {
  margin: 12px auto 0;
  max-width: 48ch;
  font-size: 0.95rem;
  color: var(--hf-muted);
}

.hero-visual {
  margin: 36px auto 0;
  max-width: 720px;
  border-radius: var(--hf-radius);
  overflow: hidden;
  border: 1px solid var(--hf-border);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(79, 70, 229, 0.12)),
    radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(79, 70, 229, 0.2), transparent 45%),
    var(--hf-surface);
  padding: 32px 24px;
}

.hero-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-tile {
  border-radius: var(--hf-radius-sm);
  padding: 20px 12px;
  background: var(--hf-surface-2);
  border: 1px solid var(--hf-border);
  text-align: center;
}

.hero-tile-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--hf-cyan), var(--hf-indigo));
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.hero-tile span {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hf-muted);
}

/* —— Sections —— */
.section {
  padding: 48px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.section-header p {
  margin: 0;
  color: var(--hf-muted);
  max-width: 52ch;
  margin-inline: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius);
  padding: 24px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  color: var(--hf-muted);
  font-size: 0.95rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(79, 70, 229, 0.25));
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-size: 1.25rem;
}

/* —— Pricing —— */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pricing-card {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius);
  padding: 28px 24px;
}

.pricing-card.featured {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(165deg, var(--hf-surface) 0%, rgba(34, 211, 238, 0.06) 100%);
}

.pricing-card h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
}

.pricing-tier {
  color: var(--hf-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.pricing-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  padding: 6px 0;
  color: var(--hf-muted);
  font-size: 0.92rem;
}

.pricing-card li::before {
  content: "✓ ";
  color: var(--hf-cyan);
  font-weight: 700;
}

.pricing-note {
  margin-top: 20px;
  text-align: center;
  color: var(--hf-muted);
  font-size: 0.9rem;
}

/* —— Ads policy —— */
.policy-box {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius);
  padding: 28px 24px;
}

.policy-box h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.policy-box p,
.policy-box li {
  color: var(--hf-muted);
  font-size: 0.95rem;
}

.policy-box ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

/* —— Buttons —— */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--hf-radius-sm);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--hf-cyan), var(--hf-indigo));
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--hf-text);
  border: 1px solid var(--hf-border);
}

.btn-muted {
  background: var(--hf-surface-2);
  color: var(--hf-muted);
  border: 1px solid var(--hf-border);
  cursor: default;
}

.btn-muted:hover {
  transform: none;
}

/* —— Cards (community, legal) —— */
.card {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius);
  padding: 28px 24px;
  margin-top: 24px;
}

.card h1 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.card h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
}

.card h2:first-of-type {
  margin-top: 0;
}

.card p,
.card li {
  color: var(--hf-muted);
  font-size: 0.95rem;
}

.card ul,
.card ol {
  margin: 8px 0;
  padding-left: 1.25rem;
}

.card a {
  color: var(--hf-cyan);
}

.legal-updated {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--hf-border);
  font-size: 0.88rem;
  color: var(--hf-muted);
}

.back-link {
  margin-top: 24px;
  display: inline-block;
}

/* —— Forms —— */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--hf-radius-sm);
  border: 1px solid var(--hf-border);
  background: var(--hf-bg-elevated);
  color: var(--hf-text);
  font: inherit;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--hf-muted);
  margin-top: 6px;
}

/* —— Community profile/post —— */
header.site-header {
  text-align: center;
  padding: 32px 0 24px;
}

.profile-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a3544;
  flex-shrink: 0;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--hf-cyan);
}

.profile-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.profile-meta {
  margin: 4px 0 0;
  color: var(--hf-muted);
}

.post-preview img {
  width: 100%;
  border-radius: 12px;
  margin-top: 16px;
  max-height: 360px;
  object-fit: cover;
}

.muted {
  color: var(--hf-muted);
}

.error-box {
  border-color: #5c2b2b;
  background: #241818;
}

/* —— Footer —— */
footer.site-footer {
  margin-top: 48px;
  padding: 32px 20px 48px;
  border-top: 1px solid var(--hf-border);
  text-align: center;
  color: var(--hf-muted);
  font-size: 0.92rem;
  background: var(--hf-bg-elevated);
}

footer.site-footer .footer-inner {
  max-width: var(--hf-max);
  margin: 0 auto;
}

footer.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  margin-bottom: 16px;
}

footer.site-footer a {
  color: var(--hf-muted);
  text-decoration: none;
}

footer.site-footer a:hover {
  color: var(--hf-cyan);
}

.footer-brand {
  margin-bottom: 12px;
}

.loading {
  text-align: center;
  padding: 48px 0;
  color: var(--hf-muted);
}

.hidden {
  display: none !important;
}

/* —— Responsive —— */
@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 64px 0 40px;
  }

  .brand-mark {
    width: 64px;
    height: 64px;
  }

  .brand-name {
    font-size: 1.45rem;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-tagline {
    font-size: 0.65rem;
  }

  .hero-brand-mark,
  .hero-brand-mark img {
    width: 96px;
    height: 96px;
  }
}

@media (max-width: 380px) {
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0 4px;
    width: 100%;
  }

  .nav-links.is-open {
    display: flex;
  }

  .site-nav-inner {
    flex-wrap: wrap;
  }

  .hero-visual-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
