:root {
  color-scheme: light;
  --bg: #f4f8f5;
  --ink: #13251b;
  --muted: #607167;
  --primary: #1f7a4d;
  --primary-dark: #145f39;
  --panel: #ffffff;
  --soft: #eaf4ee;
  --line: #dbe7df;
  --amber: #d58916;
  --blue: #276c9e;
  --shadow: 0 24px 70px rgba(19, 37, 27, 0.13);
  --grid-line: rgba(219, 231, 223, 0.22);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1712;
  --ink: #eef7f1;
  --muted: #a8b8ae;
  --primary: #55c985;
  --primary-dark: #7ce5a3;
  --panel: #13231a;
  --soft: #1b3125;
  --line: #294234;
  --amber: #f0b244;
  --blue: #72b7e5;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --grid-line: rgba(41, 66, 52, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid-line) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  margin: 0 auto;
  align-items: center;
  gap: 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-height: 62px;
  padding: 0 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 10px 28px rgba(19, 37, 27, 0.06);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

html[data-theme="dark"] .site-header {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.site-header > .brand,
.site-header > nav,
.site-header > .header-actions {
  align-self: center;
}

.site-header > .brand {
  justify-self: start;
}

.site-header > nav {
  justify-self: center;
}

.site-header > .header-actions {
  justify-self: end;
}

.site-footer {
  width: min(1160px, calc(100% - 32px));
  display: flex;
  justify-content: space-between;
}

.site-header nav,
.site-footer nav,
.hero-actions,
.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.site-header nav {
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
}

.site-header nav a,
.site-footer nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.theme-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 68px;
  height: 36px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--soft) 72%, var(--panel));
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 32%, transparent);
  outline-offset: 3px;
}

.toggle-icon,
.toggle-thumb {
  grid-row: 1;
}

.toggle-icon {
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
}

.toggle-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.toggle-sun {
  grid-column: 1;
}

.toggle-moon {
  grid-column: 2;
}

.toggle-thumb {
  grid-column: 1;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 6px 14px rgba(19, 37, 27, 0.16);
  transform: translateX(0);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.theme-toggle[aria-pressed="false"] .toggle-sun,
.theme-toggle[aria-pressed="true"] .toggle-moon {
  color: var(--primary-dark);
}

.theme-toggle[aria-pressed="true"] .toggle-thumb {
  transform: translateX(30px);
}

.landing-hero {
  width: min(1160px, calc(100% - 32px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(330px, 0.98fr);
  align-items: center;
  gap: clamp(32px, 7vw, 88px);
  padding: 28px 0 72px;
  position: relative;
}

.landing-hero::before {
  content: "";
  position: absolute;
  left: calc((100vw - min(1160px, calc(100vw - 32px))) / -2);
  right: calc((100vw - min(1160px, calc(100vw - 32px))) / -2);
  top: 0;
  height: 560px;
  background: var(--panel);
  z-index: -2;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.55rem, 6vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

p,
li {
  color: var(--muted);
}

.lede {
  max-width: 620px;
  margin-bottom: 30px;
  font-size: clamp(1.05rem, 2vw, 1.26rem);
}

.hero-actions {
  margin-bottom: 24px;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 40px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0;
  text-decoration: none;
  transition: transform 160ms ease;
}

.store-badge:hover {
  transform: translateY(-1px);
}

.store-badge img {
  display: block;
  height: 40px;
  max-width: 100%;
}

.google-play img {
  width: 136px;
  height: 40px;
}

.app-store img {
  width: 135px;
  height: 40px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric-strip div {
  min-height: 94px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.metric-strip div:last-child {
  border-right: 0;
}

.metric-strip strong,
.metric-strip span {
  display: block;
}

.metric-strip strong {
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1.1;
}

.metric-strip span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.primary-action,
.secondary-action,
.links a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border-radius: 7px;
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
}

.primary-action {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(31, 122, 77, 0.24);
}

.secondary-action,
.links a {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.hero-visual {
  min-height: 620px;
  display: grid;
  place-items: center;
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 24px 0;
  background:
    linear-gradient(rgba(19, 37, 27, 0.72), rgba(19, 37, 27, 0.5)),
    url("/assets/homepulse_app_icon.png");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  transform: rotate(-3deg);
  opacity: 0.18;
}

.hero-visual::after {
  content: "";
  position: absolute;
  width: 78%;
  height: 72%;
  border: 1px solid rgba(31, 122, 77, 0.22);
  border-radius: 8px;
  transform: rotate(5deg);
  z-index: -1;
}

.visual-note {
  position: absolute;
  z-index: 2;
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 18px 44px rgba(19, 37, 27, 0.12);
  padding: 14px 16px;
}

.visual-note strong,
.visual-note span {
  display: block;
}

.visual-note strong {
  color: var(--ink);
}

.visual-note span {
  color: var(--muted);
  font-size: 0.88rem;
}

.top-note {
  top: 58px;
  left: 22px;
}

.bottom-note {
  right: 12px;
  bottom: 84px;
}

.phone-shell {
  position: relative;
  width: min(370px, 100%);
  border: 10px solid #101c16;
  border-radius: 38px;
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.phone-bar {
  width: 88px;
  height: 5px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: #23372b;
}

.app-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.app-top p,
.app-top strong {
  display: block;
  margin: 0;
}

.app-top strong {
  font-size: 1.36rem;
}

.status-pill {
  border-radius: 999px;
  background: color-mix(in srgb, var(--amber) 18%, var(--panel));
  color: var(--ink);
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-grid div {
  min-height: 96px;
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.summary-grid span,
.preview-card p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
}

.preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.preview-card.urgent {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: color-mix(in srgb, var(--amber) 12%, var(--panel));
}

.preview-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

.proof-band,
.section,
.site-footer,
.document {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.proof-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.proof-band div {
  min-height: 126px;
  background: var(--panel);
  padding: 22px;
}

.proof-band strong,
.proof-band span {
  display: block;
}

.proof-band strong {
  margin-bottom: 8px;
}

.proof-band span {
  color: var(--muted);
}

.section {
  padding: 88px 0 0;
}

.section-heading {
  margin-bottom: 30px;
}

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

.feature-grid article,
.plans article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.feature-grid article span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 900;
}

.plans-section {
  padding-bottom: 88px;
}

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

.plans article {
  min-height: 230px;
}

.plans article strong {
  display: block;
  margin: 26px 0 8px;
  color: var(--ink);
  font-size: 1.75rem;
}

.plans article span {
  color: var(--muted);
}

.featured-plan {
  border-color: rgba(31, 122, 77, 0.4) !important;
  box-shadow: 0 18px 50px rgba(31, 122, 77, 0.12);
}

.site-footer {
  min-height: 88px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer span {
  color: var(--ink);
  font-weight: 900;
}

.document {
  max-width: 880px;
  margin-top: 28px;
  margin-bottom: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: clamp(24px, 5vw, 48px);
}

.document h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.document h2 {
  margin: 32px 0 8px;
  font-size: 1.2rem;
}

.updated {
  margin-top: -6px;
  font-size: 0.94rem;
}

.notice {
  margin: 24px 0;
  border-left: 4px solid var(--primary);
  background: var(--soft);
  padding: 14px 16px;
  color: var(--ink);
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    min-height: auto;
    padding: 10px 16px;
  }

  .site-header nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
    padding-top: 10px;
  }

  .landing-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .landing-hero::before {
    height: 500px;
  }

  .hero-visual {
    min-height: auto;
  }

  .visual-note {
    display: none;
  }

  .proof-band,
  .feature-grid,
  .plans {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header nav {
    gap: 12px;
  }

  .landing-hero,
  .section {
    width: min(100% - 24px, 1160px);
  }

  .phone-shell {
    border-width: 7px;
    border-radius: 28px;
    padding: 14px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-strip div:last-child {
    border-bottom: 0;
  }
}
