/* ===========================================================
   More4YourCar, styles
   Mobile-first. Dark, confident hero; clean light body.
   Accent: "cash green". Reg input styled as a UK numberplate.
   =========================================================== */

:root {
  --ink: #11161d;
  --ink-soft: #3b4756;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --hero: #0f1620;
  --hero-2: #16202e;
  --green: #16c784;
  --green-dark: #0fa56c;
  --plate-yellow: #fcd200;
  --line: #e3e8ee;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-family: var(--font-heading); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
p { margin: 0 0 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-weight: 700; font-size: 1rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--green); color: #04241a;
  box-shadow: 0 6px 18px rgba(22, 199, 132, .35);
}
.btn-primary:hover { background: var(--green-dark); }
.btn-lg { font-size: 1.1rem; padding: 1rem 1.8rem; }
.btn-full { width: 100%; }
.btn-ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.4);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); }
/* Secondary green button for light backgrounds (e.g. the email option on the result card). */
.btn-outline {
  background: #fff; color: var(--green-dark); border-color: var(--green);
}
.btn-outline:hover { background: rgba(22,199,132,.10); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 22, 32, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.logo { font-family: var(--font-heading); font-weight: 900; font-size: 1.25rem; letter-spacing: -.5px; text-decoration: none; color: #fff; }
.logo-hl { color: var(--green); }
.header-cta {
  color: var(--green); font-weight: 700; text-decoration: none;
  font-size: .95rem; border: 1px solid rgba(22,199,132,.5);
  padding: .45rem .9rem; border-radius: 999px;
}
.header-cta:hover { background: rgba(22,199,132,.12); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 120% at 80% 0%, var(--hero-2) 0%, var(--hero) 55%);
  color: #eaf1f8;
  padding: 56px 0 64px;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: .8rem;
  font-weight: 700; color: var(--green); margin-bottom: .8rem;
}
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 900; letter-spacing: -1px; }
.hero h1 .hl { color: var(--green); }
.hero .sub { font-size: 1.12rem; color: #b9c6d4; max-width: 40ch; }
.hero-points {
  display: grid; grid-template-columns: 1fr; gap: .5rem;
  margin: 1.5rem 0; font-weight: 600; color: #dbe5ef;
}
.hero-points span { font-size: .98rem; }
.hero-disclaimer { margin-top: 1rem; font-size: .8rem; color: #7d8b9a; }

/* ---------- Steps ---------- */
.steps { padding: 56px 0; background: var(--bg); }
.steps h2 { text-align: center; }
.step-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
.step {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 22px; position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #04241a; font-weight: 900; font-size: 1.2rem;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.2rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---------- Quote ---------- */
.quote { padding: 56px 0; background: var(--hero); color: #eaf1f8; scroll-margin-top: 72px; }
.quote-inner { display: grid; grid-template-columns: 1fr; gap: 32px; }
.quote-copy h2 { color: #fff; }
.quote-copy p { color: #b9c6d4; }
.trust-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.trust-list li { padding: .35rem 0; font-weight: 600; color: #dbe5ef; }

.quote-form {
  background: #fff; color: var(--ink);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.field { display: block; margin-bottom: 16px; }
/* Short-form A/B variant (script.js setupShortForm): step-2 fields, forced hidden
   until step 1 gets a result - wins over the trim picker's own hidden toggling. */
.sf-more { display: none !important; }
.field-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.opt { font-weight: 400; color: #8a96a3; }
.field input {
  width: 100%; padding: .8rem .9rem; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  font-family: var(--font);
}
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,199,132,.18); }
.field input.invalid { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,.15); }

/* UK numberplate styled reg input */
.plate-input {
  background: var(--plate-yellow) !important;
  border: 2px solid #111 !important;
  font-weight: 900; font-size: 1.5rem !important; letter-spacing: 2px;
  text-align: center; text-transform: uppercase; color: #111;
}
.plate-input::placeholder { color: rgba(0,0,0,.35); }

.money-input { position: relative; }
.money-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--ink-soft);
}
.money-input input { padding-left: 28px; }

.form-error {
  background: #fde8e8; color: #b42318; border: 1px solid #f3c2c2;
  padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; font-weight: 600;
  margin-top: 14px; /* sits below the submit button — see the HTML note */
}
.form-note { font-size: .82rem; color: #8a96a3; text-align: center; margin: .8rem 0 0; }

/* ---------- Estimate result card ---------- */
/* Make the `hidden` attribute authoritative. flex/grid display rules (below)
   otherwise beat the UA [hidden] rule, leaving "hidden" elements on screen -
   e.g. the guide-price box when we couldn't value, or an unused handoff button. */
[hidden] { display: none !important; }

.estimate-result {
  background: #fff; color: var(--ink);
  border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow); margin-top: 20px;
  border: 2px solid var(--green);
  text-align: center;
}
.er-vehicle { font-weight: 800; font-size: 1.05rem; margin: 0 0 14px; color: var(--ink); }
.er-figure-wrap {
  background: var(--bg-alt); border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px;
}
.er-label { font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); font-weight: 700; }
.er-figure { font-size: 2.6rem; font-weight: 900; color: var(--green-dark); letter-spacing: -1px; }
.er-note { color: var(--ink-soft); font-size: .95rem; margin: 0 0 16px; }
.er-alt { color: var(--ink-soft); font-size: .9rem; margin: 12px 0 0; }
.er-alt a { color: var(--green-dark); font-weight: 700; }
.btn-text {
  display: block; background: none; border: none; color: var(--ink-soft);
  font-weight: 600; cursor: pointer; margin: 12px auto 0; font-size: .9rem;
  text-decoration: underline; padding: 6px;
}
.btn-text:hover { color: var(--ink); }

/* ---------- Why ---------- */
.why { padding: 56px 0; background: var(--bg); }
.why h2 { text-align: center; max-width: 22ch; margin-inline: auto; }
.why-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
.why-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg-alt); }
.why-card h3 { font-size: 1.12rem; }
.why-card p { margin: 0; color: var(--ink-soft); }
.coverage { text-align: center; color: var(--ink-soft); margin-top: 28px; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--hero); color: #cdd8e3; padding: 40px 0 24px; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.footer-logo { font-weight: 900; font-size: 1.2rem; color: #fff; }
.footer-tag { margin: .4rem 0 0; color: #9aa8b6; max-width: 36ch; }
.footer-contact { display: flex; gap: 12px; }
.smallprint { max-width: var(--wrap); margin: 28px auto 0; padding: 18px 20px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; color: #7d8b9a; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  background: var(--green); color: #04241a; text-align: center;
  font-weight: 800; text-decoration: none;
  padding: 1rem; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transition: opacity .25s ease, transform .25s ease;
}
/* Slide it out of the way while the quote form is on screen (set by script.js). */
.sticky-cta.is-hidden {
  opacity: 0; transform: translateY(140%); pointer-events: none;
}

/* ---------- Form select ---------- */
.field-select {
  width: 100%; padding: .8rem .9rem; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  font-family: var(--font); color: var(--ink); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%233b4756' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}
.field-select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,199,132,.18); }
.field-select.invalid { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,.15); }

/* live postcode confirmation under the field */
.field-hint { display: block; margin-top: 5px; font-size: .82rem; font-weight: 600; color: var(--green-dark); }
.field-hint.bad { color: #c0392b; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* honeypot */

/* ---------- Intercept landing (quote.html) ---------- */
.intercept-hero { padding: 40px 0 28px; }
.intercept-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
.intercept-list { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .5rem; }
.intercept-list li { font-weight: 600; color: #dbe5ef; }
.intercept-form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.back-link { color: var(--green); text-decoration: none; font-weight: 600; font-size: .9rem; }

/* ---------- Legal / privacy page ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 20px 64px; }
.legal h1 { font-size: 1.9rem; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal a { color: var(--green-dark); }
.legal .updated { color: #8a96a3; font-size: .9rem; }
.legal .placeholder { background: #fff6d6; border: 1px dashed #e0c54a; padding: 0 4px; border-radius: 4px; }
.erase-form { max-width: 440px; margin: 12px 0 20px; }
.erase-done { max-width: 620px; background: #e9f9f1; border: 1px solid var(--green); border-radius: 10px; padding: 12px 14px; font-weight: 600; color: var(--ink); }

/* ===========================================================
   Responsive
   =========================================================== */
@media (min-width: 600px) {
  .hero-points { grid-template-columns: 1fr 1fr; }
  .step-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero { padding: 84px 0 96px; }
  .quote-inner { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 48px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .sticky-cta { display: none; } /* desktop has plenty of CTAs */
}
