.button { cursor: pointer; font-family: var(--font); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.site-footer .footer-inner { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 10px 20px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 18px; }
.footer-links a, .footer-preferences { color: #d4ddd4; font: inherit; font-size: .72rem; text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover, .footer-preferences:hover { color: var(--green); }
.footer-preferences { padding: 0; border: 0; background: transparent; cursor: pointer; }

.ui-dialog {
  width: min(740px, calc(100% - 28px));
  max-width: 740px;
  max-height: min(92vh, 900px);
  max-height: min(92dvh, 900px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d7e0d7;
  border-radius: 14px;
  background: #fbfcfa;
  color: #111711;
  box-shadow: 0 24px 90px rgba(0,0,0,.42);
}
.ui-dialog::backdrop { background: rgba(2, 7, 3, .76); backdrop-filter: blur(3px); }
.dialog-content { position: relative; padding: clamp(28px, 5vw, 48px); }
.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #d5ded5;
  border-radius: 50%;
  background: #fff;
  color: #111711;
  font: 400 1.8rem/1 var(--font);
  cursor: pointer;
}
.dialog-close:hover { border-color: #111711; }
.ui-dialog .eyebrow { margin: 0 54px 12px 0; }
.ui-dialog h2 { max-width: 600px; margin: 0 48px 12px 0; color: #111711; font-size: clamp(1.8rem, 4vw, 2.55rem); font-weight: 800; letter-spacing: -.065em; line-height: 1.08; }
.dialog-intro { max-width: 600px; margin: 0 0 24px; color: #4e5a50; font-size: .96rem; line-height: 1.7; }
.contact-dialog { width: min(740px, calc(100% - 28px)); }
.contact-form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.form-field--wide { grid-column: 1 / -1; }
.form-field > label { color: #172118; font-size: .82rem; font-weight: 800; line-height: 1.45; }
.form-field > label span { color: #657166; font-weight: 500; }
.form-field input:not([type="checkbox"]), .form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #cbd7cc;
  border-radius: 4px;
  background: #fff;
  color: #101710;
  font: 500 .94rem/1.5 var(--font);
}
.form-field textarea { min-height: 118px; resize: vertical; }
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: #b42318; }
.form-field input:focus, .form-field textarea:focus { border-color: #216d31; }
.field-hint { color: #59645b; font-size: .75rem; line-height: 1.45; }
.field-error { color: #a12117; font-size: .78rem; font-weight: 700; line-height: 1.45; }
.form-error-summary { padding: 12px 14px; border-left: 3px solid #a12117; background: #fff0ed; color: #762017; font-size: .86rem; font-weight: 700; }
.form-error-summary[hidden], .field-error[hidden] { display: none; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; }
.consent-label input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #216d31; }
.consent-label span { color: #39443b; font-size: .78rem; font-weight: 500; line-height: 1.55; }
.consent-label a { color: #216d31; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.form-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-honeypot input { position: absolute; left: -10000px; }
.form-status { min-height: 1.4em; margin: 0; color: #3d4b40; font-size: .82rem; }
.form-status[data-error="true"] { color: #a12117; font-weight: 700; }
.form-actions { display: grid; grid-template-columns: minmax(210px, auto) minmax(0, 1fr); align-items: center; gap: 15px; }
.form-actions .button { min-height: 52px; }
.form-actions p { margin: 0; color: #59645b; font-size: .76rem; line-height: 1.5; }

.cookie-notice {
  position: fixed;
  z-index: 20;
  right: max(16px, calc((100vw - 900px) / 2));
  bottom: 16px;
  left: max(16px, calc((100vw - 900px) / 2));
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  max-height: min(75vh, 520px);
  max-height: min(75dvh, 520px);
  overflow: auto;
  padding: 19px 21px;
  border: 1px solid rgba(53,242,79,.42);
  border-radius: 8px;
  background: #050806;
  color: #f4f8f3;
  box-shadow: 0 18px 56px rgba(0,0,0,.32);
}
.cookie-notice.is-visible { display: grid; }
.cookie-copy { min-width: 0; }
.cookie-title { margin: 0 0 5px; color: var(--green); font-size: .91rem; font-weight: 800; }
.cookie-copy p:last-child { margin: 0; color: #d8e0d8; font-size: .77rem; line-height: 1.55; }
.cookie-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cookie-button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 3px;
  background: transparent;
  color: #f4f8f3;
  font: 800 .68rem/1.3 var(--font);
  cursor: pointer;
}
.cookie-button:hover { border-color: var(--green); color: var(--green); }
.cookie-button--primary { border-color: var(--green); background: var(--green); color: #061008; }
.cookie-button--primary:hover { background: transparent; color: var(--green); }
.preferences-dialog { width: min(620px, calc(100% - 28px)); max-width: 620px; }
.preference-list { display: grid; border-top: 1px solid #d5ded5; }
.preference-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 0; border-bottom: 1px solid #d5ded5; cursor: pointer; }
.preference-row span { display: grid; gap: 3px; }
.preference-row strong { color: #172118; font-size: .88rem; }
.preference-row small { color: #59645b; font-size: .75rem; line-height: 1.5; }
.preference-row input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #216d31; }
.preference-row input:disabled { opacity: .7; cursor: not-allowed; }
.preference-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 23px; }
.preference-actions .button { min-height: 50px; padding-inline: 18px; font-size: .76rem; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: #216d31; font: 800 .78rem/1.4 var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.legal-page { min-height: 100vh; display: flex; flex-direction: column; background: #f4f6f2; color: #111711; }
.legal-header { padding: 20px 0; border-bottom: 1px solid #d5ded5; background: #050806; color: #fff; }
.legal-header-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.legal-brand { color: #fff; font-size: .9rem; font-weight: 800; letter-spacing: .16em; text-decoration: none; }
.legal-back { color: #e1e8e1; font-size: .8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.legal-main { flex: 1; padding: clamp(48px, 7vw, 84px) 0; }
.legal-content { width: min(880px, calc(100% - 48px)); margin: 0 auto; }
.legal-content .eyebrow { margin-bottom: 13px; }
.legal-content h1 { margin: 0 0 14px; color: #111711; font-size: clamp(2.25rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: -.075em; line-height: 1.05; }
.legal-updated { margin: 0 0 36px; color: #59645b; font-size: .82rem; }
.legal-content h2 { margin: 34px 0 10px; color: #111711; font-size: 1.23rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p, .legal-content li { color: #344037; font-size: .94rem; line-height: 1.85; }
.legal-content p { margin: 0 0 14px; }
.legal-content ul { display: grid; gap: 8px; padding-left: 22px; }
.legal-content a { color: #216d31; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.legal-contact { padding: 18px 20px; border-left: 3px solid #35f24f; background: #fff; }
.legal-footer { margin-top: auto; }
.legal-footer .footer-inner { min-height: 56px; }

@media (max-width: 760px) {
  .site-footer .footer-inner { grid-template-columns: 1fr; align-items: flex-start; gap: 6px; }
  .footer-links { justify-content: flex-start; gap: 8px 16px; margin-top: 8px; }
  .cookie-notice { right: 10px; bottom: 10px; left: 10px; grid-template-columns: 1fr; gap: 14px; max-height: min(76vh, 560px); max-height: min(76dvh, 560px); padding: 16px; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .cookie-button { min-height: 42px; }
  .cookie-button--primary { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-field--wide { grid-column: auto; }
  .form-actions { grid-template-columns: 1fr; gap: 9px; }
  .form-actions p { text-align: center; }
  .legal-header-inner { align-items: flex-start; flex-direction: column; gap: 8px; }
  .legal-content { width: min(880px, calc(100% - 36px)); }
}

@media (prefers-reduced-motion: reduce) {
  .ui-dialog, .cookie-notice { scroll-behavior: auto; }
}
