*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 0.16em; }
p { margin: 0 0 1.05em; }
h1, h2, h3, h4 {
  margin: 0; font-family: var(--font-head); font-weight: 700;
  line-height: 1.18; letter-spacing: -0.015em; color: var(--ink);
}
ul, ol { margin: 0 0 1.05em; padding-left: 1.15em; }
li { margin-bottom: 0.35em; }

:focus-visible { outline: 2px solid var(--marker); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: 0.7rem 1.1rem; background: var(--night); color: #fff;
  font-size: 0.86rem; font-family: var(--font-head);
}
.skip-link:focus { left: 0.6rem; top: 0.6rem; }

.container { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.container--narrow { width: min(48rem, calc(100% - var(--gutter) * 2)); }

.section { padding: clamp(3.2rem, 6.5vw, 5.6rem) 0; }
.section--tint { background: var(--paper-2); }
.section--surface { background: var(--surface); }
.section--forest { background: var(--forest-deep); color: #e5ece6; }
.section--forest h2, .section--forest h3 { color: #fff; }

.h-display { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.1; }
.h-1 { font-size: clamp(1.7rem, 3.1vw, 2.4rem); line-height: 1.2; }
.h-2 { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.3; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 40rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--forest); margin-bottom: 0.85rem;
}
.section--forest .eyebrow { color: #9dbfae; }

.section-head { max-width: 44rem; margin-bottom: clamp(1.8rem, 3.4vw, 2.7rem); }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }
.section--forest .section-head p { color: #b9c9bf; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font-family: var(--font-head); font-size: 0.94rem; font-weight: 600;
  letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out),
              border-color 0.18s var(--ease-out), transform 0.12s var(--ease-out);
}
.btn:active { transform: scale(0.985); }
.btn--primary { background: var(--forest); color: #fff; }
.btn--primary:hover { background: var(--forest-deep); }
.btn--marker { background: var(--marker); color: #fff; }
.btn--marker:hover { background: var(--marker-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--forest); color: var(--forest); }
.btn--sm { padding: 0.55rem 1rem; font-size: 0.86rem; }
.section--forest .btn--ghost { color: #e5ece6; border-color: rgba(255,255,255,0.36); }
.section--forest .btn--ghost:hover { background: rgba(255,255,255,0.09); border-color: #fff; color: #fff; }

.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(242, 243, 238, 0.95);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { min-height: var(--topbar-h); display: flex; align-items: center; gap: 1.4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand__dot {
  width: 0.62rem; height: 0.62rem; border-radius: 50%; background: var(--marker);
  flex: none;
}
.brand__name {
  font-family: var(--font-head); font-size: 1.02rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink);
}
.brand__sub { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav__link {
  position: relative;
  font-family: var(--font-head); font-size: 0.9rem; font-weight: 500;
  text-decoration: none; color: var(--ink-soft);
  padding: 0.3rem 0 0.55rem;
  transition: color 0.16s var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--forest); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--marker);
}
.topbar__cta { margin-left: 0.3rem; }

.burger {
  display: none; width: 2.7rem; height: 2.7rem; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: transparent; cursor: pointer;
}
.burger span {
  display: block; width: 1.15rem; height: 1.5px; margin: 0.25rem auto;
  background: var(--ink); transition: transform 0.2s var(--ease-out), opacity 0.2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(0.4rem) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-0.4rem) rotate(-45deg); }

@media (max-width: 920px) {
  .burger { display: block; }
  .nav {
    position: absolute; inset: var(--topbar-h) 0 auto; z-index: 59;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--gutter) 1.2rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .nav[hidden] { display: none; }
  .nav__link { padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav__link.is-active::after { display: none; }
  .topbar__cta { display: none; }
}

.footer { background: var(--night); color: #a9b7ad; padding: clamp(2.8rem, 5vw, 4rem) 0 1.6rem; }
.footer a { color: #e2eae4; }
.footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 0.7rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer__about p { font-size: 0.88rem; margin-bottom: 0.45em; color: #9aa89e; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.45em; font-size: 0.88rem; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; justify-content: space-between;
  margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8rem; color: #8a978d;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.footer__cookie-btn { padding: 0; border: 0; background: none; color: #e2eae4; font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; gap: 1.6rem; } }

.field { margin-bottom: 1.05rem; }
.field label { display: block; font-family: var(--font-head); font-size: 0.87rem; font-weight: 600; margin-bottom: 0.4rem; }
.field .hint { display: block; font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-top: 0.15rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.72rem 0.85rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.55;
  transition: border-color 0.16s var(--ease-out), box-shadow 0.16s var(--ease-out);
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--forest); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-tint);
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%232f5d50' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 11px 7px;
}
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; font-size: 0.9rem; color: var(--ink-soft); }
.field--check input { margin-top: 0.35rem; accent-color: var(--forest); }
.form__note { font-size: 0.83rem; color: var(--muted); }

[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:active { transform: none; }
}

.consent-drawer {
  position: fixed; inset: auto 0 0; z-index: 120;
  background: var(--surface); border-top: 2px solid var(--forest);
  box-shadow: var(--shadow-lg);
}
.consent-drawer[hidden] { display: none; }
.consent-drawer__inner {
  width: min(46rem, calc(100% - 2rem)); margin-inline: auto; padding: 1.3rem 0 1.5rem;
  max-height: 80vh; overflow-y: auto;
}
.consent-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consent-drawer__head h2 { font-size: 1.1rem; }
.consent-drawer__close { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.consent-drawer p { font-size: 0.9rem; color: var(--ink-soft); }
.consent-rows[hidden] { display: none; }
.consent-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.consent-row strong { font-family: var(--font-head); font-size: 0.9rem; }
.consent-row p { margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--muted); }
.consent-toggle { position: relative; flex: none; width: 2.7rem; height: 1.5rem; }
.consent-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.consent-toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color 0.18s var(--ease-out); }
.consent-toggle span::after {
  content: ""; position: absolute; top: 0.19rem; left: 0.19rem;
  width: 1.12rem; height: 1.12rem; border-radius: 50%; background: #fff;
  transition: transform 0.18s var(--ease-out);
}
.consent-toggle input:checked + span { background: var(--good); }
.consent-toggle input:checked + span::after { transform: translateX(1.2rem); }
.consent-toggle--locked span { background: var(--muted); }
.consent-toggle input:focus-visible + span { outline: 2px solid var(--marker); outline-offset: 2px; }
.consent-drawer__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: flex-end; margin-top: 1.1rem; }
.consent-drawer__more {
  margin-right: auto; padding: 0; border: 0; background: none;
  font-family: var(--font-body); font-size: 0.86rem; color: var(--forest);
  text-decoration: underline; cursor: pointer;
}
.consent-drawer__more:hover { color: var(--ink); }
