/* ================================================================
   Life Index — global styles
   Palette: deep burgundy, cream, warm coral accent
   ================================================================ */

:root {
  --bg:            #f6f1ea;
  --bg-alt:        #efe7dc;
  --surface:       #ffffff;
  --ink:           #1a0a12;
  --ink-2:         #3b2a33;
  --muted:         #6b5a63;
  --line:          rgba(26, 10, 18, 0.10);
  --line-strong:   rgba(26, 10, 18, 0.18);

  --brand:         #8a1538;   /* burgundy */
  --brand-ink:     #5e0e26;
  --brand-soft:    #b3264f;
  --accent:        #e06b5a;   /* warm coral */

  --shadow-sm: 0 1px 2px rgba(26,10,18,.06), 0 2px 8px rgba(26,10,18,.04);
  --shadow-md: 0 6px 20px rgba(26,10,18,.08), 0 2px 6px rgba(26,10,18,.05);
  --shadow-lg: 0 20px 40px rgba(26,10,18,.14), 0 8px 16px rgba(26,10,18,.06);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --container: 1180px;

  --t-fast: 160ms cubic-bezier(.2,.7,.3,1);
  --t-base: 260ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-ink); }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; color: var(--ink-2); }
.muted { color: var(--muted); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 241, 234, .85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(246, 241, 234, .96);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif; font-weight: 600;
  color: var(--ink); font-size: 1.15rem; letter-spacing: -0.01em;
}
.brand__mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-block; flex: none;
  filter: drop-shadow(0 4px 10px rgba(138,21,56,.28));
  transition: transform var(--t-base);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.04); }
.brand--light .brand__name { color: var(--bg); }
.brand--light .brand__mark { filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__link {
  color: var(--ink-2); font-weight: 500; font-size: .96rem;
  padding: 8px 0; position: relative;
}
.nav__link:hover { color: var(--brand); }
.nav__link.is-active { color: var(--brand); }
.nav__link--cta {
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  transition: background var(--t-fast), transform var(--t-fast);
}
.nav__link--cta:hover { background: var(--brand); color: #fff; transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform var(--t-base), opacity var(--t-base); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none; line-height: 1;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(138,21,56,.28); }
.btn--primary:hover { background: var(--brand-ink); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(138,21,56,.36); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2a1622; color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 100px;
  background:
    radial-gradient(1200px 500px at 85% -20%, rgba(224,107,90,.18), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(138,21,56,.14), transparent 60%),
    var(--bg);
}
.hero__grid {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center;
}
.hero__cover {
  position: relative;
  aspect-ratio: 3 / 4; border-radius: var(--r-lg);
  background: #000;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.hero__cover:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 0 28px 48px rgba(26,10,18,.18), 0 10px 20px rgba(26,10,18,.08); }
.hero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(138,21,56,.10); color: var(--brand);
  font-size: .85rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 { margin-bottom: 20px; }
.hero__lead { font-size: 1.15rem; color: var(--ink-2); max-width: 540px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 24px 36px; color: var(--muted); font-size: .92rem; }
.hero__meta span strong { display: block; color: var(--ink); font-family: 'Fraunces', serif; font-size: 1.3rem; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .eyebrow {
  display: inline-block; color: var(--brand); font-weight: 600;
  letter-spacing: .14em; font-size: .82rem; text-transform: uppercase; margin-bottom: 12px;
}

.alt-bg { background: var(--surface); }
.dark-bg { background: var(--ink); color: var(--bg); }
.dark-bg h2, .dark-bg h3 { color: #fff; }
.dark-bg p { color: rgba(255,255,255,.75); }

/* ---------- Value cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 28px;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #fff; display: grid; place-items: center; margin-bottom: 16px;
  font-size: 1.2rem; font-weight: 700;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Tabs (Theory / Practice) ---------- */
.tabs { max-width: 820px; margin: 0 auto; }
.tab-list { display: inline-flex; background: var(--bg-alt); padding: 6px; border-radius: 999px; gap: 4px; }
.tab {
  padding: 10px 22px; border-radius: 999px; background: transparent; border: 0; color: var(--ink-2);
  font-weight: 500; cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.tab.is-active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.tab-panels { margin-top: 32px; }
.tab-panel { display: none; text-align: left; }
.tab-panel.is-active { display: block; }
.tab-panel ol { counter-reset: c; list-style: none; padding: 0; column-count: 2; column-gap: 48px; }
.tab-panel li {
  counter-increment: c; break-inside: avoid; padding: 12px 0 12px 44px; position: relative;
  color: var(--ink-2); border-bottom: 1px dashed var(--line);
}
.tab-panel li::before {
  content: counter(c, decimal-leading-zero);
  position: absolute; left: 0; top: 12px;
  font-family: 'Fraunces', serif; font-weight: 600;
  color: var(--brand); font-size: 1.05rem;
}

/* ---------- Theory to Practice split ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split__visual {
  aspect-ratio: 4 / 5; border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(26,10,18,0), rgba(26,10,18,.7)),
    linear-gradient(135deg, #2a0b19, #8a1538);
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
  display: grid; place-items: end center; color: #fff; padding: 32px;
  font-family: 'Fraunces', serif; font-size: 1.3rem;
}
.split__visual img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.split__visual span { position: relative; z-index: 1; }
.feature-list { list-style: none; padding: 0; margin: 24px 0 0; }
.feature-list li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; align-items: start; gap: 12px; color: var(--ink-2); }
.feature-list li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 10px; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card--featured {
  background: var(--ink); color: #fff;
  border-color: transparent; box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}
.price-card--featured h3 { color: #fff; }
.price-card--featured p { color: rgba(255,255,255,.72); }
.price-card__tag {
  position: absolute; top: 16px; right: 16px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.price-card__name { font-family: 'Fraunces', serif; font-size: 1.4rem; margin: 0 0 8px; }
.price-card__price { font-family: 'Fraunces', serif; font-size: 2.4rem; font-weight: 700; margin: 16px 0 4px; }
.price-card__was { color: var(--muted); text-decoration: line-through; margin-bottom: 16px; font-size: .95rem; }
.price-card--featured .price-card__was { color: rgba(255,255,255,.5); }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 24px; flex: 1; }
.price-card ul li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.price-card--featured ul li { border-top-color: rgba(255,255,255,.12); }
.price-card .btn { width: 100%; }

/* ---------- Mobile app showcase ---------- */
.app-showcase {
  background: linear-gradient(160deg, #0f0508 0%, #2a0b19 100%);
  border-radius: var(--r-xl); color: #fff;
  padding: 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  position: relative; overflow: hidden;
}
.app-showcase::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,107,90,.35), transparent 60%);
}
.app-showcase__text { position: relative; z-index: 1; }
.app-showcase__text h2 { color: #fff; }
.app-showcase__text p { color: rgba(255,255,255,.8); max-width: 440px; }
.app-showcase__badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.app-showcase__badges a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 12px;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.app-showcase__badges a:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; }
.app-showcase__mock {
  position: relative; z-index: 1;
  display: grid; place-items: center;
}
.app-showcase__mock img { width: 100%; height: auto; max-height: 720px; object-fit: contain; display: block; }

/* ---------- Phones grid ---------- */
.phones {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: end;
}
.phone {
  transition: transform var(--t-base);
}
.phone:hover { transform: translateY(-6px); }
.phone__screen {
  display: grid; place-items: center; color: rgba(255,255,255,.4);
  font-size: .85rem; text-align: center;
}
.phone__screen img { width: 100%; height: auto; display: block; }

/* ---------- Author ---------- */
.author { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; }
.author__photo {
  aspect-ratio: 4 / 5; border-radius: var(--r-lg);
  background: var(--bg-alt); overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid; place-items: center; color: var(--muted); font-size: .9rem;
}
.author__photo img { width: 100%; height: 100%; object-fit: cover; }
.author-slider { position: relative; width: 100%; height: 100%; }
.author-slider img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s ease;
}
.author-slider img.is-active { opacity: 1; }
.author__quote {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 1.3rem; line-height: 1.5; color: var(--ink);
  border-left: 3px solid var(--brand); padding: 8px 0 8px 20px;
  margin: 24px 0;
}

/* ---------- Contact form ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-info ul { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-info li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: center; }
.contact-info li strong { display: block; color: var(--ink); font-family: 'Fraunces', serif; }
.contact-info li span { color: var(--muted); font-size: .9rem; display: block; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.field { display: block; margin-bottom: 18px; }
.field label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--bg);
  font: inherit; color: var(--ink);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field textarea:focus {
  outline: 0; background: #fff;
  border-color: var(--brand); box-shadow: 0 0 0 4px rgba(138,21,56,.12);
}
.field textarea { min-height: 140px; resize: vertical; }
.field--honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__consent { font-size: .82rem; color: var(--muted); margin: 14px 0 20px; }
.form__consent a { color: var(--brand); }
.field--check { margin-bottom: 14px; }
.field--check .check {
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  align-items: start; cursor: pointer; font-weight: 400;
  font-size: .82rem; line-height: 1.45; color: var(--muted);
  margin-bottom: 0;
}
.field--check input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px;
  accent-color: var(--brand); cursor: pointer; flex: none;
}
.field--check .check a { color: var(--brand); text-decoration: underline; }
.field--check .req { color: #c0392b; font-weight: 600; }
.form__msg { display: none; padding: 14px 16px; border-radius: var(--r-sm); margin-bottom: 16px; font-size: .95rem; }
.form__msg--ok { display: block; background: rgba(46,160,67,.12); color: #1a6b2c; border: 1px solid rgba(46,160,67,.24); }
.form__msg--err { display: block; background: rgba(224,107,90,.12); color: #8a1538; border: 1px solid rgba(224,107,90,.24); }

/* ---------- Footer ---------- */
.site-footer { background: #120509; color: rgba(255,255,255,.7); padding: 72px 0 24px; margin-top: 0; }
.site-footer h4 { color: #fff; font-family: 'Inter', sans-serif; font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 18px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 6px 0; font-size: .94rem; }
.footer-col a { color: rgba(255,255,255,.7); }
.footer-col a:hover { color: #fff; }
.footer-col .muted { color: rgba(255,255,255,.45); font-size: .85rem; line-height: 1.5; }
.footer-tag { color: rgba(255,255,255,.55); font-size: .9rem; max-width: 300px; margin-top: 16px; }
.footer-bottom { padding-top: 24px; font-size: .82rem; color: rgba(255,255,255,.45); }

/* ---------- Legal pages ---------- */
.legal { padding: 72px 0; max-width: 820px; margin: 0 auto; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: .9rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.4rem; margin: 40px 0 16px; }
.legal h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.legal p, .legal li { color: var(--ink-2); font-size: 1rem; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; margin: 24px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  section { padding: 72px 0; }
  .hero { padding: 64px 0 72px; }
  .hero__grid, .split, .author, .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero__cover { max-width: 320px; margin: 0 auto; }
  .cards, .pricing { grid-template-columns: 1fr; }
  .phones { grid-template-columns: repeat(2, 1fr); }
  .app-showcase { grid-template-columns: 1fr; padding: 40px; }
  .tab-panel ol { column-count: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-col--brand, .footer-col--contact { grid-column: span 2; }

  .nav { position: fixed; top: 72px; left: 0; right: 0; background: var(--bg); padding: 24px; flex-direction: column; align-items: stretch; gap: 16px; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform var(--t-base); }
  .nav.is-open { transform: translateY(0); }
  .nav__link { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__link--cta { border-bottom: 0; text-align: center; }
  .nav-toggle { display: block; }
}

@media (max-width: 520px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .price-card--featured { transform: none; }
  .phones { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
