:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-alt: #eef1ed;
  --text: #1f2a24;
  --heading: #29503a;
  --muted: #5f6b63;
  --accent: #5b7c6a;
  --accent-hover: #496757;
  --border: #dbe3dc;
  --btn-text: var(--bg);

  --linear-gradient: linear-gradient(145deg, #29503a 0, #5b7c6a 100vw);

  interpolate-size: allow-keywords;
}

@font-face {
  font-family: 'Futura LT';
  src: url('fonts/FuturaLT-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  font-family: 'Futura LT', 'Futura', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

*:focus-visible {
  outline: none;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin-top: 0;
  color: var(--heading)
}

h1 {
  font-size: clamp(2rem, 4.5vw, 4rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 1rem;
}

p {
  margin-top: 0;
}

.container {
  width: min(100% - 2rem, 980px);
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2rem, 760px);
}

header {
  /* background: linear-gradient(145deg, #edf3ee 0%, #f7f7f5 100%); */
  /* border-bottom: 1px solid var(--border); */
  /* padding: 2rem 0 2rem; */
  padding-bottom: 2rem;
  background: var(--linear-gradient);
  border-bottom: 1px solid var(--border);
  --accent: var(--bg);
  --accent-hover: #f2f2f2;
  --btn-text: var(--text);
  --heading: #ffffff;
  --muted: #eef1ed;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  min-height: 48px;
}

.menu-show,
.menu-close {
  display: none;
}

.menu-popover {
  display: contents;
}

/* simple language switcher styles */
.lang-switcher,
.header-menu {
  display: flex;
  align-items: center;
}

.lang-switcher {
  gap: 0.4rem;
  color: var(--muted);
}

.header-menu {
  flex-wrap: wrap;
}

.lang-switcher a,
.header-menu a {
  position: relative;
  text-decoration: none;
  color: var(--accent);
  padding: 10px 12px;
}

.header-menu a {
  white-space: nowrap;
}

.lang-switcher a::after,
.header-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms;
}

@media (hover: hover) and (pointer: fine) {

  .lang-switcher a:hover,
  .header-menu a:hover {
    color: var(--accent-hover);
  }

  .lang-switcher a:hover::after,
  .header-menu a:hover::after {
    transform: scaleX(1);
  }

  .btn:hover {
    background-color: var(--accent-hover);
  }
}

/* @media (max-width: 800px) {
  .header-menu a {
    font-size: 1rem;
  }
} */

/* layout for the About section when the image is moved into it */
.about-flex {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.about-content {
  flex: 1 1 320px;
  min-width: 260px;
}

/* Approach section layout: content + quote block (mirrors image width) */
.approach-flex {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex-direction: column;
  /* center the quote block vertically with the content */
  flex-wrap: wrap;
}

.approach-content {
  flex: 1 1 320px;
  min-width: 260px;
}

.quote-block {
  order: -1;
  /* move the quote before the heading on small screens */
  flex: 0 1 auto;
  /* max-width: 100%; */
  max-width: 500px;
}

.quote-block blockquote {
  background: transparent;
  border: none;
  margin: 0;
  padding: 0;
  position: relative;
  font-style: italic;
  color: var(--muted);
  /* Responsive, CSS-only sizing: grows with viewport but capped to avoid overflow */
  font-size: 1.5rem;
  line-height: 1.45;
  min-height: 100%;
  text-align: left;
}

/* allow quotes to wrap naturally */
.quote-block blockquote span {
  white-space: nowrap;
}

.quote-block blockquote footer {
  margin-top: 0.6rem;
  font-size: 1rem;
  font-style: normal;
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 800px) {

  .quote-block {
    order: -1;
    /* move the quote before the heading on small screens */
    flex: 1 1 100%;
    max-width: 100%;
  }

  .quote-block blockquote span {
    white-space: normal;
  }
}


.about-flex .image-section {
  flex: 0 0 220px;
  margin-top: 0;
  text-align: left;
}

@media (max-width: 800px) {
  .about-flex {
    flex-direction: column;
    align-items: center;
  }

  .about-flex .image-section {
    order: -1;
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.image-section {
  flex: 0 0 220px;
  text-align: right;
  margin: 0;
}

.ellipse-image {
  max-width: 220px;
  width: 100%;
  height: auto;
}


.fold>summary {
  cursor: pointer;
  margin-bottom: 0;
  transition: margin-bottom 200ms ease;
}

.fold[open]>summary {
  margin-bottom: 1rem;
}

.fold>summary::marker {
  line-height: 1.25;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--heading)
}

.fold>summary h2 {
  display: inline-block;
  margin: 0;
}

details::details-content {
  opacity: 0;
  transition:
    opacity 200ms ease,
    height 200ms ease,
    content-visibility 200ms ease allow-discrete;
  height: 0;
  overflow: clip;
}

details[open]::details-content {
  opacity: 1;
  height: auto;
}

@media (max-width: 800px) {
  .header-menu {
    display: flex;
    justify-content: flex-start;
  }

  .header-menu a:first-child {
    margin-left: 0;
  }

  .image-section {
    flex: 1 1 100%;
    text-align: center;
    margin-bottom: 1.5em;
  }

  .ellipse-image {
    max-width: 50%;
    width: auto;
    display: block;
    margin: 0 auto;
  }

  .topbar {
    z-index: 1;
    inset: 0 0 auto 0;
  }

  .menu-show,
  .menu-close {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--accent);
    position: relative;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .menu-show span,
  .menu-close span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 3px;
    background: var(--accent);
    border-radius: 999px;
  }

  .menu-show span:nth-child(1) {
    transform: translate(-50%, calc(-50% - 9px));
  }

  .menu-show span:nth-child(2) {
    transform: translate(-50%, -50%);
  }

  .menu-show span:nth-child(3) {
    transform: translate(-50%, calc(-50% + 9px));
  }

  .menu-close span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .menu-close span:nth-child(2) {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0);
  }

  .menu-close span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .menu-close {
    margin: 0.75rem 0;
    align-self: flex-end;
  }

  .menu-popover .header-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .menu-popover {
    border: none;
    padding: 0;
    background: var(--linear-gradient);
    color: inherit;
    max-width: none;
    max-height: none;
    display: none;
    flex-direction: column;
    inset: 0 0 0 auto;
    margin: 0;
    padding-right: 1rem;
    width: min(66vw, 22rem);
    height: 100dvh;
    box-shadow: -6px 0px 24px rgba(31, 42, 36, 0.18);

    transform: translateX(100%);

    transition:
      transform 200ms ease,
      overlay 200ms ease allow-discrete,
      display 200ms ease allow-discrete;
  }

  .menu-popover[open] {
    display: flex;
    transform: translateX(0);
  }

  @starting-style {
    .menu-popover[open] {
      transform: translateX(100%);
    }
  }

  .menu-popover::backdrop {
    background-color: transparent;
    transition:
      display 200ms ease allow-discrete,
      overlay 200ms ease allow-discrete,
      background-color 200ms ease,
      backdrop-filter 200ms ease;
  }

  .menu-popover:open::backdrop {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
  }

  @starting-style {
    .menu-popover:open::backdrop {
      background-color: transparent;
    }
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.3rem;
  color: var(--muted);
  max-width: 65ch;
  margin-bottom: 1.8rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent);
  color: var(--btn-text);
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--accent-hover);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 12px 28px rgba(31, 42, 36, 0.08);
  backdrop-filter: blur(10px);
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field span,
.form-checkbox span,
.form-note,
.form-status {
  font-size: 0.95rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 10rem;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 124, 106, 0.14);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox input {
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-submit {
  border: none;
  cursor: pointer;
  font: inherit;
}

.form-note,
.form-status {
  margin: 0;
  color: var(--muted);
}

.form-status.is-error {
  color: #8a2f2f;
}

.form-status.is-success {
  color: #29503a;
}

.form-status:not(:empty) {
  padding-top: 0.25rem;
}

.section {
  padding: 2rem 0;
}

.alt {
  background-color: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.2rem;
}

.card h3 {
  margin-bottom: 0.6rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.contact-list li {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.6rem;
}

@media (max-width: 800px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.25rem;
  }
}

.site-footer {
  padding: 1.5rem 0;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer p {
  margin: 0;
}

.footer-legal-links {
  display: inline-flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: var(--accent);
  text-decoration: none;
  padding: 10px 12px;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus-visible {
  color: var(--accent-hover);
}

.legal-header {
  padding-bottom: 2rem;
}

.legal-h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  margin: 0;
}

.legal-h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.legal-content {
  display: grid;
  gap: 1.5rem;
}

.legal-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
}

.legal-card h2 {
  margin-bottom: 0.75rem;
}

.legal-card p:last-child,
.legal-card ul:last-child {
  margin-bottom: 0;
}

.legal-placeholder {
  padding-left: 1.2rem;
}

.legal-placeholder li+li {
  margin-top: 0.4rem;
}

.legal-note {
  background-color: var(--surface-alt);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
}

@media (max-width: 800px) {
  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .legal-header {
    padding-bottom: 2rem;
  }

  .legal-card {
    padding: 1.25rem;
  }
}