/* Shared layout and typography for FA Phase II mockups */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Neutrals - shared across brands */
  --neutral-50: #FAFAF8;
  --neutral-100: #F4F2EE;
  --neutral-200: #E8E4DD;
  --neutral-300: #CFC9BE;
  --neutral-500: #8A8378;
  --neutral-700: #4A4640;
  --neutral-900: #1F1D1A;
  --white: #FFFFFF;

  /* Defaults - overridden by theme files */
  --brand-primary: #5D7770;
  --brand-primary-dark: #46594E;
  --brand-primary-light: #A8BCA1;
  --brand-accent: #E5826D;
  --brand-accent-dark: #C66549;
  --brand-surface: var(--neutral-50);
  --brand-ink: var(--neutral-900);
  --brand-muted: var(--neutral-500);
  --brand-font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --brand-radius: 12px;
  --brand-radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--brand-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--brand-ink);
  background: var(--brand-surface);
  -webkit-font-smoothing: antialiased;
}

/* Full-screen flex column. Header pinned top, footer pinned bottom, content grows. */
.viewport {
  min-height: 100vh;
  width: 100%;
  background: var(--brand-surface);
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  background: var(--white);
  border-bottom: 1px solid var(--neutral-200);
  /* Centre the inner row, but keep the bar itself edge-to-edge */
  width: 100%;
}
.header > * { /* keep header items inside a centred max-width band */ }
.header__logo, .header__nav { max-width: none; }
@media (min-width: 1281px) {
  .header { padding-left: max(48px, calc((100vw - 1280px) / 2)); padding-right: max(48px, calc((100vw - 1280px) / 2)); }
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--brand-font);
  font-weight: 700;
  font-size: 22px;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
}

.header__logo .wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.header__logo .wordmark__text {
  color: var(--brand-primary);
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.header__logo .wordmark__dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-accent);
  margin-left: 1px;
  margin-bottom: 2px;
  vertical-align: baseline;
}

.header__logo img.brand-img {
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.header__logo .divider {
  width: 1px;
  height: 26px;
  background: var(--neutral-300);
}

.header__logo .sub-label {
  font-weight: 500;
  font-size: 13px;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header__nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.header__nav a {
  color: var(--neutral-700);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.header__nav a:hover { color: var(--brand-primary); }

.header__cta {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--brand-primary);
  background: var(--white);
  color: var(--brand-primary);
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

/* ── Content ────────────────────────────────────────── */
.content {
  flex: 1;                   /* push footer to the bottom on short pages */
  padding: 56px 96px 80px;   /* bottom padding so footer never sits hard against content */
  overflow: visible;         /* let dropdowns / focus rings extend if needed */
  width: 100%;
}

.content--centered {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ── Typography helpers ─────────────────────────────── */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-accent);
  margin-bottom: 16px;
}

.h1 {
  font-size: 52px;
  line-height: 1.05;
  font-weight: 600;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 820px;
}

.h1 em { font-style: normal; color: var(--brand-accent); }

.h2 {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--brand-primary);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--neutral-700);
  max-width: 640px;
  margin-bottom: 36px;
}

.muted { color: var(--neutral-500); }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 999px;
  border: none;
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn--primary {
  background: var(--brand-accent);
  color: var(--white);
}

.btn--primary:hover { background: var(--brand-accent-dark); }

.btn--secondary {
  background: var(--brand-primary);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}

.btn--large {
  padding: 20px 40px;
  font-size: 18px;
}

.btn svg { width: 18px; height: 18px; }

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--brand-radius-lg);
  padding: 32px;
  border: 1px solid var(--neutral-200);
}

.card--ghost {
  background: transparent;
  border: 1.5px dashed var(--neutral-300);
}

/* ── Trust strip ────────────────────────────────────── */
.trust-strip {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--neutral-200);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stars {
  display: flex;
  gap: 2px;
  color: #F5B82E;
  font-size: 18px;
}

.trust-item__text {
  font-size: 13px;
  color: var(--neutral-700);
}

.trust-item__text strong {
  display: block;
  font-weight: 600;
  color: var(--brand-primary);
}

/* ── Progress bar ───────────────────────────────────── */
.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.progress__step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-500);
}

.progress__step .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neutral-200);
  color: var(--neutral-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.progress__step.active .dot {
  background: var(--brand-accent);
  color: var(--white);
}

.progress__step.active {
  color: var(--brand-primary);
}

.progress__step.done .dot {
  background: var(--brand-primary);
  color: var(--white);
}

.progress__step.done { color: var(--brand-primary); }

.progress__line {
  flex: 1;
  height: 1px;
  background: var(--neutral-200);
}

/* ── Form ───────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }

.field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field__input {
  padding: 14px 18px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--brand-radius);
  background: var(--white);
  font-family: var(--brand-font);
  font-size: 15px;
  color: var(--brand-ink);
}

.field__input--prefilled {
  background: var(--neutral-50);
  border-color: var(--brand-primary-light);
}

.field__hint {
  font-size: 12px;
  color: var(--neutral-500);
}

.field__hint .pill {
  display: inline-block;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
  padding: 18px 48px;
  border-top: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--neutral-500);
  background: var(--white);
  width: 100%;
  margin-top: auto; /* pin to bottom when content is short */
}
@media (min-width: 1281px) {
  .footer { padding-left: max(48px, calc((100vw - 1280px) / 2)); padding-right: max(48px, calc((100vw - 1280px) / 2)); }
}

.footer__powered {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__powered img { height: 16px; opacity: 0.6; }

/* =====================================================
   Page-specific layouts (lifted from Stage 0 mockups)
   ===================================================== */

/* --- LANDING --- */
.content--landing {
  padding: 72px 96px 48px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-visual {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  border-radius: 24px;
  aspect-ratio: 1 / 1.05;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
}
.hero-visual::before {
  content: ''; position: absolute; top: -60px; right: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--brand-accent); opacity: 0.95;
}
.hero-visual::after {
  content: ''; position: absolute; bottom: -100px; left: -60px;
  width: 340px; height: 340px; border-radius: 50%;
  background: var(--brand-primary-light); opacity: 0.3;
}
.hero-visual__content {
  position: absolute; inset: 0; padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  z-index: 2;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
  padding: 8px 16px; border-radius: 999px;
  color: white; font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  width: fit-content;
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #7ADE7A; }
.hero-stat { color: white; z-index: 2; }
.hero-stat__number { font-size: 88px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.hero-stat__number em { font-style: normal; color: var(--brand-accent); }
.hero-stat__label { font-size: 15px; opacity: 0.9; margin-top: 8px; max-width: 280px; }
.cta-row { display: flex; gap: 16px; margin-top: 24px; align-items: center; }
.cta-row form { margin: 0; }
.hint { font-size: 14px; color: var(--neutral-500); margin-top: 18px; }

/* --- UPLOAD --- */
.content--upload {
  padding: 48px 96px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.upload-shell { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.upload-zone {
  background: var(--white);
  border: 2px dashed var(--brand-primary-light);
  border-radius: var(--brand-radius-lg);
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.upload-zone::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--brand-accent); opacity: 0.06;
}
.upload-zone form { display: inline-flex; gap: 12px; }
.upload-icon {
  width: 88px; height: 88px; margin: 0 auto 24px;
  background: var(--brand-primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  color: var(--brand-primary);
  position: relative;
}
.upload-icon::after {
  content: ''; position: absolute; inset: -8px;
  border-radius: 50%; border: 2px solid var(--brand-primary-light);
  opacity: 0.5;
}
.upload-zone .h2 { color: var(--brand-primary); margin-bottom: 12px; }
.upload-zone .lead { margin: 0 auto 28px; max-width: 420px; }
.upload-formats {
  display: flex; justify-content: center; gap: 20px;
  margin-top: 28px; padding-top: 28px;
  border-top: 1px solid var(--neutral-200);
}
.format-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--neutral-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-700);
}
.alt-link {
  margin-top: 20px; font-size: 14px; color: var(--neutral-500);
  text-align: center;
}
.alt-link a { color: var(--brand-primary); font-weight: 600; text-decoration: underline; }
.side-panel {
  background: var(--white);
  border-radius: var(--brand-radius-lg);
  padding: 28px;
  border: 1px solid var(--neutral-200);
}
.side-panel__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-accent);
  margin-bottom: 16px;
}
.extract-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 14px;
  padding: 0; margin: 0;
}
.extract-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; color: var(--neutral-700); line-height: 1.4;
}
.extract-list .check {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.security-note {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--neutral-200);
  font-size: 12px; color: var(--neutral-500); line-height: 1.5;
}

/* --- GENERIC NARROW FORM (postcode, customer, kickout) --- */
.content--narrow {
  padding: 48px 24px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.content--narrow h2.h2 { margin-bottom: 8px; }
.content--narrow .lead { margin-bottom: 24px; }
.form-block { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.form-block label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--brand-ink); }
.form-block input[type="text"],
.form-block input[type="email"],
.form-block input[type="tel"],
.form-block input[type="number"] {
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--brand-radius);
  font-family: inherit;
  background: white;
  color: var(--brand-ink);
}
.form-block input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(93, 119, 112, 0.15);
}
.form-block hr { border: none; border-top: 1px solid var(--neutral-200); margin: 4px 0; }
.section-eyebrow {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--brand-accent);
}
.error-banner {
  padding: 12px 16px;
  background: rgba(229, 130, 109, 0.08);
  border-left: 3px solid var(--brand-accent);
  color: var(--brand-accent-dark);
  border-radius: 4px;
  font-size: 14px;
}

/* --- CONFIRM: address-pick list --- */
.content--confirm { padding: 32px 64px; max-width: 920px; margin: 0 auto; width: 100%; }
.address-list { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.address-option {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white);
  padding: 16px 18px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--brand-radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.address-option:hover { border-color: var(--brand-primary-light); }
.address-option.selected {
  border-color: var(--brand-primary);
  background: rgba(168, 188, 161, 0.07);
}
.address-option input[type="radio"] { margin-top: 4px; accent-color: var(--brand-primary); }
.address-option__line1 { font-weight: 600; color: var(--brand-ink); margin-bottom: 4px; }
.address-option__line2 { font-size: 13px; color: var(--neutral-700); }
.address-option__mpan {
  font-size: 11px; color: var(--brand-accent);
  margin-top: 6px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.row-between { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.back-link { color: var(--brand-primary); font-weight: 600; text-decoration: underline; font-size: 14px; }

/* --- QUOTE: results list --- */
.content--quote { padding: 32px 64px; max-width: 1040px; margin: 0 auto; width: 100%; }
.quote-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.quote-meta .mpan { font-size: 13px; color: var(--neutral-500); font-family: 'SF Mono', Consolas, monospace; }
.quote-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--brand-radius-lg);
  padding: 22px 26px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 28px;
  align-items: center;
}
.quote-card--best {
  border: 2px solid var(--brand-primary);
  box-shadow: 0 16px 32px -20px rgba(0,0,0,0.25);
}
.quote-card__supplier { font-weight: 700; font-size: 18px; color: var(--brand-ink); display: flex; align-items: center; gap: 10px; }
.quote-card__badge {
  font-size: 10px;
  background: var(--brand-primary);
  color: white;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.quote-card__meta { font-size: 13px; color: var(--neutral-500); margin-top: 4px; }
.quote-card__price { text-align: right; }
.quote-card__price .amount { font-size: 26px; font-weight: 700; color: var(--brand-primary); letter-spacing: -0.02em; }
.quote-card__price .per { font-size: 10px; color: var(--neutral-500); text-transform: uppercase; letter-spacing: 0.05em; }
.quote-footnote { font-size: 13px; color: var(--neutral-500); margin-top: 28px; text-align: center; }

/* --- STATUS / KICKOUT --- */
.content--status { padding: 64px 24px; max-width: 680px; margin: 0 auto; width: 100%; text-align: center; }
.status-icon {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: white; font-weight: 700;
}
.status-icon--success { background: var(--brand-primary); }
.status-icon--info { background: var(--brand-accent); }
.status-icon--error { background: var(--brand-accent); }
.status-summary {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--brand-radius-lg);
  padding: 24px;
  text-align: left;
  margin-top: 24px;
}
.status-summary .reference {
  font-size: 11px; font-weight: 700;
  color: var(--brand-accent);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}
.status-summary .reference-value { font-family: 'SF Mono', Consolas, monospace; font-size: 13px; color: var(--brand-ink); margin-bottom: 16px; }
.status-summary .field-row { font-size: 14px; color: var(--neutral-700); line-height: 1.7; }
.status-summary .field-row strong { color: var(--brand-ink); }

/* --- "data source: demo" banner --- */
.data-source-banner {
  margin: 0 0 20px;
  padding: 10px 14px;
  background: rgba(229, 130, 109, 0.08);
  border-left: 3px solid var(--brand-accent);
  color: var(--brand-accent-dark);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}
