/* ============================================================
   Mogens Rasmussen ApS — style.css
   Palette: amber/ochre (#D98E04) + graphite slate (#2B2E33)
   Fonts: Space Grotesk (headings) + Inter (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-amber: #D98E04;
  --color-amber-dark: #B87503;
  --color-amber-light: #F2B23D;
  --color-graphite: #2B2E33;
  --color-graphite-soft: #3C4048;
  --color-bg: #F5F3EF;
  --color-surface: #FFFFFF;
  --color-border: #E3DFD6;
  --color-text: #2B2E33;
  --color-text-muted: #5B5F66;
  --color-on-amber: #201700;
  --color-danger: #B3261E;
  --color-success: #2E7D32;

  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(43,46,51,0.08);
  --shadow-md: 0 8px 24px rgba(43,46,51,0.10);
  --shadow-lg: 0 20px 48px rgba(43,46,51,0.16);

  --max-w: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { overflow-wrap: break-word; 
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--color-graphite);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--color-text); }
a { color: var(--color-amber-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.2em; }
img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-amber);
  color: var(--color-on-amber);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--color-amber-dark);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,243,239,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-graphite);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: block;
}
.brand-name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-graphite);
}
.brand-sub {
  display: block;
  font-size: 0.76rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}
.main-nav {
  display: flex;
  gap: 26px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--color-amber-dark); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
  min-height: 44px;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--color-amber);
  color: var(--color-on-amber);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--color-amber-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--secondary {
  background: transparent;
  color: var(--color-graphite);
  border-color: var(--color-graphite);
}
.btn--secondary:hover { background: var(--color-graphite); color: #fff; }
.btn--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-graphite);
}
.btn--outline:hover { border-color: var(--color-amber-dark); color: var(--color-amber-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero (duotone) ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--color-graphite);
  overflow: hidden;
  padding: 88px 0 64px;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) sepia(0.55) hue-rotate(-18deg) saturate(2.6) brightness(0.75) contrast(1.08);
  opacity: 0.9;
  z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../images/hero-warehouse.jpg');
    background-size: cover;
    background-position: center;
    filter: grayscale(1) sepia(0.55) hue-rotate(-18deg) saturate(2.6) brightness(0.75) contrast(1.08);
    opacity: 0.9;
  }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(24,25,28,0.92) 0%, rgba(24,25,28,0.72) 46%, rgba(43,46,51,0.35) 100%);
}
.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-amber-light);
  margin-bottom: 12px;
}
.hero h1 { color: #fff; }
.hero .lead { color: #E7E3D9; font-size: 1.12rem; max-width: 52ch; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: #C9C4B6;
  margin: 18px 0 28px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-figure ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.hero-figure li {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(217,142,4,0.35);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.94rem;
  color: #EFECE3;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.hero-figure .num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--color-amber);
  color: var(--color-on-amber);
  font-weight: 700;
  font-family: var(--font-head);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section--alt { background: #EFEBE2; }
.section-head { max-width: 68ch; margin-bottom: 40px; }
.section-head p:last-child { color: var(--color-text-muted); }

/* ---------- About + Contact combined two-column ---------- */
.about-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-col .stat-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.about-col .stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--color-amber-dark);
}
.about-col .stat span { font-size: 0.82rem; color: var(--color-text-muted); }

.contact-col {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.contact-col iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}
.contact-col-body { padding: 24px; }
.contact-col-body h3 { margin-bottom: 4px; }
.contact-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.contact-tile {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.contact-tile .icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: rgba(217,142,4,0.12);
  color: var(--color-amber-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.contact-tile h4 { margin: 0 0 4px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.contact-tile a, .contact-tile p { font-size: 0.94rem; margin: 0; color: var(--color-graphite); font-weight: 500; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  position: relative;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-graphite);
  color: var(--color-amber);
  font-family: var(--font-head);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step-card:nth-child(1) .step-num::before { content: "1"; }
.step-card:nth-child(2) .step-num::before { content: "2"; }
.step-card:nth-child(3) .step-num::before { content: "3"; }
.step-card:nth-child(4) .step-num::before { content: "4"; }

/* ---------- Cards / grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.card .icon {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: rgba(217,142,4,0.14);
  color: var(--color-amber-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

/* ---------- Estimator / calculator form ---------- */
.estimator-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.progress-track {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.progress-track span {
  height: 5px;
  flex: 1;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-track span i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-amber);
  transition: width 300ms ease;
}
.progress-label { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 18px; font-weight: 600; }

.range-row { margin: 26px 0; }
.range-row label { display: block; font-weight: 600; margin-bottom: 10px; }
input[type="range"] {
  width: 100%;
  accent-color: var(--color-amber);
  height: 36px;
}
.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.volume-select {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 8px;
}
.volume-option {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  background: var(--color-bg);
  transition: border-color 150ms ease, background 150ms ease;
}
.volume-option strong { display: block; font-family: var(--font-head); color: var(--color-graphite); }
.volume-option span { font-size: 0.78rem; color: var(--color-text-muted); }
.volume-option:hover { border-color: var(--color-amber-light); }
.volume-option.is-selected {
  border-color: var(--color-amber);
  background: rgba(217,142,4,0.1);
}
.volume-option input { position: absolute; opacity: 0; pointer-events: none; }

.estimate-result {
  margin-top: 22px;
  background: rgba(217,142,4,0.09);
  border: 1px solid rgba(217,142,4,0.4);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.94rem;
  display: none;
}
.estimate-result.is-visible { display: block; }
.estimate-result strong { color: var(--color-amber-dark); font-family: var(--font-head); }

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: #fff;
  min-height: 44px;
}
.form-row textarea { min-height: 110px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus {
  border-color: var(--color-amber);
  outline: none;
  box-shadow: 0 0 0 3px rgba(217,142,4,0.22);
}
.form-row.has-error input, .form-row.has-error textarea { border-color: var(--color-danger); }
.field-error {
  color: var(--color-danger);
  font-size: 0.82rem;
  margin: 6px 0 0;
  font-weight: 600;
}
.field-hint { font-size: 0.8rem; color: var(--color-text-muted); margin: 6px 0 0; }
.form-consent { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 4px; }

.form-actions { display: flex; gap: 12px; justify-content: space-between; margin-top: 8px; flex-wrap: wrap; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; }
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 6px 20px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  font-family: var(--font-head);
  color: var(--color-graphite);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--color-amber-dark);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 16px; color: var(--color-text-muted); }

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--color-graphite);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 44px;
  text-align: center;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: #C9C4B6; max-width: 60ch; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer { background: #1E2024; color: #C9C4B6; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #C9C4B6; font-size: 0.92rem; }
.site-footer a:hover { color: var(--color-amber-light); }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: 0.78rem;
  color: #9A968B;
  line-height: 1.6;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: #8B877D;
  margin-top: 16px;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 620px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  z-index: 500;
}
.cookie-banner p { font-size: 0.9rem; margin-bottom: 14px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-settings-panel { display: grid; gap: 14px; margin-top: 16px; border-top: 1px solid var(--color-border); padding-top: 16px; }
.cookie-settings-panel[hidden] { display: none; }
.cookie-toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cookie-toggle-row .desc { font-size: 0.78rem; color: var(--color-text-muted); }
.cookie-toggle-row input[type="checkbox"] { width: 44px; height: 24px; accent-color: var(--color-amber); }

/* ---------- Thank you page ---------- */
.thankyou-page { padding: 96px 0; text-align: center; }
.thankyou-page .check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--color-amber);
  color: var(--color-on-amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 22px;
}
.thankyou-next {
  max-width: 620px;
  margin: 36px auto 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

/* ---------- Legal pages ---------- */
.legal-page { padding: 64px 0 90px; }
.legal-page .container { max-width: 840px; }
.legal-page h2 { margin-top: 2em; }
.legal-page table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.92rem; }
.legal-page th, .legal-page td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal-page th { background: #EFEBE2; font-family: var(--font-head); }
.legal-page .updated { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 2em; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .about-contact { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .volume-select { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav.is-open {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0; right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
    gap: 14px;
  }
  .header-actions .btn--primary { display: none; }
  .steps, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .estimator-wrap { padding: 22px; }
  section { padding: 56px 0; }
  .final-cta { padding: 40px 24px; }
  .contact-tiles { grid-template-columns: 1fr; }
}

/* Responsive safety net — long unbreakable strings (email/phone) must not force horizontal overflow */
a[href^="mailto:"], a[href^="tel:"] { overflow-wrap: anywhere; }
body { overflow-wrap: break-word;  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;
  }
}

/* OVERFLOW SAFETY — email token repair (real email longer than {{COMPANY_EMAIL}} placeholder) */
.email-token, .value, dd, .fact-list dd, .contact-tile span, .contact-tile a { overflow-wrap: anywhere; word-break: break-word; }

li, .hero-figure li, .contact-tile, .fact-list dd { min-width: 0; }
