:root {
  --primary: #166534;
  --secondary: #38BDF8;
  --background: #FAFAF9;
  --surface: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --accent: #92400E;
  --border: #E2E8F0;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Gill Sans", "Trebuchet MS", "Verdana", sans-serif;
  color: var(--text-primary);
  background: var(--background);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0));
  z-index: -1;
}

body::before {
  top: -120px;
  right: -120px;
}

body::after {
  bottom: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(22, 101, 52, 0.16), rgba(22, 101, 52, 0));
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  color: var(--text-secondary);
  margin: 0;
}

p + p {
  margin-top: 12px;
}
h1,
h2,
h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Georgia", serif;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

ul {
  margin: 0;
  padding: 0;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section.muted {
  background: rgba(56, 189, 248, 0.08);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 250, 249, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  position: relative;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
  align-items: center;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 4px;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: var(--primary);
}

.site-nav a.is-active::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.menu-toggle {
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 3vw, 3.4rem);
  margin-bottom: 16px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
}

.section-heading {
  max-width: 640px;
  margin-bottom: 36px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.card h3 {
  margin-top: 16px;
}

.text-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.text-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border);
}

.cta {
  background: linear-gradient(120deg, rgba(22, 101, 52, 0.12), rgba(56, 189, 248, 0.12));
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.split {
  display: flex;
  gap: 48px;
  align-items: center;
}

.split.reverse {
  flex-direction: row-reverse;
}

.split-content {
  flex: 1;
}

.split .media {
  flex: 1;
}

.habit-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.habit-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
}

.habit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #E5E7EB;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-bar {
  margin-top: 20px;
}

.search-bar input {
  width: min(420px, 100%);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-btn.is-active,
.filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tip-toggle {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.tip-more {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.tip-card.is-open .tip-more {
  margin-top: 12px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.error-text {
  font-size: 0.85rem;
  color: #b91c1c;
  min-height: 1.1em;
}

.field-error {
  border-color: #b91c1c;
}

.form-message {
  margin-top: 12px;
  font-weight: 600;
  color: #b91c1c;
}

.form-message.success {
  color: var(--primary);
}

.contact-aside {
  background: rgba(22, 101, 52, 0.08);
  border-radius: 20px;
  padding: 24px;
}

.site-footer {
  padding: 40px 0 50px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .split,
  .split.reverse {
    flex-direction: column;
  }

  .form-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-inner {
    padding: 12px 0;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 16px;
    background: var(--surface);
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    border-bottom: 1px solid var(--border);
  }

  body.menu-open .site-nav {
    max-height: 60vh;
    padding: 20px 24px 24px;
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav a {
    width: 100%;
  }
}

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

  .reveal {
    transition: none;
  }
}
