/* EXRA ApS — stylesheet
   Palette: dark forest green (#1F3A2E) + sand (#C9BBA0) + off-white (#F8F6F1)
   Type: "Fraunces" (headings, serif) / "Source Sans 3" (body) */

:root {
  --forest-900: #12241b;
  --forest-800: #1F3A2E;
  --forest-700: #2c5041;
  --forest-100: #e7ede9;
  --sand-500: #C9BBA0;
  --sand-600: #ad9a78;
  --sand-200: #f0ead9;
  --ink-900: #1b211d;
  --ink-600: #4b564e;
  --ink-400: #7c8880;
  --bg-warm: #F8F6F1;
  --white: #ffffff;
  --success-700: #2f6b48;
  --red-700: #a83226;
  --border: #e0dccf;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(18, 36, 27, 0.1);
  --shadow-md: 0 10px 28px rgba(18, 36, 27, 0.14);
  --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink-900);
  background: var(--bg-warm);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--forest-900);
  line-height: 1.22;
  margin: 0 0 .6em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-600); }
a { color: var(--forest-700); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sand-600);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

img, svg { max-width: 100%; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: "Source Sans 3", sans-serif;
  min-height: 44px;
}
.btn--primary {
  background: var(--sand-500);
  color: var(--forest-900);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--sand-600); transform: translateY(-1px); }
.btn--secondary {
  background: transparent;
  color: var(--forest-800);
  border-color: var(--forest-800);
}
.btn--secondary:hover { background: var(--forest-100); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(248, 246, 241, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--forest-900);
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: .01em;
}
.brand__mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  color: var(--ink-600);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.main-nav a:hover { color: var(--forest-800); }
.header-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--white);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
}

/* ---------- Hero (organic geometric pattern) ---------- */
.hero {
  position: relative;
  padding: 76px 0 64px;
  background: var(--forest-900);
  color: var(--white);
  overflow: hidden;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .9;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero p.hero-sub { color: #d9e2da; font-size: 1.08rem; max-width: 48ch; }
.hero-trust {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: .9rem;
  color: #d9e2da;
}
.hero-trust span { display: flex; align-items: center; gap: 8px; }
.hero-trust span::before {
  content: "✓";
  color: var(--sand-500);
  font-weight: 700;
}
.hero-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  color: var(--ink-900);
  border-top: 4px solid var(--sand-500);
}
.hero-card h3 { margin-bottom: 12px; }
.hero-card ul { padding-left: 1.1em; margin: 0 0 4px; color: var(--ink-600); font-size: .95rem; }
.hero-card li { margin-bottom: 8px; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--forest-800);
  color: #dfe6e0;
  padding: 20px 0;
}
.trust-bar .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  text-align: center;
}
.trust-bar .stat { flex: 1 1 180px; }
.trust-bar .stat strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  color: var(--sand-500);
}
.trust-bar .stat span { font-size: .82rem; color: #c3cdc5; }

/* ---------- Generic section ---------- */
section { padding: 76px 0; }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .76rem;
  font-weight: 700;
  color: var(--sand-600);
  margin-bottom: 10px;
}

.bg-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Grid cards (About / Approach) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.info-grid .card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.info-grid .card strong { display: block; color: var(--forest-800); margin-bottom: 8px; font-family: "Fraunces", serif; font-size: 1.05rem; }
@media (max-width: 780px) { .info-grid { grid-template-columns: 1fr; } }

/* ---------- Steps / approach ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step-card {
  position: relative;
  padding: 28px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--forest-800);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: "Fraunces", serif;
  margin-bottom: 14px;
}
@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Benefits / trust cards ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.benefit-card {
  background: var(--forest-100);
  border-radius: var(--radius-md);
  padding: 26px;
}
.benefit-card h3 { margin-bottom: 8px; }
@media (max-width: 780px) { .benefits-grid { grid-template-columns: 1fr; } }

/* ---------- Contact block: overlay card over muted map background ---------- */
.contact-overlay {
  position: relative;
  padding: 0;
  background: var(--forest-900);
}
.contact-overlay-media {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
}
.contact-overlay-media .map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(45%) sepia(12%) brightness(.75) saturate(1.05);
  opacity: .55;
}
.contact-overlay-media .map-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(18,36,27,.92) 0%, rgba(18,36,27,.75) 38%, rgba(18,36,27,.25) 75%);
}
.contact-overlay .container { position: relative; padding: 72px 24px; }
.contact-card-float {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 460px;
  padding: 34px clamp(22px, 4vw, 36px) 30px;
  border-top: 4px solid var(--sand-500);
}
.contact-card-float .eyebrow { color: var(--sand-600); }
.contact-card-float h2 { font-size: 1.6rem; }
.contact-tile-list { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-tile-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-tile-list .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--forest-100);
  color: var(--forest-800);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-tile-list h4 { margin: 0 0 3px; font-family: "Source Sans 3", sans-serif; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-400); }
.contact-tile-list p, .contact-tile-list a { margin: 0; color: var(--ink-900); font-weight: 600; text-decoration: none; }
.contact-tile-list a:hover { text-decoration: underline; }
@media (max-width: 780px) {
  .contact-overlay-media { min-height: 640px; align-items: flex-end; }
  .contact-overlay .container { padding: 0 16px 40px; }
  .contact-card-float { max-width: none; }
}

/* ---------- Contact form section ---------- */
.contact-form-section {
  background: linear-gradient(180deg, var(--forest-900), var(--forest-800));
  color: var(--white);
  scroll-margin-top: 90px;
}
.contact-form-section .section-head h2 { color: var(--white); }
.contact-form-section .section-head p { color: #d9e2da; }

.form-shell {
  background: var(--white);
  color: var(--ink-900);
  border-radius: var(--radius-lg);
  max-width: 620px;
  margin: 0 auto;
  padding: 34px clamp(20px, 5vw, 44px) 38px;
  box-shadow: var(--shadow-md);
}

label { display: block; font-weight: 600; font-size: .92rem; margin: 16px 0 6px; color: var(--ink-900); }
label:first-of-type { margin-top: 0; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-warm);
  color: var(--ink-900);
  min-height: 44px;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus { border-color: var(--forest-800); background: var(--white); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red-700); background: #fbeeec; }

.field-error {
  color: var(--red-700);
  font-size: .85rem;
  margin: 6px 0 0;
  font-weight: 600;
}
.field-hint { font-size: .82rem; color: var(--ink-400); margin: 6px 0 0; }

.form-actions { margin-top: 26px; }
.form-actions .btn { width: 100%; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(27,46,33,.35);
  border-top-color: var(--forest-900);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-disclaimer {
  font-size: .78rem;
  color: var(--ink-400);
  margin-top: 18px;
  line-height: 1.5;
}
.form-disclaimer a { color: var(--ink-600); }

.form-success { text-align: center; padding: 12px 0 4px; }
.form-success .success-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--success-700);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 18px;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  font-family: "Fraunces", serif;
  font-weight: 600;
  color: var(--forest-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--sand-600);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 4px 18px; }

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--sand-500);
  text-align: center;
  padding: 58px 0;
}
.final-cta h2 { color: var(--forest-900); }
.final-cta p { color: #3c4438; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-900);
  color: #c3cdc5;
  padding: 56px 0 28px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid h4 { color: var(--white); font-size: .95rem; margin-bottom: 14px; font-family: "Source Sans 3", sans-serif; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #c3cdc5; text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-brand .brand { color: var(--white); margin-bottom: 12px; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  font-size: .8rem;
  color: #9aa89d;
  line-height: 1.7;
}
.footer-bottom {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: .8rem;
  color: #9aa89d;
}
.footer-cookie-btn {
  background: none;
  border: none;
  color: #c3cdc5;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.footer-cookie-btn:hover { color: var(--white); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 24px;
  z-index: 900;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: .88rem; margin-bottom: 14px; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner-actions .btn { flex: 1 1 auto; padding: 10px 16px; font-size: .88rem; }

.cookie-settings-panel {
  position: fixed;
  inset: 0;
  background: rgba(18,36,27,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 950;
  padding: 20px;
}
.cookie-settings-panel[hidden] { display: none; }
.cookie-settings-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  max-height: 85vh;
  overflow-y: auto;
}
.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cookie-category:last-of-type { border-bottom: none; }
.cookie-category h4 { margin: 0 0 4px; color: var(--forest-900); font-size: .98rem; font-family: "Source Sans 3", sans-serif; }
.cookie-category p { margin: 0; font-size: .84rem; }
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background .15s ease;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: var(--white);
  border-radius: 50%;
  transition: transform .15s ease;
}
.toggle-switch input:checked + .toggle-track { background: var(--forest-800); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-track { background: var(--ink-400); opacity: .6; }
.cookie-settings-actions { display: flex; gap: 10px; margin-top: 22px; }

/* ---------- Legal pages ---------- */
.legal-page { padding: 56px 0 80px; }
.legal-page .container { max-width: 820px; }
.legal-page h1 { margin-bottom: 6px; }
.legal-updated { color: var(--ink-400); font-size: .88rem; margin-bottom: 32px; }
.legal-page h2 { font-size: 1.3rem; margin-top: 2em; }
.legal-page h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal-page table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .92rem; }
.legal-page th, .legal-page td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal-page th { background: var(--forest-100); }
.legal-page ul, .legal-page ol { padding-left: 1.3em; }
.legal-page li { margin-bottom: .5em; color: var(--ink-600); }
.legal-toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.legal-toc a { display: block; padding: 4px 0; font-size: .92rem; }

/* ---------- Thank you page ---------- */
.thankyou-hero {
  padding: 88px 0 64px;
  text-align: center;
  background: var(--forest-900);
  color: var(--white);
}
.thankyou-hero .success-icon {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--sand-500);
  color: var(--forest-900);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
  margin: 0 auto 20px;
}
.thankyou-hero h1 { color: var(--white); }
.thankyou-hero p { color: #d9e2da; max-width: 52ch; margin: 0 auto 8px; }
.next-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}
@media (max-width: 780px) { .next-steps { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.text-center { text-align: center; }
.mt-lg { margin-top: 32px; }

/* Responsive safety net — long unbreakable strings (email/phone) must not force horizontal overflow */
a[href^="mailto:"], a[href^="tel:"] { overflow-wrap: anywhere; }
body { overflow-x: hidden; }

/* Codex containment patch: preserves the site's original max-width tokens. */
.brand-mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 48px;
}

:where(main, section, article, footer, header, nav, form, dl, div) {
  min-width: 0;
}

:where(img, video, iframe, svg) {
  max-width: 100%;
}

.skip,
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-140%);
}

.skip:focus,
.skip-link:focus {
  transform: translateY(0);
}

a[href^="mailto:"],
a[href^="tel:"],
dd,
.value,
.contact-tile,
.footer-col,
.verified-company-facts {
  overflow-wrap: anywhere;
}

.legal-content,
.legal-page,
.disclaimer-content,
.privacy-content,
.terms-content,
.cookie-content,
.section,
.hero,
.thankyou-hero {
  min-width: 0;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

th,
td {
  overflow-wrap: anywhere;
}

.table-wrap,
.legal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1040px) {
  header nav:not(.mobile-open),
  header .main-nav:not(.mobile-open) {
    display: none;
  }
}

@media (max-width: 480px) {
  header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .btn,
  button,
  #navToggle,
  #nav-toggle,
  .nav-toggle {
    max-width: calc(100vw - 24px);
    white-space: normal;
    right: 12px !important;
    overflow: hidden;
  }

  #navToggle span,
  #nav-toggle span,
  .nav-toggle span {
    max-width: 24px;
  }

  .contact-card-overlay,
  .hero-badge,
  .floating-card,
  .testimonial-card {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
