:root {
  /* Brand colors */
  --midnight: #1f2e45; /* anchor */
  --stone: #f2ede6; /* foundation */
  --sage: #7c8c7a; /* system */
  /*--amber: #c46a4a; /* accent */
  --teal: #2f6f73; /*accent */

  /* Supporting tones */
  --text: #122036;
  --muted: rgba(18, 32, 54, 0.72);
  --line: rgba(31, 46, 69, 0.18);

  --radius: 18px;
  --shadow: 0 18px 40px rgba(31, 46, 69, 0.14);
  --max: 1120px;
  --pad: clamp(18px, 3vw, 28px);
  --tap: 44px;

  --fs-1: clamp(34px, 4.2vw, 52px);
  --fs-2: clamp(22px, 2.4vw, 30px);
}

:root {
  /* ...your existing vars... */

  /* Vertical rhythm */
  --section-pt: clamp(26px, 3.2vw, 44px);
  --section-pb: clamp(34px, 4vw, 56px);
  --block-gap: 12px;
}

:root {
  --section-pad: clamp(34px, 5vw, 64px);

  /* section panel backgrounds (subtle, but consistent) */
  --section-bg: rgba(242, 237, 230, 0);
  --section-alt-bg: rgba(31, 46, 69, 0.035);

  /* divider line (soft) */
  --section-divider: rgba(31, 46, 69, 0.08);

  /* make cards less see-through so gradients don’t “swim” behind them */
  --card-bg: rgba(242, 237, 230, 0.88);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(
      900px 600px at 12% 0%,
      rgba(124, 140, 122, 0.2),
      transparent 60%
    ),
    radial-gradient(
      800px 520px at 88% 5%,
      rgba(196, 106, 74, 0.16),
      transparent 62%
    ),
    var(--stone);
}

/* Make anchor jumps land below the sticky header */
section[id] {
  scroll-margin-top: 92px;
}

/* Links + focus */
a {
  color: var(--midnight);
}
a:hover {
  color: #152339;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(196, 106, 74, 0.45);
  outline-offset: 2px;
  border-radius: 12px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--stone);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 9999;
}
.skip-link:focus {
  left: 12px;
}

.container {
  width: min(var(--max), calc(100% - 2 * var(--pad)));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(242, 237, 230, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 90px;
  height: 90px;
  border-radius: 14px;
  border: 1px solid rgba(31, 46, 69, 0.22);
  background: rgba(242, 237, 230, 0.7);
  object-fit: contain;
  padding: 6px;
}

.brand-name {
  font-weight: 820;
  letter-spacing: 0.2px;
  color: var(--midnight);
}

.brand-tag {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: none;
  gap: 14px;
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: rgba(31, 46, 69, 0.78);
  font-size: 14px;
  padding: 10px 10px;
  border-radius: 12px;
}
.nav a:hover {
  background: rgba(31, 46, 69, 0.06);
  color: var(--midnight);
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

/* Typography */
h1 {
  font-size: var(--fs-1);
  line-height: 1.06;
  margin: 0 0 12px;
  letter-spacing: -0.6px;
  color: var(--midnight);
}
h2 {
  font-size: var(--fs-2);
  margin: 0 0 12px;
  letter-spacing: -0.3px;
  color: var(--midnight);
}
h3 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.2px;
  color: var(--midnight);
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(31, 46, 69, 0.72);
  font-weight: 650;
}

.muted {
  color: var(--muted);
}

.lead {
  font-size: 18px;
  margin: 0 0 12px;
}

/* Consistent content spacing inside sections */
.section h2 {
  margin: 0 0 12px;
}
.section h3 {
  margin: 0 0 10px;
}
.section p {
  margin: 0 0 var(--block-gap);
}
.section p:last-child {
  margin-bottom: 0;
}

.bullets {
  margin: 8px 0 14px 18px; /* tighter, consistent */
  padding: 0;
}
.bullets li {
  margin: 6px 0;
}

/* These boxes often create the “bleed” feeling */
.notice {
  margin-top: 14px;
  margin-bottom: 0; /* important */
  padding: 14px;
}

.callout-inline {
  margin: 12px 0 0;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(196, 106, 74, 0.45);
  background: linear-gradient(
    135deg,
    rgba(196, 106, 74, 1),
    rgba(196, 106, 74, 0.88)
  );
  color: var(--stone);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  filter: brightness(1.03);
}
.btn:active {
  transform: translateY(1px);
}

.btn-small {
  padding: 10px 12px;
  min-height: 40px;
}

.btn-ghost {
  background: rgba(31, 46, 69, 0.05);
  border: 1px solid rgba(31, 46, 69, 0.18);
  color: var(--midnight);
}
.btn-ghost:hover {
  background: rgba(31, 46, 69, 0.08);
}

.btn-full {
  width: 100%;
}

/* Hero */
/* Replace both .hero blocks with this single one */
.hero {
  padding-top: 6px;
  padding-bottom: clamp(30px, 6vw, 70px);
}

.hero-grid {
  display: grid;
  gap: 8px;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: start;
  }
}

.hero-lead {
  font-size: 18px;
  color: rgba(31, 46, 69, 0.72);
  margin: 0 0 16px;
}

.callout {
  border: 1px solid rgba(124, 140, 122, 0.45);
  background: rgba(124, 140, 122, 0.12);
  border-radius: 16px;
  padding: 14px;
  margin: 14px 0 16px;
}
.callout-title {
  font-size: 16px;
  margin: 0 0 6px;
}
.callout-text {
  margin: 0 0 8px;
}
.callout-text:last-child {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 14px;
}

.microproof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.microproof li {
  font-size: 13px;
  color: rgba(31, 46, 69, 0.7);
  border: 1px solid rgba(31, 46, 69, 0.14);
  background: rgba(242, 237, 230, 0.55);
  padding: 8px 10px;
  border-radius: 999px;
}

/* Hero media */
.hero-media {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 260px;
}
.hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}
.hero-media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(31, 46, 69, 0.24), rgba(31, 46, 69, 0)),
    linear-gradient(180deg, rgba(242, 237, 230, 0), rgba(242, 237, 230, 0.18));
  pointer-events: none;
}
.hero-media-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  margin: 0;
  font-size: 12.5px;
  color: rgba(242, 237, 230, 0.95);
  background: rgba(31, 46, 69, 0.55);
  border: 1px solid rgba(242, 237, 230, 0.2);
  padding: 8px 10px;
  border-radius: 999px;
}

/* Create a clear boundary under the hero */
.hero {
  padding-bottom: clamp(34px, 6vw, 70px);
  margin-bottom: 10px;
}

/* HERO SPACING OPTIMIZATION */
.hero {
  padding: clamp(18px, 3vw, 34px) 0 clamp(26px, 4vw, 44px);
}

.hero-grid {
  display: grid;
  gap: clamp(14px, 2.4vw, 22px); /* tighter grid gap */
  align-items: start;
}

.hero-copy {
  max-width: 58ch; /* keeps text from feeling stretched */
}

/* tighten headline rhythm */
.hero .eyebrow {
  margin: 0 0 10px;
}

.hero h1 {
  margin: 0 0 10px;
  letter-spacing: -0.6px;
}

.hero-lead {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.45;
}

/* Callout: reduce extra air */
.callout {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
}

.callout-title {
  margin: 0 0 6px;
}

.callout-text {
  margin: 0 0 8px;
}
.callout-text:last-child {
  margin-bottom: 0;
}

/* Buttons closer to callout */
.hero-actions {
  margin: 12px 0 12px;
  gap: 10px;
}

/* Microproof closer and lighter */
.microproof {
  margin-top: 8px;
  gap: 8px;
}
.microproof li {
  padding: 7px 10px;
}

/* Form */
/* Apply card sizing and behavior */
.form-card {
  padding: 18px;
  align-self: start; /* prevents weird stretching */
  max-width: 520px; /* keeps it from getting too wide */
}

@media (min-width: 980px) {
  .form-card {
    position: sticky;
    top: 96px; /* under header */
    max-height: calc(100vh - 120px);
    overflow: auto; /* scroll inside if content is long */
  }
}

/* tighter form rhythm */
.form-card {
  padding: 16px;
} /* was 18px */

.field {
  margin: 8px 0;
} /* was 12px 0 */
.field:first-child {
  margin-top: 6px;
}

label {
  font-size: 14px;
  color: rgba(31, 46, 69, 0.72);
}
input {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 46, 69, 0.18);
  background: rgba(242, 237, 230, 0.7);
  color: var(--midnight);
}
input::placeholder {
  color: rgba(31, 46, 69, 0.45);
}

.error {
  min-height: 18px;
  font-size: 13px;
  color: #9a2f2f;
}

.fineprint {
  font-size: 12.5px;
  color: rgba(31, 46, 69, 0.62);
  margin: 10px 0 0;
}

.form-status {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(31, 46, 69, 0.92);
  min-height: 20px;
}

.divider {
  height: 1px;
  background: rgba(31, 46, 69, 0.14);
  margin: 14px 0;
}

/* Section 1: less top, more bottom */
#problem.section {
  padding-top: clamp(18px, 3vw, 34px);
  padding-bottom: clamp(48px, 6vw, 84px);
}

/* Give the last callout more space before the section ends */
#problem .callout-inline {
  margin-bottom: 18px;
}

#structure.section {
  padding-top: clamp(18px, 4vw, 52px);
  padding-bottom: clamp(22px, 3vw, 34px); /* was much larger via .section */
}

/* Keep the notice, kill the extra bottom bulk */
#structure .notice {
  margin-top: 14px; /* was 16px */
  margin-bottom: 0; /* important */
  padding: 12px; /* slightly tighter */
}

/* Sections */
.section {
  position: relative;
  padding: var(--section-pad) 0;
  margin: 0;
  background: transparent; /* important */
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--section-bg);
  z-index: -1;
}

.section.alt::before {
  background: var(--section-alt-bg);
}

/* Sections: consistent spacing everywhere */
.section {
  padding-top: var(--section-pt);
  padding-bottom: var(--section-pb);
}

.section.alt {
  margin-top: 0;
  margin-bottom: 0;
}

/* Replace the old border-top rule with this divider */
.section:not(:first-of-type)::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--section-divider);
}

.bullets {
  margin: 10px 0 16px 18px;
  padding: 0;
}
.bullets li {
  margin: 6px 0;
}

.callout-inline {
  margin: 14px 0 0;
  padding: 12px 12px;
  border-left: 4px solid rgba(196, 106, 74, 0.85);
  background: rgba(196, 106, 74, 0.1);
  border-radius: 12px;
}

.notice {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(124, 140, 122, 0.4);
  background: rgba(124, 140, 122, 0.12);
}

.weeks {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}
@media (min-width: 700px) {
  .weeks {
    grid-template-columns: 1fr 1fr;
  }
}
.week {
  border: 1px solid rgba(31, 46, 69, 0.14);
  background: rgba(242, 237, 230, 0.62);
  border-radius: 14px;
  padding: 12px;
}
.week span {
  display: inline-block;
  min-width: 70px;
  font-weight: 850;
  color: rgba(124, 140, 122, 1);
}

/* Split layout */
.split {
  display: grid;
  gap: 16px;
  align-items: start;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
  }
  .split.reverse {
    grid-template-columns: 0.85fr 1.15fr;
  }
  .split.reverse .split-copy {
    order: 2;
  }
}

/* Default image behavior (good for photos): fill the frame */
.media img,
.slide-media img,
.hero-media img,
.about-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Diagram mode: show the whole image inside the frame */
.media.contain img,
.slide-media.contain img,
.hero-media.contain img,
.about-media.contain img {
  object-fit: contain;
  background: rgba(
    31,
    46,
    69,
    0.04
  ); /* subtle backdrop so it doesn't look empty */
}

.media {
  overflow: hidden;
  padding: 0;
}
.media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.caption {
  margin: 0;
  padding: 10px 12px;
  font-size: 12.5px;
  color: rgba(31, 46, 69, 0.65);
  background: rgba(242, 237, 230, 0.75);
  border-top: 1px solid rgba(31, 46, 69, 0.12);
}

/* Swiper (working version: flex + snap) */
.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.swiper {
  display: grid;
  gap: 10px;
}

.swiper-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Swiper section: slightly less top padding so it starts higher */
#swiper.section {
  padding-top: clamp(22px, 2.6vw, 34px);
}

.icon-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  border-radius: 14px;
  border: 1px solid rgba(31, 46, 69, 0.18);
  background: rgba(242, 237, 230, 0.72);
  color: var(--midnight);
  cursor: pointer;
}
.icon-btn:hover {
  background: rgba(31, 46, 69, 0.06);
}

.dots {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(31, 46, 69, 0.22);
  background: rgba(31, 46, 69, 0.1);
  cursor: pointer;
}
.dot[aria-selected="true"] {
  background: rgba(196, 106, 74, 1);
  border-color: rgba(196, 106, 74, 1);
}

.swiper-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px 12px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;

  width: 100%;
  max-width: 100%;
}

.swiper-track::-webkit-scrollbar {
  height: 10px;
}
.swiper-track::-webkit-scrollbar-thumb {
  background: rgba(31, 46, 69, 0.18);
  border-radius: 999px;
}

.slide {
  flex: 0 0 92%;
  min-width: 92%;
  scroll-snap-align: start;
  padding: 16px;
}

@media (min-width: 900px) {
  .slide {
    flex-basis: 49%;
    min-width: 49%;
  }
}
@media (min-width: 1100px) {
  .slide {
    flex-basis: 40%;
    min-width: 40%;
  }
}

.slide-media {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(31, 46, 69, 0.12);
  height: 250px;
  margin-bottom: 10px;
}
.slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* photo style */
  object-position: center;
  display: block;
}

/* About */
.about-grid {
  display: grid;
  gap: 16px;
}

/* SECTION 8: About alignment fix */
#about .about-grid {
  align-items: start; /* forces both columns to top-align */
  gap: clamp(16px, 2.4vw, 22px); /* consistent spacing */
}

#about h2 {
  margin-top: 0; /* prevents odd top offset */
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
  }
}
.about-card {
  padding: 18px;
}

/* Right card: consistent vertical rhythm */
#about .about-card {
  padding: 16px;
  display: grid;
  gap: 12px; /* controls spacing between blocks */
  align-content: start; /* prevents stretching weirdness */
}

#about .about-card h3 {
  margin: 0; /* remove default extra margin */
}

#about .about-card .bullets {
  margin: 0 0 6px 18px; /* tighter list spacing */
}

/* About image: match other section images */
.about-media {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(31, 46, 69, 0.12);
  margin-bottom: 12px;
  padding: 0;
  max-height: 320px; /* reduces frame height */
}

.about-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3; /* or 16/9 if you prefer */
  object-position: 50% 0%; /* move crop up so the head stays visible */
}

/* CTA */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(31, 46, 69, 0.12);
  padding: 18px 0 26px;
  background: rgba(31, 46, 69, 0.04);
}
.footer-inner {
  display: grid;
  gap: 6px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
