/*
  HoldOn — marketing site styles
  Palette pulled directly from the iOS app's AppTheme.swift so the site and the
  product feel like the same brand, not a separate marketing skin.
*/

:root {
  --bg: #0a0a12;
  --bg-elevated: #111120;
  --card: #15151f;
  --card-border: rgba(255, 255, 255, 0.07);
  --purple: #875cfa;
  --purple-deep: #572eb8;
  --purple-bright: #9e6bfc;
  --mint: #4cebbf;
  --gold: #ffc83d;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.66);
  --text-tertiary: rgba(255, 255, 255, 0.42);
  --max-width: 1120px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

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

/* Background glow, reused behind the hero and CTA bands */
.glow-field {
  position: relative;
  isolation: isolate;
}

.glow-field::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background: radial-gradient(closest-side, rgba(135, 92, 250, 0.28), transparent);
  z-index: -1;
  pointer-events: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--purple);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  z-index: 100;
  transition: top 0.2s ease;
}

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

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 18, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.nav-cta.btn {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  cursor: pointer;
}

.nav-cta-mobile {
  display: none;
}

@media (min-width: 760px) {
  .nav-cta.btn {
    display: inline-flex;
  }
}

@media (max-width: 759px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--card-border);
  }

  .nav-links .nav-cta-mobile {
    display: block;
    border-bottom: none;
    padding-top: 16px;
    width: 100%;
  }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-bright), var(--purple-deep));
  color: #fff;
  box-shadow: 0 8px 24px rgba(135, 92, 250, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(135, 92, 250, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-block {
  width: 100%;
}

/* App Store style badge — a custom badge in HoldOn's own brand rather than a
   reproduction of Apple's marketing artwork. */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 20px 10px 16px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-badge .store-badge-text {
  line-height: 1.15;
}

.store-badge .store-badge-eyebrow {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.store-badge .store-badge-name {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Hero */
.hero {
  padding: 64px 0 40px;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 40px 0 60px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mint);
  background: rgba(76, 235, 191, 0.1);
  border: 1px solid rgba(76, 235, 191, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

h1 .accent {
  background: linear-gradient(135deg, var(--purple-bright), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 46ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-tertiary);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  width: min(440px, 100%);
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(135, 92, 250, 0.35), transparent 70%),
    radial-gradient(closest-side at 50% 60%, rgba(76, 235, 191, 0.12), transparent 70%);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid rgba(135, 92, 250, 0.25);
}

.hero-visual img {
  position: relative;
  width: 82%;
  height: auto;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.5));
}

/* Section scaffolding */
.section {
  padding: 88px 0;
}

.section-tight {
  padding: 56px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* How it works */
.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  position: relative;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(135, 92, 250, 0.16);
  color: var(--purple-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 18px;
}

.step h3 {
  font-size: 16px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Feature cards */
.feature-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(135, 92, 250, 0.14);
  color: var(--purple-bright);
}

.feature-icon.mint {
  background: rgba(76, 235, 191, 0.14);
  color: var(--mint);
}

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

.feature-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Philosophy / safety-exit section */
.philosophy {
  background: var(--bg-elevated);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.philosophy-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 860px) {
  .philosophy-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.philosophy-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.philosophy-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.philosophy-list .check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(76, 235, 191, 0.16);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.philosophy-list svg {
  width: 13px;
  height: 13px;
}

.philosophy-list strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.philosophy-list span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 90px 0;
}

.cta-band h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.cta-band p {
  color: var(--text-secondary);
  max-width: 50ch;
  margin: 0 auto 32px;
}

.cta-band .hero-actions {
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 56px 0 32px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-tertiary);
  font-size: 14px;
  max-width: 32ch;
  margin: 14px 0 0;
}

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

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Legal pages (privacy / terms) */
.legal {
  padding: 56px 0 100px;
}

.legal-header {
  max-width: 680px;
  margin-bottom: 48px;
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.legal-updated {
  color: var(--text-tertiary);
  font-size: 14px;
}

.legal-body {
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 15.5px;
}

.legal-body h2 {
  color: var(--text-primary);
  font-size: 20px;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  margin: 0 0 16px;
}

.legal-body ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body a {
  color: var(--purple-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-toc {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 40px;
  max-width: 720px;
}

.legal-toc h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin: 0 0 14px;
}

.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  gap: 24px;
}

.legal-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  line-height: 2;
}

.legal-toc a:hover {
  color: var(--purple-bright);
}

/* Contact page */
.contact-grid {
  display: grid;
  gap: 24px;
  max-width: 720px;
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.contact-card .feature-icon {
  margin-bottom: 20px;
}

.contact-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 18px;
}

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
