/* ============================================================
   HeyFriend — Apple-inspired design system
   White space, big type, one accent, quiet depth.
   ============================================================ */

:root {
  /* Palette */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elev: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --hairline: #d2d2d7;
  --accent: #e8543d;
  --accent-deep: #cf4128;
  --accent-tint: #fdefec;
  --grad-warm: linear-gradient(94deg, #e8543d 10%, #f2913d 90%);
  --ok: #3d9a50;
  --ok-tint: #eaf6ed;

  /* Type — SF on Apple hardware, Inter everywhere else */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Inter", "Segoe UI", Roboto, sans-serif;
  --text-base: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;
  --text-lg: clamp(1.1875rem, 1.1rem + 0.5vw, 1.4375rem);
  --text-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-h2: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --text-hero: clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);

  /* Space & shape */
  --space-section: clamp(4.5rem, 3.5rem + 5vw, 8.5rem);
  --radius-card: 28px;
  --radius-input: 12px;
  --radius-pill: 980px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 4px 16px rgba(0, 0, 0, 0.06), 0 24px 60px rgba(0, 0, 0, 0.12);

  --duration-fast: 180ms;
  --duration-normal: 400ms;
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.021em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); line-height: 1.25; letter-spacing: -0.012em; }

p { color: var(--ink-2); }

a { color: var(--accent-deep); }

.container {
  width: min(1080px, 100% - 2.75rem);
  margin-inline: auto;
}

.section { padding-block: var(--space-section); }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.section-head { max-width: 680px; margin-bottom: clamp(2.2rem, 4vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 1rem; font-size: var(--text-lg); color: var(--ink-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.8rem 1.6rem;
  min-height: 48px;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease,
              color var(--duration-fast) ease,
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) ease;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-primary:active { transform: none; }

.btn-secondary { background: rgba(29, 29, 31, 0.06); color: var(--ink); }
.section-alt .btn-secondary, .wizard-shell .btn-secondary { background: rgba(29, 29, 31, 0.08); }
.btn-secondary:hover { background: rgba(29, 29, 31, 0.11); transform: translateY(-1px); }

.btn-lg { padding: 0.95rem 2rem; font-size: 1.125rem; min-height: 54px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding-block: 0.35rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad-warm);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.logo-mark svg { width: 19px; height: 19px; }
.logo span em { color: var(--accent); font-style: normal; }

.main-nav { display: none; }
.header-ctas { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.6rem;
  cursor: pointer;
}
.nav-toggle .bar {
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-fast) ease;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 1.2rem 0 1.6rem;
}
.mobile-menu.open { display: block; }
.mobile-menu a:not(.btn) {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.mobile-menu .menu-ctas { display: grid; gap: 0.75rem; margin-top: 1.4rem; }

@media (min-width: 900px) {
  .nav-toggle, .mobile-menu { display: none !important; }
  .main-nav { display: flex; gap: 2rem; }
  .main-nav a {
    text-decoration: none;
    color: var(--ink-2);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: -0.005em;
    padding: 0.4rem 0;
    transition: color var(--duration-fast) ease;
  }
  .main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
  .header-ctas { display: flex; gap: 0.6rem; align-items: center; }
  .header-ctas .btn { padding: 0.45rem 1.1rem; font-size: 0.9rem; min-height: 36px; }
}

/* ---------- Hero (centered, Apple-style) ---------- */
.hero {
  padding-block: clamp(3.5rem, 7vw, 6.5rem) var(--space-section);
  overflow: hidden;
  text-align: center;
}
.hero-copy { max-width: 820px; margin-inline: auto; }
.hero-copy h1 em {
  font-style: normal;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p.lede {
  margin: 1.4rem auto 0;
  font-size: var(--text-lg);
  max-width: 40rem;
  color: var(--ink-2);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2rem;
}
.trust-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  margin-top: 1.7rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-3);
}
.trust-line span { display: inline-flex; align-items: center; gap: 0.4rem; }
.trust-line svg { color: var(--ok); flex-shrink: 0; }

.hero-visual {
  position: relative;
  max-width: 880px;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
}
.photo-frame {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--bg-alt);
  position: relative;
}
.photo-frame svg, .photo-frame video, .photo-frame img { width: 100%; height: auto; display: block; }
.photo-note {
  position: absolute;
  bottom: 1rem; left: 1rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink);
}
.hero-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem 0.5rem 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--ink);
}
.hero-badge .dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ok-tint);
  display: grid;
  place-items: center;
  color: var(--ok);
}
.hero-badge .dot svg { width: 16px; height: 16px; }

/* ---------- Steps ---------- */
.steps-grid { display: grid; gap: 1.1rem; }
.step-card {
  background: var(--bg-alt);
  border-radius: var(--radius-card);
  padding: 2.1rem 1.9rem;
}
.section-alt .step-card { background: var(--bg-elev); }
.step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-tint);
  margin-bottom: 1.2rem;
}
.step-card h3 { margin-bottom: 0.55rem; }
.step-card p { font-size: 1rem; }
@media (min-width: 760px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Activity cards ---------- */
.activities-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, 1fr); }
.activity-card {
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) ease;
}
.section-alt .activity-card { background: var(--bg-elev); }
.activity-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.activity-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-tint);
}
.activity-icon svg { width: 22px; height: 22px; }
.activity-card h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; }
@media (min-width: 760px) { .activities-grid { grid-template-columns: repeat(4, 1fr); } }

.service-note {
  margin: 1.6rem auto 0;
  max-width: 640px;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--ink-3);
  text-align: left;
}
.service-note svg { flex-shrink: 0; margin-top: 2px; width: 16px; height: 16px; }

/* ---------- Benefit cards ---------- */
.benefits-grid { display: grid; gap: 1.1rem; }
.benefit-card {
  background: var(--bg-elev);
  border-radius: var(--radius-card);
  padding: 2.1rem 1.9rem;
}
.section:not(.section-alt) .benefit-card { background: var(--bg-alt); }
.benefit-card .activity-icon { margin-bottom: 1.1rem; }
.benefit-card h3 { margin-bottom: 0.5rem; }
.benefit-card p { font-size: 1rem; }
@media (min-width: 760px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .benefits-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Older adults band (dark) ---------- */
.older-band {
  background: var(--ink);
  color: #f5f5f7;
  border-radius: var(--radius-card);
  padding: clamp(2.4rem, 5vw, 4.5rem);
  display: grid;
  gap: 2.2rem;
  align-items: center;
  overflow: hidden;
}
.older-band h2 { color: #f5f5f7; }
.older-band .eyebrow { color: #f9917b; }
.older-band p { color: #a1a1a6; font-size: var(--text-lg); margin-top: 1rem; }
.older-band .photo-frame { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
@media (min-width: 900px) { .older-band { grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; } }

/* ---------- Testimonials ---------- */
.sample-flag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  background: rgba(29, 29, 31, 0.05);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
  margin-bottom: 0.5rem;
}
.testimonials-grid { display: grid; gap: 1.1rem; }
.testimonial-card {
  background: var(--bg-elev);
  border-radius: var(--radius-card);
  padding: 2.1rem 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.section:not(.section-alt) .testimonial-card { background: var(--bg-alt); }
.testimonial-card blockquote {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.42;
  color: var(--ink);
}
.testimonial-card blockquote::before { content: "“"; color: var(--accent); margin-right: 1px; }
.testimonial-who { display: flex; align-items: center; gap: 0.8rem; margin-top: auto; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  background: var(--accent-tint);
  flex-shrink: 0;
}
.testimonial-who strong { display: block; font-size: 0.98rem; letter-spacing: -0.005em; }
.testimonial-who small { color: var(--ink-3); font-size: 0.85rem; font-weight: 500; }
@media (min-width: 900px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Safety ---------- */
.safety-grid { display: grid; gap: 0.9rem; }
.safety-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 1.3rem 1.4rem;
}
.section-alt .safety-item { background: var(--bg-elev); }
.safety-item .check {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ok-tint);
  color: var(--ok);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.safety-item strong { display: block; font-size: 1.04rem; letter-spacing: -0.008em; margin-bottom: 0.2rem; }
.safety-item p { font-size: 0.95rem; }
@media (min-width: 760px) { .safety-grid { grid-template-columns: repeat(2, 1fr); } }

.disclaimer {
  margin: 1.8rem auto 0;
  max-width: 640px;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--ink-3);
  text-align: left;
}
.disclaimer svg { flex-shrink: 0; margin-top: 2px; width: 16px; height: 16px; }

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--bg-alt);
  border-radius: var(--radius-card);
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.final-cta h2 { max-width: 24ch; margin-inline: auto; }
.final-cta p { margin-top: 1rem; font-size: var(--text-lg); }
.final-cta .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  color: var(--ink-2);
  padding: clamp(2.8rem, 5vw, 4rem) 0 2rem;
  margin-top: var(--space-section);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: var(--text-sm);
}
.footer-grid { display: grid; gap: 2.2rem; }
.footer-brand .logo { color: var(--ink); font-size: 1.1rem; }
.footer-brand p { color: var(--ink-3); margin-top: 0.8rem; max-width: 26rem; font-size: 0.95rem; }
.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--ink-2); text-decoration: none; font-weight: 400; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.8rem;
  color: var(--ink-3);
  display: grid;
  gap: 0.7rem;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }

/* ---------- Floating contact ---------- */
.contact-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.contact-float a {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-lift);
  transition: transform var(--duration-fast) var(--ease-out);
}
.contact-float a:hover { transform: translateY(-2px) scale(1.04); }
.contact-float .wa { background: #25d366; }
.contact-float .tel { background: var(--ink); }

/* ---------- Reveal animation ----------
   Content is always visible by default; the fade-up plays as a one-shot
   animation when an element enters the viewport. Nothing is ever hidden
   if JS fails, races, or the page is captured full-height. */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.js .reveal.in { animation: fadeUp 0.65s var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal.in { animation: none; }
  .btn, .activity-card, .contact-float a { transition: none; }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 1rem; top: -60px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 12px 12px;
  z-index: 100;
  text-decoration: none;
  transition: top var(--duration-fast) ease;
}
.skip-link:focus { top: 0; }
