:root {
  /* Backgrounds */
  --teal-light: #f4f9f8;
  --white: #ffffff;
  --teal-white: #E4EFEE;
  --teal-deep: #00848E; /* white text on this passes WCAG AA */


  /* Text */
  --text-main: #243333;
  --text-muted: #4a5b5b;
  --text-accent: #b23a2f; /* RED TYPE */

  /* Spacing */
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}


/* BASE */
html {
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
}

h1, h2, h3 {
  font-weight: 500;
}

h1,
section > h2 {
  color: var(--text-accent);
}

p {
  max-width: 42rem;
  color: var(--text-muted);
}

/* HEADER */
.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: inline-flex;
}

.header-logo {
  height: 80px;
  background:#ffffff;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-main);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-accent);
  border-bottom-color: var(--text-accent);
}

/* HERO */
.hero {
  background: linear-gradient(#ffffff, var(--white));
  padding: var(--space-md) var(--space-md);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-symbol {
  width: 100%;
  max-width: 400px;
  height: auto;
  opacity: 0.99;
}

/* OFFERS */
.offers {
  background: var(--teal-deep);
  padding: var(--space-md) var(--space-md);
  position: relative;
  overflow: hidden;
}

.offers h2,
.offers > p {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.offers h2 {
  margin-bottom: var(--space-md);
  color: #ffffff;
}

.offers > p {
  /* Override the global p max-width so intro paragraphs span the full section */
  max-width: 1200px;
  color: #ffffff;
}

.offer p {
  color: #ffffff;
}

.offer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.offers-sundial {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 72%;
  width: auto;
  max-width: 50%;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

.offer h3 {
  color: #ffffff;
  font-size: 1.25rem;
}

.offer li {
  color: #ffffff;
}

/* HOW / WHY */
.how h2,
.why h2 {
  color: var(--text-accent);
}

.how p,
.how li,
.why p,
.why li {
  color: var(--text-muted);
}

.how-why {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.how {
  background: #f6f0e6;
  padding: var(--space-md) var(--space-md) var(--space-md) max(var(--space-md), calc((100vw - 1200px) / 2));
  position: relative;
  overflow: hidden;
}

.how::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 350px;
  height: 350px;
  background-image: url("budding_branch1.webp");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: bottom left;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at bottom left, black 55%, transparent 100%);
  mask-image: radial-gradient(ellipse at bottom left, black 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.how > * {
  position: relative;
  z-index: 1;
}

.why {
  background: #ffffff;
  padding: var(--space-md) var(--space-md);
  position: relative;
  overflow: hidden;
}

.why::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 420px;
  height: 420px;
  background-image: url("maple_samaras.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top right;
  opacity: 0.5;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse at top right, black 55%, transparent 100%);
  mask-image: radial-gradient(ellipse at top right, black 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.why > * {
  position: relative;
  z-index: 1;
}

.why h2 {
  color: #b23a2f;
}

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


/* ABOUT */
.about {
  background: var(--teal-deep);
  padding: var(--space-md) var(--space-md);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 357px;
  height: 357px;
  background-image: url("sextant.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom right;
  opacity: 0.6;
  transform: translateY(-50%) rotate(-24deg);
  -webkit-mask-image: radial-gradient(ellipse at center, black 55%, transparent 95%);
  mask-image: radial-gradient(ellipse at center, black 55%, transparent 95%);
  pointer-events: none;
  z-index: 0;
}

.about > * {
  position: relative;
  z-index: 1;
}

.about h2 {
  color: #ffffff;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.about p {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

.about ul {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.about li {
  color: #ffffff;
}

.about-heading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.about-windlines {
  height: 0.5em;
  width: auto;
  flex-shrink: 0;
}

/* SARAH */
.background {
  background: #f6f0e6;
  padding: var(--space-md) var(--space-md);
  position: relative;
  overflow: hidden;
}

.background h2 {
  color: #b23a2f;
}

.background h2,
.background p {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.background-sextant {
  position: absolute;
  top: 50%;
  right: 4%;
  width: 26%;
  max-width: 360px;
  height: auto;
  opacity: 0.3;
  transform: translateY(-50%) rotate(-12deg);
  z-index: 0;
  pointer-events: none;
}

.endorsements {
  margin-top: var(--space-md);
  text-align: center;
  position: relative;
  z-index: 1;
}

.endorsement {
  font-style: italic;
  font-size: 0.85rem;
  max-width: 760px;
  margin: 0 auto var(--space-md);
}

.endorsement strong {
  display: inline-block;
  margin-top: 0.5rem;
  font-style: normal;
  color: var(--text-main);
}

/* CONTACT */
.contact {
  background: #ffffff;
  text-align: center;
  padding: var(--space-md) var(--space-md);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("seaweed_white.webp");
  background-repeat: repeat;
  background-size: 500px;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(
    to right,
    black 0%,
    transparent 22%,
    transparent 78%,
    black 100%
  );
  mask-image: linear-gradient(
    to right,
    black 0%,
    transparent 22%,
    transparent 78%,
    black 100%
  );
  pointer-events: none;
  z-index: 0;
}

.contact > * {
  position: relative;
  z-index: 1;
}

.contact p {
  margin-left: auto;
  margin-right: auto;
}

.contact-button {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 0.75rem 1.75rem;
  background: var(--text-accent);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  font: inherit;
  font-size: 1rem;
}

.contact-button:focus-visible,
.modal-close:focus-visible,
.logo-link:focus-visible,
.nav-menu a:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 3px;
}

.contact-email a {
  color: var(--text-accent);
}

.contact-note {
  margin: var(--space-sm) auto 0;
  max-width: none;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-accent);
}

/* CONTACT FORM MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(36, 51, 51, 0.55);
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--white);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-md);
  position: relative;
  box-shadow: 0 20px 60px rgba(36, 51, 51, 0.25);
}

.modal-box h2 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text-accent);
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#contactForm label {
  color: var(--text-main);
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

#contactForm input,
#contactForm textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cdd9d8;
  border-radius: 6px;
  background: var(--teal-light);
  color: var(--text-main);
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

#contactForm input:focus,
#contactForm textarea:focus {
  outline: none;
  border-color: var(--text-accent);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: var(--space-sm) 0 0;
  font-size: 0.95rem;
  max-width: none;
}

.form-status.success { color: var(--teal-deep); }
.form-status.error { color: var(--text-accent); }

.contact-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.modal-submit {
  margin-top: var(--space-md);
  align-self: flex-start;
}

/* FOOTER */
.site-footer {
  background: var(--teal-white);
  text-align: center;
  padding: var(--space-sm) var(--space-md);
}

.site-footer p {
  max-width: none;
  margin: 0 auto;
  color: var(--text-main);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .hero-visual {
    display: flex;
    justify-content: center;
  }

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

  .offers-sundial {
    height: auto;
    width: 30%;
    max-width: 260px;
  }

  .how-why {
    grid-template-columns: 1fr;
  }

  .how {
    padding-left: var(--space-md);
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    text-align: center;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem var(--space-md);
  }

  .header-logo {
    height: 44px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .hero,
  .offers,
  .how,
  .why,
  .about,
  .background,
  .contact {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .offer-grid {
    gap: var(--space-sm);
  }

  .how::before,
  .why::before,
  .about::before {
    width: 220px;
    height: 220px;
  }

  .offers-sundial {
    width: 34%;
    max-width: 150px;
  }

  .background-sextant {
    width: 36%;
    max-width: 150px;
  }

  .hero-symbol {
    max-width: 300px;
  }

  .about-heading {
    flex-wrap: wrap;
  }

  .endorsement {
    max-width: 100%;
  }

  .modal-box {
    padding: var(--space-sm);
  }
}
