/* ============================================================
   Hold Dear — marketing & support site
   Palette and type mirror the app's design system.
   ============================================================ */

:root {
  /* Warm cream surfaces */
  --cream:        #FAF6F1;
  --cream-deep:   #F2EBE0;
  --cream-card:   #FFFCF8;

  /* Warm ink — never pure black */
  --ink:          #2D2A26;
  --ink-soft:     #6B6157;
  --ink-faint:    #9A9085;

  /* Accents */
  --terracotta:      #C97B5D;
  --terracotta-deep: #A85F44;
  --terracotta-soft: #E7C3B3;
  --sage:            #94A88F;
  --gold:            #E8B547;

  /* Spacing scale: 4 8 12 16 24 32 48 64 */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

  /* Corner radii */
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;

  --shadow-soft: 0 2px 14px rgba(74, 49, 35, 0.06);
  --shadow:      0 14px 40px rgba(74, 49, 35, 0.12);
  --shadow-warm: 0 16px 38px rgba(168, 95, 68, 0.22);

  --maxw: 1120px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.62;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.serif-italic { font-family: "Fraunces", serif; font-style: italic; }
.accent       { color: var(--terracotta); }
.handwritten  { font-family: "Caveat", cursive; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-6); }

section { padding: clamp(64px, 9vw, 112px) 0; }

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: var(--s-4);
}

.section-head { max-width: 620px; margin-bottom: var(--s-12); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); margin-bottom: var(--s-4); }
.section-head p  { color: var(--ink-soft); font-size: 19px; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 17px;
  padding: 15px 28px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--cream-deep);
}
.btn-ghost:hover { border-color: var(--terracotta); color: var(--terracotta-deep); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--cream-card);
  border: 1.5px solid var(--cream-deep);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.nav.scrolled {
  background: rgba(250, 246, 241, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(74, 49, 35, 0.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-6);
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: var(--s-3); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand-name {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; align-items: center; gap: var(--s-8); }
.nav-links a {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--terracotta-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2.4px;
  background: var(--ink);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform .3s ease, opacity .3s ease;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7.4px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7.4px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(40px, 6vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  margin: var(--s-6) 0;
}
.hero p.lead {
  font-size: 21px;
  color: var(--ink-soft);
  max-width: 30ch;
  margin-bottom: var(--s-8);
}
.hero-cta { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.hero-note {
  margin-top: var(--s-6);
  font-size: 15px;
  color: var(--ink-faint);
}

/* soft glow behind the phone */
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
  content: "";
  position: absolute;
  width: 78%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(232,181,71,0.30), transparent 66%);
  top: 8%;
  filter: blur(8px);
  z-index: 0;
}

/* ============================================================
   Phone mockup (pure CSS — recreates the app's Today screen)
   ============================================================ */
.phone {
  position: relative;
  width: 312px;
  background: var(--ink);
  border-radius: 52px;
  padding: 13px;
  box-shadow: var(--shadow), 0 0 0 2px rgba(45,42,38,0.9);
  z-index: 1;
}
.phone-screen {
  background: var(--cream);
  border-radius: 40px;
  overflow: hidden;
  height: 624px;
  position: relative;
}
.phone-island {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 28px;
  background: var(--ink);
  border-radius: 999px;
  z-index: 3;
}
.app-screen { padding: 52px 18px 18px; }
.app-title {
  font-size: 25px;
  line-height: 1.16;
  margin-bottom: 3px;
}
.app-date { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 18px; }

.person-card {
  background: var(--cream-card);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 13px;
}
.person-card.birthday {
  background:
    radial-gradient(circle at top right, rgba(232,181,71,0.28), transparent 62%),
    var(--cream-card);
}
.pc-head { display: flex; gap: 11px; align-items: flex-start; }
.avatar {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 19px;
  color: #fff;
  background: linear-gradient(150deg, var(--av-a, var(--terracotta)), var(--av-b, var(--terracotta-deep)));
}
.pc-tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}
.pc-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 19px; }
.pc-reason { font-size: 13px; color: var(--ink-soft); }
.pc-actions { display: flex; gap: 7px; margin-top: 14px; }
.btn-mini {
  font-size: 13px;
  font-weight: 800;
  padding: 9px 0;
  border-radius: 11px;
  text-align: center;
}
.btn-mini.primary   { background: var(--ink); color: var(--cream); flex: 1; }
.btn-mini.secondary { background: var(--cream-deep); color: var(--ink); flex: 1; }
.btn-mini.tertiary  {
  border: 1.4px solid var(--cream-deep);
  color: var(--ink-soft);
  width: 74px;
}

/* ============================================================
   "Drift" — the problem / wedge band
   ============================================================ */
.band-deep { background: var(--cream-deep); }
.drift {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.drift h2 { font-size: clamp(28px, 4.2vw, 44px); margin-bottom: var(--s-6); }
.drift p { font-size: 20px; color: var(--ink-soft); }

/* ============================================================
   How it works — three steps
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}
.step {
  background: var(--cream-card);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  box-shadow: var(--shadow-soft);
}
.step-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  margin-bottom: var(--s-4);
}
.step-icon svg { width: 28px; height: 28px; }
.step-num {
  font-family: "Caveat", cursive;
  font-size: 26px;
  color: var(--terracotta);
  font-weight: 700;
}
.step h3 { font-size: 23px; margin: 6px 0 8px; }
.step p { color: var(--ink-soft); font-size: 16.5px; }

/* ============================================================
   Feature rows — alternating
   ============================================================ */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
.feature.flip .feature-art { order: -1; }
.feature h3 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: var(--s-4); }
.feature p { color: var(--ink-soft); font-size: 18.5px; margin-bottom: var(--s-6); }

.feature-list { list-style: none; }
.feature-list li {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  margin-bottom: var(--s-3);
  font-size: 16.5px;
  color: var(--ink-soft);
}
.feature-list li::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: inset 0 0 0 4px var(--cream);
}

.feature-art {
  background: var(--cream-deep);
  border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 52px);
  display: grid;
  place-items: center;
}
.feature-art img { width: min(280px, 80%); }

/* sticky note (mirrors the app's notes view) */
.sticky-note {
  background: linear-gradient(160deg, #F6D98A, var(--gold));
  border-radius: var(--r-sm);
  padding: 30px 26px;
  transform: rotate(-2.4deg);
  box-shadow: 0 14px 30px rgba(168,95,68,0.22);
  max-width: 280px;
}
.sticky-note p {
  font-family: "Caveat", cursive;
  font-size: 25px;
  line-height: 1.4;
  color: #5A4528;
  margin: 0;
}
.sticky-note .tape {
  width: 76px; height: 22px;
  background: rgba(255,255,255,0.5);
  margin: -42px auto 18px;
  border-radius: 3px;
}

/* ============================================================
   "What Hold Dear isn't"
   ============================================================ */
.nots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
  margin-top: var(--s-12);
}
.not {
  text-align: center;
  padding: var(--s-8) var(--s-6);
}
.not .mark {
  font-family: "Fraunces", serif;
  font-size: 38px;
  color: var(--terracotta-soft);
  margin-bottom: var(--s-2);
}
.not h3 { font-size: 22px; margin-bottom: 6px; }
.not p { color: var(--ink-soft); font-size: 16px; }

/* ============================================================
   Closing CTA
   ============================================================ */
.closing { text-align: center; }
.closing h2 {
  font-size: clamp(34px, 6vw, 64px);
  max-width: 16ch;
  margin: 0 auto var(--s-8);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: var(--s-16) 0 var(--s-8);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-8);
  padding-bottom: var(--s-12);
  border-bottom: 1px solid rgba(250,246,241,0.12);
}
.footer .brand-name { color: var(--cream); }
.footer-tag {
  color: rgba(250,246,241,0.62);
  margin-top: var(--s-3);
  max-width: 34ch;
  font-size: 16px;
}
.footer-col h4 {
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,246,241,0.5);
  margin-bottom: var(--s-4);
}
.footer-col a, .footer-col p {
  display: block;
  color: rgba(250,246,241,0.82);
  font-size: 16px;
  margin-bottom: var(--s-2);
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: var(--s-8);
  font-size: 14px;
  color: rgba(250,246,241,0.45);
}

/* ============================================================
   Support page
   ============================================================ */
.page-hero { text-align: center; padding-top: clamp(40px, 6vw, 80px); }
.page-hero h1 { font-size: clamp(38px, 5.6vw, 60px); margin: var(--s-4) 0; }
.page-hero p { color: var(--ink-soft); font-size: 20px; max-width: 30ch; margin: 0 auto; }

.contact-card {
  background: var(--cream-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.contact-card .step-icon {
  margin: 0 auto var(--s-4);
  background: rgba(201,123,93,0.14);
}
.contact-card h2 { font-size: 30px; margin-bottom: var(--s-3); }
.contact-card p { color: var(--ink-soft); margin-bottom: var(--s-6); }
.email-link {
  display: inline-block;
  font-family: "Fraunces", serif;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 600;
  color: var(--terracotta-deep);
  padding: 14px 28px;
  border-radius: var(--r-md);
  background: var(--cream-deep);
  transition: transform .25s ease, box-shadow .25s ease;
}
.email-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.reply-note { margin-top: var(--s-6); font-size: 15px; color: var(--ink-faint); }

/* FAQ accordion */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--cream-card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--s-3);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-6);
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.faq-q .chev {
  flex: none;
  width: 22px; height: 22px;
  transition: transform .3s ease;
  color: var(--terracotta);
}
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.faq-a-inner {
  padding: 0 var(--s-6) var(--s-6);
  color: var(--ink-soft);
  font-size: 16.5px;
}

/* ============================================================
   Privacy / legal prose
   ============================================================ */
.policy { max-width: 720px; margin: 0 auto; }
.policy .updated {
  color: var(--ink-faint);
  font-size: 15px;
  margin-bottom: var(--s-8);
}
.policy .lead-note {
  background: var(--cream-card);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--s-8);
  font-size: 18px;
}
.policy h2 {
  font-size: 26px;
  margin: var(--s-12) 0 var(--s-3);
}
.policy h2:first-of-type { margin-top: 0; }
.policy p { color: var(--ink-soft); margin-bottom: var(--s-4); }
.policy ul { color: var(--ink-soft); margin: 0 0 var(--s-4) var(--s-6); }
.policy li { margin-bottom: var(--s-2); }
.policy a { color: var(--terracotta-deep); font-weight: 700; }

/* ============================================================
   Scroll-reveal animation
   ============================================================ */
/* Progressive enhancement: only hide-then-reveal when JS is present
   (the <html class="js"> flag is set inline in <head>). With no JS,
   every .reveal stays fully visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(250,246,241,0.97);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    padding: var(--s-3) var(--s-6) var(--s-6);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: var(--s-4) 0; font-size: 18px; }
  .nav-links .btn { margin-top: var(--s-3); justify-content: center; }
  .nav-toggle { display: block; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { margin-top: var(--s-8); }
  .section-head { text-align: center; margin-left: auto; margin-right: auto; }

  .steps { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: var(--s-8); }
  .feature.flip .feature-art { order: 0; }
  .feature-art { order: -1; }
  .nots { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .phone { width: 280px; }
  .phone-screen { height: 560px; }
}

/* ============================================================
   Respect reduced motion (mirrors the app's accessibility work)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .email-link { transition: none; }
  * { animation-duration: .001ms !important; }
}
