/* Shared foundation for every page: fonts, tokens, navigation, buttons, footer and motion. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url("/assets/fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --white: #ffffff;
  --paper: #f7fbf8;
  --green-50: #effbf2;
  --green-100: #dff6e5;
  --green-200: #bceac9;
  --green-400: #5fc77c;
  --green-600: #218443;
  --green-700: #176b35;
  --ink: #12261a;
  --muted: #5c6f62;
  --line: #dce9df;
  --shadow: 0 20px 60px rgba(25, 75, 42, .09);
  --radius-lg: 32px;
  --radius-md: 22px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(rgba(33, 132, 67, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 132, 67, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 68%);
  pointer-events: none;
}

::selection { color: var(--ink); background: var(--green-200); }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--green-600); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

h1, h2, h3, h4 { font-family: "Manrope", sans-serif; }

/* Navigation */

.nav-shell {
  position: fixed;
  top: 18px;
  right: 0;
  left: 0;
  z-index: 100;
  transition: translate .45s var(--ease-out);
}

.nav-shell nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 12px 10px 20px;
  border: 1px solid rgba(214, 231, 218, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 40px rgba(24, 75, 40, .08);
  backdrop-filter: blur(18px);
  transition: min-height .45s var(--ease-out), background .3s ease, box-shadow .3s ease;
}

.nav-shell.is-scrolled { translate: 0 -8px; }
.nav-shell.is-scrolled nav { min-height: 62px; background: rgba(255, 255, 255, .95); box-shadow: 0 16px 44px rgba(24, 75, 40, .12); }

.scroll-progress { display: none; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }

.brand-logo { width: 34px; height: 34px; flex: 0 0 auto; overflow: visible; transition: rotate .6s var(--ease-out); }
.brand-logo path { stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100 200; }
.brand:hover .brand-logo { rotate: -10deg; }
.brand-divider { width: 1px; height: 24px; background: var(--line); }
.brand-name { font-family: "Manrope", sans-serif; font-size: .9rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* The logo draws itself once per page load, top stroke first. */
@keyframes logo-draw { from { stroke-dashoffset: 101; } }

@media (prefers-reduced-motion: no-preference) {
  .js .brand-logo-a { animation: logo-draw 1s var(--ease-in-out) .1s backwards; }
  .js .brand-logo-b { animation: logo-draw 1s var(--ease-in-out) .45s backwards; }
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a:not(.button) { position: relative; color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; transition: color .2s ease; }
.nav-links > a:not(.button):hover,
.nav-links > a.active { color: var(--green-700); }

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--ink);
  cursor: pointer;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-family: inherit;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover { transform: translateY(-2px); }
.button svg { transition: translate .3s var(--ease-out), rotate .3s var(--ease-out); }
.button:hover .lucide-arrow-up-right { translate: 2px -2px; }
.button:hover .lucide-arrow-right,
.button:hover .lucide-send { translate: 3px 0; }
.button:hover .lucide-arrow-left { translate: -3px 0; }
.button:hover .lucide-sparkles { rotate: 18deg; }
.button-primary { background: var(--ink); color: var(--white); box-shadow: 0 12px 30px rgba(18, 38, 26, .16); }
.button-primary:hover { box-shadow: 0 16px 36px rgba(18, 38, 26, .22); }
.button-light { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-green { background: var(--green-100); color: var(--green-700); }
.button-nav { min-height: 46px; padding-inline: 18px; }

/* Shared page pieces */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 7px 12px;
  border: 1px solid var(--green-200);
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 5px rgba(95, 199, 124, .15);
}

.status-dot::after { position: absolute; inset: 0; border-radius: 50%; background: var(--green-400); content: ""; opacity: 0; }

.section-kicker { margin-bottom: 14px; color: var(--green-700); font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 54px; }
.section-heading h2 { max-width: 670px; font-size: clamp(2.15rem, 4.2vw, 3.7rem); font-weight: 800; line-height: 1.06; letter-spacing: -.055em; }
.section-heading p { max-width: 390px; color: var(--muted); }

footer { padding: 30px 0 42px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; color: var(--muted); font-size: .82rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { flex: 0 0 auto; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.footer-legal a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.footer-legal a:hover { color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; }
.footer-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 700; text-decoration: none; }
.footer-link svg { transition: translate .3s var(--ease-out); }
.footer-link:hover .lucide-arrow-up { translate: 0 -3px; }
.footer-link:hover .lucide-arrow-left { translate: -3px 0; }

/* Motion: scroll reveals and split headlines.
   Content is only hidden once site.js has flagged the page with .js, so nothing disappears without JavaScript. */

@keyframes reveal-up {
  from { opacity: 0; translate: 0 26px; }
}

@keyframes line-up {
  from { translate: 0 108%; }
}

@keyframes draw-x {
  from { scale: 0 1; }
}

@keyframes pop-in {
  from { opacity: 0; scale: .82; }
}

@keyframes dot-ping {
  0% { opacity: .55; scale: 1; }
  80%, 100% { opacity: 0; scale: 2.8; }
}

.js .reveal:not(.visible) { opacity: 0; }
.reveal.visible { animation: reveal-up .9s var(--ease-out) var(--reveal-delay, 0ms) backwards; }

.split-lines .line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
.split-lines .line > span { display: block; }
.js .split-lines:not(.visible) .line > span { translate: 0 108%; }
.split-lines.visible .line > span { animation: line-up 1.05s var(--ease-out) backwards; animation-delay: calc(var(--line, 0) * 110ms + var(--reveal-delay, 0ms)); }

@media (prefers-reduced-motion: no-preference) {
  .status-dot::after { animation: dot-ping 2.4s var(--ease-out) infinite; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-progress {
      position: absolute;
      right: 22px;
      bottom: -1px;
      left: 22px;
      display: block;
      height: 2px;
      border-radius: 2px;
      background: linear-gradient(90deg, var(--green-400), var(--green-600));
      transform-origin: left center;
      animation: draw-x linear both;
      animation-timeline: scroll(root block);
      pointer-events: none;
    }
  }
}

@media (max-width: 980px) {
  .section-heading { display: block; }
  .section-heading p { margin-top: 18px; }
}

@media (max-width: 760px) {
  body::before { background-size: 38px 38px; }
  .container { width: min(100% - 32px, 1180px); }
  .nav-shell { top: max(10px, env(safe-area-inset-top)); }
  .nav-shell.is-scrolled { translate: none; }
  .nav-shell nav,
  .nav-shell.is-scrolled nav { min-height: 62px; padding: 8px 9px 8px 14px; border-radius: 17px; }
  .brand { gap: 10px; }
  .brand-logo { width: 30px; height: 30px; }
  .menu-button { display: grid; }
  .nav-links { position: absolute; top: calc(100% + 9px); right: 0; left: 0; display: none; align-items: stretch; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; flex-direction: column; animation: reveal-up .35s var(--ease-out); }
  .nav-links > a:not(.button) { min-height: 46px; padding: 11px 12px; }
  .nav-links .button { width: 100%; margin-top: 4px; }
  .section-heading { margin-bottom: 34px; }
  .section-heading h2 { font-size: clamp(2.2rem, 10vw, 3rem); }
  footer { padding: 24px 0 34px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { flex-direction: column; }
}

@media (max-width: 420px) {
  .brand-name { font-size: .82rem; letter-spacing: .05em; }
}

@media (hover: none) {
  .button:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}
