@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
  --ink: #182822;
  --forest: #183b32;
  --deep: #10231f;
  --moss: #66816c;
  --lime: #d1dd9d;
  --cream: #f4f2e9;
  --paper: #fbfaf6;
  --muted: #838b80;
  --line: #e5e5dc;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
}

button, textarea { font: inherit; }
button { cursor: pointer; }

h1, h2, h3, p { margin-top: 0; }

/* ---------- Ambient background ---------- */
.ambient {
  position: fixed;
  z-index: -1;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.15;
  pointer-events: none;
}
.ambient-one { top: -180px; right: 10%; background: #c1ce91; }
.ambient-two { bottom: -220px; left: 25%; background: #9fb5a2; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 238px;
  padding: 30px 22px;
  background: #f0efe7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.8px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px 10px 10px 3px;
  background: var(--forest);
  color: #f9f8f1;
  font-family: var(--serif);
  font-size: 23px;
}

.brand-dot { color: #a9b975; }

.brand-copyright {
  align-self: flex-start;
  margin-left: 2px;
  font-size: 0.65em;
}

.nav-label,
.eyebrow,
.breadcrumb,
.sidebar-footer {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.nav-label { margin: 58px 0 13px 10px; color: #9b9e91; }

.navigation { display: grid; gap: 6px; }

.nav-link {
  padding: 12px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #70796f;
  font-size: 12px;
  text-align: left;
  transition: 0.2s ease;
}

.nav-link span { margin-right: 11px; font-size: 16px; }

.nav-link:hover,
.nav-link.active { background: #e4e7d9; color: var(--forest); }
.nav-link.active { font-weight: 700; }
.nav-link:hover,
.nav-link.active { background: #e4e7d9; color: var(--forest); }
.nav-link.active { font-weight: 700; }

a.nav-link {
  display: block;
  text-decoration: none;
  color: #70796f;
  font-size: 12px;
}
a.nav-link:hover { color: var(--forest); }
.sidebar-art {
  flex: 1;
  min-height: 160px;
  margin: 20px 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #78856e;
  opacity: 0.7;
}

.sidebar-art svg {
  width: 100%;
  height: 100%;
  max-width: 90px;
  max-height: 120px;
}

.sidebar-note {
  padding: 19px 17px;
  border-radius: 11px;
  background: #e5e9d8;
}

.note-icon { color: #718456; font-size: 18px; }

.sidebar-note p {
  margin: 10px 0 6px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
}

.note-caption { color: #7d8478; font-size: 10px; }

.sidebar-footer { margin: 22px 4px 0; color: #a2a397; font-size: 8px; }

/* ---------- Main + topbar ---------- */
.main-content {
  max-width: 1600px;
  margin-left: 238px;
  padding: 0 6.5%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 73px;
  border-bottom: 1px solid var(--line);
}

.breadcrumb { color: #989c91; font-size: 8px; }
.breadcrumb span { margin: 0 9px; color: #c5c7bc; }
.breadcrumb b { color: #59655b; }

.topbar-right { display: flex; align-items: center; gap: 15px; }
.today-label { color: #8c9187; font-size: 10px; }

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e1e8d5;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 14px;
}

/* ---------- Pages ---------- */
.page {
  display: none;
  padding: 30px 0 10px;
  animation: fade-up 0.45s ease both;
}
.page.active { display: block; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 330px;
  overflow: hidden;
  padding: 42px 7%;
  border-radius: 13px;
  background: var(--deep);
  color: #f7f5ed;
}

.hero-copy { position: relative; z-index: 2; max-width: 480px; }

.eyebrow { margin: 0 0 14px; color: #98a886; }

.eyebrow-line {
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 8px;
  background: #b4c393;
  vertical-align: middle;
}

.hero h1,
.page-intro h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 51px);
  font-weight: 500;
  line-height: 1.13;
  letter-spacing: -1.8px;
}

.hero h1 em,
.page-intro h1 em {
  color: var(--lime);
  font-family: var(--serif);
  font-weight: 500;
}

.hero-description {
  max-width: 390px;
  margin: 17px 0 21px;
  color: #bdc5b9;
  font-size: 12px;
  line-height: 1.7;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  min-height: 39px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s;
}
.button:hover { transform: translateY(-2px); }
.button span { font-size: 15px; }

.button-light { background: var(--lime); color: var(--deep); }
.button-light:hover { background: #dfe9b5; }

.button-outline {
  background: transparent;
  color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--lime);
}
.button-outline:hover { background: rgba(209, 221, 157, 0.12); }

.button-dark { background: var(--forest); color: white; }
.button-dark:hover { background: #285548; }

.hero-art {
  position: absolute;
  inset: 0 0 0 52%;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, #1c3d32, #253e34 68%, #172e28);
}

.hill { position: absolute; width: 130%; height: 175px; border-radius: 50% 50% 0 0; }
.hill-back  { bottom: -80px;  left: -7%; transform: rotate(-9deg); background: #526e54; }
.hill-front { bottom: -118px; left: 10%; transform: rotate(8deg);  background: #304d3e; }

.art-caption {
  position: absolute;
  right: 24px;
  bottom: 25px;
  color: #c5d0aa;
  font-size: 8px;
  letter-spacing: 2px;
}

.art-spark { position: absolute; color: #e3e8c5; }
.spark-one { top: 43px;  left: 25%;  font-size: 16px; }
.spark-two { top: 112px; right: 14%; font-size: 10px; }

.hero-index {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 2;
  color: #87988a;
  font-size: 9px;
  letter-spacing: 1px;
}
.hero-index span { color: #50675a; }

/* ---------- Section headings ---------- */
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 40px 0 17px;
}
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-size: 23px; letter-spacing: -0.7px; }

.section-note {
  margin: 0 0 17px;
  color: #7d857a;
  font-size: 11px;
  line-height: 1.6;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: none;
  color: #4b6754;
  font-size: 10px;
  font-weight: 700;
}
.text-button span { margin-left: 7px; font-size: 15px; }

/* ---------- Cards (pillars + care plan share this) ---------- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.care-grid { grid-template-columns: repeat(2, 1fr); }

.pillar-card {
  position: relative;
  min-height: 146px;
  padding: 18px;
  border: 1px solid #e9e9e0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.75);
  animation: fade-up 0.5s both;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: #cbd4bd;
  box-shadow: 0 12px 30px #233d3310;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #edf0e4;
  color: #547052;
  font-size: 16px;
}

.card-number { color: #a7aa9e; font-size: 9px; letter-spacing: 1px; }

.card-label {
  margin: 0 0 6px;
  color: #71865a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.pillar-card h3 { margin: 0 0 6px; font-size: 13px; }

.pillar-card p:not(.card-label) {
  margin: 0;
  color: #83887e;
  font-size: 10px;
  line-height: 1.55;
}

.card-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

.pillar-grid-wide { margin-bottom: 30px; }
.pillar-grid-wide .pillar-card { min-height: 158px; }

/* ---------- Bottom card ---------- */
.bottom-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 5px;
  padding: 18px 21px;
  border-radius: 9px;
  background: #eef0e5;
}

.bottom-icon {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  height: 36px;
  border-radius: 50%;
  background: #dce4ce;
  color: #718356;
  font-size: 19px;
}

.bottom-card .eyebrow { margin-bottom: 5px; }
.bottom-card h3 { margin: 0 0 5px; font-size: 13px; }

.bottom-card p:not(.eyebrow) {
  margin: 0;
  color: #7d8477;
  font-size: 10px;
  line-height: 1.6;
}

.bottom-card .section-note { margin-top: 6px; }

.bottom-card .button { flex: 0 0 auto; margin-left: auto; }

/* ---------- Page intro ---------- */
.page-intro { padding: 25px 0; }
.page-intro h1 { color: var(--ink); font-size: 40px; }
.page-intro h1 em { color: #71865a; }

.page-intro-text {
  max-width: 530px;
  margin: 13px 0 8px;
  color: #7d857a;
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- Footer + references ---------- */
.references {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid #d8dfd8;
}

.references h2 {
  margin-bottom: 0.75rem;
  color: var(--deep);
  font-size: 1.2rem;
  text-align: center;
}

.references p {
  max-width: 700px;
  margin: 0 0 0.75rem;
  color: #53615b;
  font-size: 12px;
  line-height: 1.7;
}

.main-footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  color: #a1a499;
  font-size: 9px;
}
.main-footer > span:first-child {
  color: #667565;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #101d19a8;
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  width: min(590px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px;
  border-radius: 12px;
  background: var(--paper);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 13px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eceee5;
  color: #465448;
  font-size: 22px;
}

.modal h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 31px; }

.modal-goal { color: #647365; font-size: 12px; line-height: 1.65; }

.modal-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 24px;
}
.modal-columns h3 { margin-bottom: 9px; font-size: 11px; }

.modal-columns p,
.modal-columns li,
.modal-list li {
  color: #778075;
  font-size: 11px;
  line-height: 1.7;
}

.modal-columns ul,
.modal-list { margin: 0; padding-left: 17px; }
.modal-list li { margin-bottom: 10px; }

.modal-accountability {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 22px;
  padding: 14px;
  border-radius: 7px;
  background: #edf0e5;
}
.modal-accountability span { color: #71865a; }
.modal-accountability p {
  margin: 0;
  color: #626f61;
  font-size: 10px;
  line-height: 1.6;
}

/* ---------- Password gate ---------- */
body.locked > :not(#passwordGate) { visibility: hidden; }

.password-gate {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--deep);
  color: var(--ink);
}
.password-gate[hidden] { display: none; }

.password-card {
  display: grid;
  gap: 14px;
  width: min(100%, 400px);
  padding: 30px;
  border-radius: 16px;
  background: white;
}

.password-card input,
.password-card button { padding: 12px; font: inherit; }

#passwordError { min-height: 18px; margin: 0; color: #a21b1b; }

/* ---------- Focus styles ---------- */
.nav-link:focus-visible,
.button:focus-visible,
.text-button:focus-visible,
.modal-close:focus-visible,
.password-card button:focus-visible,
.password-card input:focus-visible,
.card-open:focus-visible {
  outline: 2px solid #748b59;
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sidebar { width: 195px; padding-inline: 16px; }
  .main-content { margin-left: 195px; padding-inline: 4%; }
  .hero { padding-left: 5%; }
  .hero-art { left: 55%; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 16px; }
  .brand { margin-bottom: 12px; }
  .nav-label, .sidebar-note, .sidebar-footer, .sidebar-art { display: none; }
  .navigation { display: flex; gap: 4px; overflow-x: auto; }
  .nav-link { padding: 9px 10px; font-size: 10px; white-space: nowrap; }
  .nav-link span { margin-right: 5px; }

  .main-content { margin: 0; padding: 0 16px; }
  .topbar { height: 52px; }
  .today-label { display: none; }
  .page { padding-top: 16px; }

  .hero { align-items: flex-start; min-height: 390px; padding: 32px 22px; }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: 37px; }
  .hero-description { max-width: 290px; }
  .hero-art { inset: 53% 0 0; opacity: 0.85; }

  .section-heading { margin-top: 29px; }
  .section-heading h2 { font-size: 20px; }

  .pillar-grid,
  .care-grid { grid-template-columns: 1fr; gap: 9px; }
  .pillar-card { min-height: 130px; }

  .bottom-card { flex-wrap: wrap; }
  .bottom-card .button { margin-left: 52px; }

  .page-intro h1 { font-size: 35px; }

  .modal { padding: 27px 21px; }
  .modal-columns { grid-template-columns: 1fr; gap: 15px; }
}
.hero-art {
  transition: background 1.5s ease;
}

.hero-art.is-night {
  background: linear-gradient(145deg, #0b1a2b, #14283d 68%, #0a1622);
}

.sun,
.moon {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  border-radius: 50%;
  transition: opacity 1.5s ease;
  will-change: transform;
}

.sun {
  width: 90px;
  height: 90px;
  background: #d0d99b;
  box-shadow: 0 0 65px #cad89066;
}

.moon {
  width: 70px;
  height: 70px;
  background: #f4edce;
  box-shadow: 0 0 28px #f4edce66;
  opacity: 0;
  -webkit-mask: radial-gradient(circle at 70% 30%, transparent 0 46%, #000 48%);
  mask: radial-gradient(circle at 70% 30%, transparent 0 46%, #000 48%);
}

.hero-art.is-night .sun  { opacity: 0; }
.hero-art.is-night .moon { opacity: 1; }

.stars {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, #fff, transparent),
    radial-gradient(1px 1px at 30% 55%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 48% 15%, #fff, transparent),
    radial-gradient(1px 1px at 65% 40%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 80% 22%, #fff, transparent),
    radial-gradient(1px 1px at 90% 60%, #fff, transparent),
    radial-gradient(1px 1px at 20% 75%, #fff, transparent);
}
.hero-art.is-night .stars { opacity: 0.9; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}