/* Shared styles for the Health Partner website — landing + legal pages. */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1c1c1e;
  --subtext: #6b6b70;
  --border: #e5e5ea;
  --primary: #1a3d2b;
  --accent: #34c759;
  --accent-light: #52b788;
  --danger: #ff3b30;
  --shadow: rgba(20, 30, 25, 0.08);
  /* The three dimensions of wellbeing the app addresses — used to tag
     which feature serves which, not as decoration. */
  --physical: #2f9e57;
  --mental: #3f7cac;
  --emotional: #c2607a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f0e;
    --surface: #16181a;
    --text: #f2f2f2;
    --subtext: #a1a1a6;
    --border: #2c2c2e;
    --primary: #52b788;
    --accent: #34c759;
    --accent-light: #52b788;
    --danger: #ff453a;
    --shadow: rgba(0, 0, 0, 0.35);
    --physical: #4fce78;
    --mental: #7bb3e0;
    --emotional: #e08aa0;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

img { max-width: 100%; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
  padding: 20px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 15px;
  font-weight: 500;
}

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

.nav-links a:hover { color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

/* ── Store badges ────────────────────────────────────────────────────── */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  opacity: 0.55;
  cursor: default;
  font-size: 14px;
}

.store-badge .glyph { font-size: 22px; }
.store-badge .label-lines { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge .label-lines small { font-size: 10px; opacity: 0.8; }
.store-badge .label-lines strong { font-size: 15px; font-weight: 600; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  padding: 64px 0 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.hero-content { display: flex; flex-direction: column; align-items: center; }

.hero h1 {
  font-size: 48px;
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}

.hero p.lead {
  font-size: 19px;
  color: var(--subtext);
  max-width: 560px;
  margin: 0 auto 8px;
  line-height: 1.55;
}

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

.hero-actions .store-badges { justify-content: center; }

.hero-icon {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin-bottom: 28px;
  box-shadow: 0 12px 30px var(--shadow);
  /* Fixed brand background, not the page theme — this depicts the actual
     app icon (dark green, always), the same way the hero phone's screen
     always renders in the app's own dark UI regardless of site theme. */
  background: #1a3d2b;
}

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    padding: 84px 0 64px;
    gap: 24px;
  }
  .hero-content { align-items: flex-start; flex: 1; max-width: 540px; }
  .hero p.lead { margin: 0 0 8px; }
  .hero-actions, .hero-actions .store-badges { justify-content: flex-start; }
  .hero-illustration { flex: none; }
}

/* ── Hero illustration ──────────────────────────────────────────────── */

.hero-illustration {
  position: relative;
  width: 240px;
  height: 420px;
  margin: 0 auto;
}

.hero-illustration-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle at 50% 42%, rgba(52, 199, 89, 0.28), transparent 68%);
  filter: blur(6px);
  z-index: 0;
}

.hero-phone {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 24px 40px var(--shadow));
}

/* The screen always renders as the app's actual (dark) UI theme, regardless
   of the site's light/dark mode — it's depicting the app, not the page. */
.hero-phone .phone-body { fill: var(--primary); }
.hero-phone .phone-screen { fill: #0e1f16; }
.hero-phone .phone-notch { fill: rgba(255, 255, 255, 0.18); }

.hero-ring-wrap {
  position: absolute;
  top: 47%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 112px;
  height: 112px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-ring .ring-track { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 10; }
.hero-ring .ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  animation: heroRingFill 1.4s cubic-bezier(.32, .72, 0, 1) 0.5s forwards;
}

@keyframes heroRingFill { to { stroke-dashoffset: 98; } }

.hero-ring-label { position: absolute; text-align: center; color: #ffffff; transition: opacity 0.25s ease; }
.hero-ring-label.is-fading { opacity: 0; }
.hero-ring-label strong { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; }
.hero-ring-label span { display: block; font-size: 10.5px; opacity: 0.8; margin-top: 2px; }

.hero-notification {
  position: absolute;
  top: 6%;
  right: -14%;
  z-index: 3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 14px 30px var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 190px;
  animation: heroFloat 4s ease-in-out infinite;
}

.hero-notification-emoji, .hero-notification-title, .hero-notification-sub {
  transition: opacity 0.25s ease;
}
.hero-notification.is-fading .hero-notification-emoji,
.hero-notification.is-fading .hero-notification-title,
.hero-notification.is-fading .hero-notification-sub {
  opacity: 0;
}

.hero-notification-emoji { font-size: 22px; flex: none; }
.hero-notification-title { display: block; font-size: 13px; }
.hero-notification-sub { display: block; font-size: 11px; color: var(--subtext); margin-top: 1px; }

.hero-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-light);
  opacity: 0.45;
}

.hero-dot-1 { width: 16px; height: 16px; top: 8%; left: -8%; animation: heroFloat 5s ease-in-out infinite; }
.hero-dot-2 { width: 11px; height: 11px; bottom: 20%; right: -6%; animation: heroFloat 6s ease-in-out infinite 0.6s; }
.hero-dot-3 { width: 9px; height: 9px; bottom: 8%; left: 4%; animation: heroFloat 5.5s ease-in-out infinite 1.2s; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@media (max-width: 899px) {
  .hero-illustration { width: 200px; height: 350px; }
  .hero-notification { right: -6%; max-width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-notification, .hero-dot, .hero-ring .ring-progress { animation: none !important; }
  .hero-ring .ring-progress { stroke-dashoffset: 98; }
}

/* ── Feature grid ────────────────────────────────────────────────────── */

.section { padding: 56px 0; }

.section-title {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--subtext);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 44px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* When the count leaves exactly one card alone in the last row, center it
   instead of leaving it stranded on the left. */
.feature-grid > .feature-card:last-child:nth-child(3n + 1) {
  grid-column: 2 / 3;
}

@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid > .feature-card:last-child:nth-child(3n + 1) { grid-column: auto; }
  .hero h1 { font-size: 34px; }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px var(--shadow);
  border-color: var(--accent-light);
}

.feature-emoji {
  font-size: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(52, 199, 89, 0.12);
  margin-bottom: 16px;
  transition: transform 0.25s ease;
}

.feature-card:hover .feature-emoji { transform: scale(1.1) rotate(-4deg); }

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ── Why it matters ──────────────────────────────────────────────────── */

.why-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 44px;
}

.why-intro h2 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 14px;
}

.why-intro p {
  color: var(--subtext);
  font-size: 16.5px;
  line-height: 1.65;
  margin: 0;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  border-top: 3px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px var(--shadow);
}

.pillar-card.physical { border-top-color: var(--physical); }
.pillar-card.mental { border-top-color: var(--mental); }
.pillar-card.emotional { border-top-color: var(--emotional); }

.pillar-card .pillar-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.pillar-card.physical .pillar-label { color: var(--physical); }
.pillar-card.mental .pillar-label { color: var(--mental); }
.pillar-card.emotional .pillar-label { color: var(--emotional); }

.pillar-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.pillar-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ── Trust strip ─────────────────────────────────────────────────────── */

.trust-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

@media (max-width: 760px) {
  .trust-strip { grid-template-columns: 1fr; }
}

.trust-strip .glyph { font-size: 26px; margin-bottom: 8px; }
.trust-strip h4 { margin: 0 0 6px; font-size: 15px; }
.trust-strip p { margin: 0; color: var(--subtext); font-size: 13.5px; line-height: 1.5; }

.trust-strip > div { transition: transform 0.25s ease; }
.trust-strip > div:hover { transform: translateY(-4px); }

/* ── Scroll-reveal ───────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.pillars [data-reveal]:nth-child(3n + 2) { transition-delay: 0.08s; }
.pillars [data-reveal]:nth-child(3n + 3) { transition-delay: 0.16s; }
.feature-grid [data-reveal]:nth-child(3n + 2) { transition-delay: 0.08s; }
.feature-grid [data-reveal]:nth-child(3n + 3) { transition-delay: 0.16s; }
.trust-strip [data-reveal]:nth-child(3n + 2) { transition-delay: 0.08s; }
.trust-strip [data-reveal]:nth-child(3n + 3) { transition-delay: 0.16s; }

.section-subtitle[data-reveal], .why-intro p[data-reveal] { transition-delay: 0.1s; }

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

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
  color: var(--subtext);
}

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

.footer-links a {
  text-decoration: none;
  color: var(--subtext);
}

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

/* ── Legal / long-form pages ─────────────────────────────────────────── */

.legal-header {
  background: var(--primary);
  color: #ffffff;
  padding: 56px 24px 40px;
}

.legal-header .container { text-align: left; }

.legal-header h1 {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 800;
}

.legal-header p {
  margin: 0;
  opacity: 0.85;
  font-size: 15.5px;
}

.legal-body {
  max-width: 760px;
  margin: 40px auto 20px;
  padding: 0 24px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}

@media (max-width: 480px) {
  .legal-body { padding: 0 16px; }
  .legal-card { padding: 24px; }
}

.legal-card h2 {
  font-size: 19px;
  margin: 28px 0 10px;
}

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

.legal-card h3.faq-q {
  font-size: 16px;
  margin: 20px 0 10px;
}

.legal-card p, .legal-card li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: break-word;
}

.legal-card ul { padding-left: 22px; }

.legal-card .updated {
  color: var(--subtext);
  font-size: 13.5px;
  margin-bottom: 24px;
}

.legal-card a.inline-link {
  color: var(--accent-light);
  font-weight: 600;
  text-decoration: none;
}

.callout {
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.3);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14.5px;
  margin: 20px 0;
}

/* ── Contact links ───────────────────────────────────────────────────── */

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 14px 0;
  text-decoration: none;
  color: var(--text);
}

.contact-card .glyph { font-size: 22px; flex: none; }
/* The direct-child span is a flex item; without min-width: 0 a flex item
   never shrinks below its content's intrinsic width, so the long,
   space-less email address inside forces the whole card (and page) wider
   than the viewport instead of wrapping. */
.contact-card > span { min-width: 0; }
.contact-card strong { display: block; font-size: 15px; overflow-wrap: break-word; }
.contact-card span { display: block; color: var(--subtext); font-size: 13.5px; overflow-wrap: break-word; }

/* ── Contact form ────────────────────────────────────────────────────── */

.contact-form { margin: 20px 0 8px; }

.form-row {
  display: flex;
  gap: 14px;
}

@media (max-width: 560px) {
  .form-row { flex-direction: column; gap: 0; }
}

.form-field {
  flex: 1;
  margin-bottom: 16px;
  min-width: 0;
}

.form-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-light);
}

/* Honeypot — invisible to real users (visual + screen reader + tab order),
   left in the DOM and named enticingly for bots that fill every field. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-status {
  margin: 12px 0 0;
  font-size: 14px;
  min-height: 1.4em;
}

.form-status-success { color: var(--accent-light); }
.form-status-error { color: #ff453a; }

/* ── Blog ────────────────────────────────────────────────────────────── */

.category-nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
}

.category-nav a {
  color: var(--subtext);
  text-decoration: none;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.category-nav a:hover { color: var(--text); border-color: var(--accent-light); }

.category-nav a.active {
  color: var(--text);
  border-color: var(--accent-light);
  background: rgba(52, 199, 89, 0.1);
  font-weight: 600;
}

.blog-list {
  max-width: 760px;
  margin: 40px auto 20px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.blog-post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
  text-decoration: none;
  color: inherit;
}

.blog-post-card:hover { border-color: var(--accent-light); }

.blog-post-card .blog-meta { margin-bottom: 10px; }

.blog-post-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.blog-post-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 14.5px;
  line-height: 1.6;
}

.blog-meta {
  color: var(--subtext);
  font-size: 13px;
  font-weight: 500;
}

.blog-article h2 { font-size: 22px; margin: 34px 0 12px; }
.blog-article h2:first-child { margin-top: 0; }
.blog-article h3 { font-size: 17px; margin: 22px 0 8px; }
.blog-article p, .blog-article li { font-size: 15.5px; line-height: 1.75; }
.blog-article ul, .blog-article ol { padding-left: 22px; }

.blog-article .references {
  font-size: 13.5px;
  color: var(--subtext);
  line-height: 1.9;
  padding-left: 20px;
}

.blog-article .references a { color: var(--accent-light); font-weight: 600; text-decoration: none; }

.blog-article .verify-note {
  color: var(--subtext);
  font-size: 12.5px;
  margin-top: -8px;
}
