/* ============================================================
   ROLLUIKEN BRABANT — Funnel stylesheet
   Matches V2 configurator visual language:
   Archivo + Space Mono · warm paper · sharp corners · orange accent
   ============================================================ */

/* ── Tokens (scoped to .funnel) ── */
.funnel,
.funnel :where(*:not(.cfg2, .cfg2 *)) {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.funnel {
  --ink:        #0f0e0a;
  --ink-2:      #5e5b54;
  --ink-3:      #9c9990;
  --line:       #e4e1d8;
  --line-dark:  #0f0e0a;
  --paper:      #f0ede5;
  --paper-2:    #e9e6de;
  --white:      #ffffff;
  --accent:     #dd5325;
  --accent-ink: #ffffff;
  --plaster:    #f0ede5;
  --sans: 'Archivo', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --ph: 44px;

  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   SCREEN LAYOUT
══════════════════════════════════════ */
.f-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
}

/* 3px accent progress strip */
.f-progress { flex: 0 0 3px; background: var(--line); }
.f-progress-fill {
  height: 3px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header */
.f-header {
  flex: 0 0 auto;
  height: 48px;
  border-bottom: 1.5px solid var(--line-dark);
  padding: 0 var(--ph);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
}

.f-header-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.f-header-brand .sq { width: 8px; height: 8px; background: var(--accent); flex: 0 0 auto; }
.f-header-tagline {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: none;
}

.f-lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.f-lang button {
  border: 0;
  background: transparent;
  padding: 4px 2px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.08em;
}
.f-lang button.active { color: var(--accent); font-weight: 700; }
.f-header .f-lang { margin-left: 8px; }
.f-cfg-strip .f-lang { margin-left: auto; }
.f-cfg-strip .f-lang + span { margin-left: 0 !important; }

.f-step-label {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.f-back-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); padding: 0;
  transition: color 0.15s; flex: 0 0 auto;
}
.f-back-btn:hover { color: var(--ink); }

/* Content area */
.f-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 44px var(--ph) 28px;
}
.f-content-inner { max-width: 580px; }

/* Sticky footer */
.f-footer {
  flex: 0 0 auto;
  border-top: 1.5px solid var(--line-dark);
  padding: 14px var(--ph);
  background: var(--white);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.f-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  background: var(--white); color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.14s, color 0.14s;
  border-radius: 0; white-space: nowrap;
}
.f-btn:hover { background: var(--paper); }
.f-btn:disabled { opacity: 0.42; cursor: default; pointer-events: none; }
.f-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.f-btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black 12%); }
.f-btn.ghost { border-color: transparent; color: var(--ink-2); padding-left: 8px; padding-right: 8px; }
.f-btn.ghost:hover { background: var(--paper); color: var(--ink); }

/* ══════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════ */
.f-heading {
  font-weight: 800; font-size: 30px;
  line-height: 1.1; letter-spacing: -0.025em;
  color: var(--ink); text-wrap: balance; margin-bottom: 10px;
}
.f-sub {
  font-size: 15px; line-height: 1.6; color: var(--ink-2);
  max-width: 54ch; margin-bottom: 28px;
}
.f-eyebrow {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-3); display: block; margin-bottom: 10px;
}

/* ══════════════════════════════════════
   LANDING SCREEN
══════════════════════════════════════ */
.f-landing {
  position: fixed; inset: 0;
  background-color: #f0ede5;
  background-image: radial-gradient(circle, rgba(21,20,15,0.10) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.f-landing-header {
  flex: 0 0 auto; height: 52px;
  padding: 0 var(--ph);
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1.5px solid var(--line-dark);
  background: rgba(240,237,229,0.88);
  backdrop-filter: blur(12px);
}

.f-landing-body {
  flex: 1; display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 200px);
}

.f-landing-text {
  padding: 64px var(--ph) 48px;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1.5px solid var(--line-dark);
}

.f-landing-demo {
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 40px;
}
.f-landing-demo::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 28%;
  background: linear-gradient(0deg, rgba(235,231,221,0.55) 0%, transparent 100%);
  pointer-events: none;
}

.f-hero-heading {
  font-weight: 900;
  font-size: clamp(28px, 3.5vw, 54px);
  line-height: 1.06; letter-spacing: -0.03em;
  color: var(--ink); max-width: 18ch;
  text-wrap: balance; margin-bottom: 18px;
}
.f-hero-sub {
  font-size: 16px; line-height: 1.65;
  color: var(--ink-2); max-width: 48ch; margin-bottom: 32px;
}

.f-bullets { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.f-bullet {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--ink-2); line-height: 1.4;
}
.f-bullet::before {
  content: ''; flex: 0 0 auto;
  width: 6px; height: 6px;
  background: var(--accent); margin-top: 5px;
}

.f-trust {
  flex: 0 0 auto;
  border-top: 1.5px solid var(--line-dark);
  padding: 24px var(--ph) 28px;
  background: rgba(240,237,229,0.75);
}
.f-trust-label {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 16px;
}
.f-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.f-trust-item-title { font-weight: 700; font-size: 13.5px; color: var(--ink); display: block; margin-bottom: 4px; }
.f-trust-item-desc  { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* ══════════════════════════════════════
   INTENT SCREEN
══════════════════════════════════════ */
.f-intent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.f-intent-card {
  position: relative;
  border: 1.5px solid var(--line);
  padding: 18px 18px 16px;
  cursor: pointer; text-align: left;
  background: var(--white);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
  font-family: var(--sans);
}
.f-intent-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: transparent; transition: background 0.15s;
}
.f-intent-card:hover { border-color: var(--ink-3); background: #faf9f5; }
.f-intent-card.sel  { border-color: var(--ink); background: #faf9f5; }
.f-intent-card.sel::before { background: var(--accent); }

.f-intent-check {
  position: absolute; top: 12px; right: 12px;
  width: 18px; height: 18px;
  border: 1.5px solid var(--line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: transparent; transition: all 0.15s;
}
.f-intent-card.sel .f-intent-check {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}

.f-intent-title {
  display: block; font-weight: 700; font-size: 14px; color: var(--ink);
  line-height: 1.3; margin-bottom: 4px; padding-right: 22px;
}
.f-intent-sub {
  display: block; font-size: 12px; color: var(--ink-3); line-height: 1.4;
}

/* ══════════════════════════════════════
   RESULT SCREEN
══════════════════════════════════════ */
.f-result-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 36px; align-items: start;
}

@media (min-width: 861px) {
  .f-result-screen .f-content {
    display: flex;
    justify-content: center;
    padding-top: clamp(38px, 5vh, 64px);
  }
  .f-result-screen .f-content-inner {
    width: min(100%, 1180px);
    max-width: none;
  }
  .f-result-screen .f-heading {
    max-width: 760px;
    font-size: clamp(32px, 2.2vw, 42px);
  }
  .f-result-screen .f-sub {
    max-width: 650px;
    font-size: 16px;
  }
  .f-result-screen .f-result-layout {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(48px, 5vw, 82px);
  }
  .f-result-screen .f-result-render {
    min-height: clamp(390px, 49vh, 540px);
    padding: 42px 34px 62px;
  }
  .f-result-screen .f-summary-row {
    padding: 15px 0;
  }
  .f-result-screen .f-summary-val {
    font-size: 15px;
  }
  .f-result-screen .f-price-value {
    font-size: 48px;
  }
  .f-result-screen .f-footer {
    padding-left: max(var(--ph), calc((100vw - 1180px) / 2));
    padding-right: max(var(--ph), calc((100vw - 1180px) / 2));
  }
}

.f-result-render {
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(21,20,15,0.10) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1.5px solid var(--line-dark);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px 52px;
  min-height: 200px; position: relative; overflow: hidden;
}
.f-result-render::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 25%;
  background: linear-gradient(0deg, rgba(235,231,221,0.5) 0%, transparent 100%);
  pointer-events: none;
}

.f-summary-table { width: 100%; border-top: 1.5px solid var(--line-dark); margin-bottom: 16px; }
.f-summary-row {
  display: grid; grid-template-columns: 24px 1fr auto;
  gap: 12px; align-items: baseline;
  padding: 12px 0; border-bottom: 1.5px solid var(--line);
}
.f-summary-n   { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.f-summary-lab { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 2px; }
.f-summary-val { font-weight: 600; font-size: 14px; color: var(--ink); }
.f-summary-amt { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.f-summary-amt.incl { color: var(--ink-3); font-weight: 400; }

.f-price-block { display: flex; flex-direction: column; gap: 4px; }
.f-price-label {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-3);
}
.f-price-value {
  font-weight: 900; font-size: 40px;
  letter-spacing: -0.04em; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.f-price-note {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
  max-width: 40ch;
  border-left: 2px solid var(--line); padding-left: 12px;
  margin-top: 8px;
}
.f-config-code {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); padding: 8px 12px;
  border: 1.5px solid var(--line); display: inline-block;
  margin-bottom: 16px;
}

/* ══════════════════════════════════════
   FORM FIELDS
══════════════════════════════════════ */
.f-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.f-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.f-label .f-opt { font-weight: 400; color: var(--ink-3); margin-left: 4px; }

.f-input {
  border: 1.5px solid var(--line);
  padding: 12px 14px;
  font-family: var(--sans); font-size: 15px;
  color: var(--ink); background: var(--white);
  transition: border-color 0.15s;
  border-radius: 0; outline: none; width: 100%;
}
.f-input:focus { border-color: var(--ink); }
.f-input.err   { border-color: #c47c7c; }
.f-input-sm    { max-width: 160px; }

.f-error {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.04em; color: #c47c7c;
}

/* Radio card group */
.f-radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.f-radio-card {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  cursor: pointer; font-size: 13.5px;
  font-family: var(--sans); color: var(--ink-2);
  background: var(--white);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.f-radio-card.sel { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.f-radio-dot {
  width: 14px; height: 14px;
  border: 1.5px solid var(--line); border-radius: 50%;
  flex: 0 0 auto; transition: all 0.15s;
}
.f-radio-card.sel .f-radio-dot { background: var(--accent); border-color: var(--accent); }

/* Submit error + privacy */
.f-submit-error { font-family: var(--mono); font-size: 10.5px; color: #c47c7c; margin-top: 8px; }
.f-privacy { font-size: 12px; color: var(--ink-3); line-height: 1.55; margin-top: 10px; }
.f-privacy a { color: var(--ink-2); text-decoration: underline; }

/* ══════════════════════════════════════
   SUCCESS SCREEN
══════════════════════════════════════ */
.f-success-badge {
  width: 34px; height: 34px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.f-success-code {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink); padding: 14px 20px;
  border: 1.5px solid var(--line-dark); display: inline-block; margin-bottom: 24px;
}
.f-success-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

/* Postcode row */
.f-postcode-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(150px, 1fr);
  gap: 12px;
  align-items: start;
  width: min(100%, 390px);
}
.f-postcode-row .f-field { min-width: 0; margin-bottom: 0; }
.f-postcode-row .f-input-sm { max-width: none; }
.f-postcode-row .f-label {
  min-height: 28px;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2px 4px;
}

/* Configurator funnel wrapper */
.f-cfg-wrap { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: clip; }
/* cfg2 uses height:100% which breaks inside a flex item — override to flex fill */
.f-cfg-wrap .cfg2 { flex: 1 1 auto; height: auto; min-height: 0; }
.f-cfg-strip {
  flex: 0 0 auto; height: 38px;
  border-bottom: 1.5px solid var(--line-dark);
  background: var(--white);
  display: flex; align-items: center;
  padding: 0 var(--ph); gap: 12px;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (min-width: 900px) {
  .f-header-tagline { display: block; }
}

@media (max-width: 860px) {
  .f-landing-body { grid-template-columns: 1fr; }
  .f-landing-demo { display: none; }
  .f-trust-grid   { grid-template-columns: repeat(2, 1fr); }
  .f-result-layout { grid-template-columns: 1fr; }
  .f-result-screen .f-content-inner {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .funnel { --ph: 20px; }
  .f-heading { font-size: 24px; }
  .f-hero-heading { font-size: 26px; }
  .f-intent-grid { grid-template-columns: 1fr; }
  .f-trust-grid  { grid-template-columns: 1fr 1fr; }
  .f-price-value { font-size: 32px; }
  .f-postcode-row {
    grid-template-columns: 1fr;
    gap: 14px;
    width: 100%;
  }
  .f-postcode-row .f-label { min-height: 0; }
  .f-header-tagline { display: none; }
  .f-header .f-lang { margin-left: auto; }
  .f-step-label { display: none; }
  .f-cfg-strip { padding-left: 20px; padding-right: 20px; }
  .f-result-render {
    min-height: 230px;
    padding: 28px 18px 38px;
  }
  .f-result-layout { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) { .f-progress-fill { transition: none; } }

.funnel ::-webkit-scrollbar { width: 8px; }
.funnel ::-webkit-scrollbar-track { background: var(--paper); }
.funnel ::-webkit-scrollbar-thumb { background: #d4d1c8; }
.funnel ::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ── ElevationLight integration ── */
/* Hide text tags and annotation chip in the landing hero (decorative only) */
.f-landing-demo .l-tag,
.f-landing-demo .l-annot,
.f-landing-demo .l-block-label { display: none; }

/* Result render: hide elevation's own labels (the funnel summary table replaces them) */
.f-result-render .l-block-label,
.f-result-render .l-tag,
.f-result-render .l-annot { display: none; }

/* Give the elevation component a proper positioning context in both containers */
.f-landing-demo > div,
.f-result-render { position: relative; }
