/* ==========================================================================
   NexFlip — Design System
   Brand: Red / White / Black. Modern, fast, conversion-focused.
   ========================================================================== */

:root {
  /* Brand palette */
  --red: #E7211A;
  --red-dark: #B8140F;
  --red-soft: #FDECEB;
  --ink: #0E0E10;
  --ink-2: #1C1C21;
  --ink-3: #2A2A31;
  --white: #FFFFFF;
  --paper: #F7F7F8;
  --paper-2: #EFEFF2;
  --line: #E4E4E9;
  --muted: #6A6A73;
  --muted-2: #9A9AA3;
  --success: #1E9E5A;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --h1: clamp(2.4rem, 5.2vw, 4.2rem);
  --h2: clamp(1.9rem, 3.6vw, 3rem);
  --h3: clamp(1.25rem, 2vw, 1.6rem);

  /* Space + shape */
  --container: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(14,14,16,.06);
  --shadow: 0 12px 34px rgba(14,14,16,.10);
  --shadow-red: 0 12px 30px rgba(231,33,26,.32);
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); letter-spacing: -.01em; }
p { color: var(--ink-2); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.lead { font-size: 1.18rem; color: var(--muted); max-width: 640px; }
.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 1rem; padding: 15px 28px; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--red { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn--red:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--lg { padding: 18px 36px; font-size: 1.08rem; }
.btn--block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.nav__logo img { height: 40px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a { font-weight: 600; font-size: .98rem; color: var(--ink-2); transition: color .15s; }
.nav__links a:hover, .nav__links a.active { color: var(--red); }
.nav__cta { display: flex; align-items: center; gap: 16px; }
.nav__phone { font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.nav__phone:hover { color: var(--red); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px auto; transition: .25s; border-radius: 2px; }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 72px; background: radial-gradient(1200px 500px at 85% -10%, var(--red-soft), transparent 60%); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  padding: 8px 16px; border-radius: var(--radius-pill); font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(30,158,90,.16); }
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--red); }
.hero__sub { font-size: 1.22rem; color: var(--muted); margin-bottom: 30px; max-width: 540px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero__trust { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; font-weight: 600; }
.hero__trust .stars { color: #F5A623; letter-spacing: 2px; }

/* ---------- Smart form card ---------- */
.leadcard {
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px;
  box-shadow: var(--shadow); position: relative;
}
.leadcard__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.leadcard h3 { font-size: 1.3rem; }
.leadcard__step { font-size: .82rem; font-weight: 700; color: var(--muted-2); }
.leadcard__hint { font-size: .92rem; color: var(--muted); margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .84rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 4px var(--red-soft);
}
.field textarea { resize: vertical; min-height: 92px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-progress { height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin-bottom: 20px; }
.form-progress__bar { height: 100%; width: 33%; background: linear-gradient(90deg, var(--red), var(--red-dark)); border-radius: 99px; transition: width .4s var(--ease); }
.form-note { font-size: .8rem; color: var(--muted-2); margin-top: 12px; text-align: center; }
.form-status { font-size: .95rem; font-weight: 600; margin-top: 12px; text-align: center; display: none; }
.form-status.ok { display: block; color: var(--success); }
.form-status.err { display: block; color: var(--red); }

/* Instant estimate widget */
.estimate {
  margin-top: 6px; padding: 16px; background: var(--ink); color: #fff; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.estimate__label { font-size: .8rem; color: var(--muted-2); font-weight: 600; }
.estimate__val { font-size: 1.5rem; font-weight: 800; color: #fff; }
.estimate input[type=range] { width: 100%; accent-color: var(--red); }

/* ---------- Stat band ---------- */
.stats { background: var(--ink); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat__num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: #fff; letter-spacing: -.03em; }
.stat__num .unit { color: var(--red); }
.stat__label { color: var(--muted-2); font-size: .95rem; font-weight: 600; margin-top: 4px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 50px; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 28px; transition: transform .2s var(--ease), box-shadow .2s; }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step__num { font-size: 3rem; font-weight: 800; color: var(--red-soft); line-height: 1; position: absolute; top: 18px; right: 22px; }
.step__icon { width: 54px; height: 54px; border-radius: 14px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; margin-bottom: 18px; }
.step__icon svg { width: 26px; height: 26px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: .98rem; color: var(--muted); }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 46px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--paper); border: 1px solid transparent; transition: border-color .2s, background .2s; }
.feature:hover { background: #fff; border-color: var(--line); box-shadow: var(--shadow-sm); }
.feature__icon { width: 46px; height: 46px; border-radius: 12px; background: #fff; color: var(--red); display: grid; place-items: center; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feature p { font-size: .96rem; color: var(--muted); }

/* ---------- Comparison table ---------- */
.compare { margin-top: 46px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--line); font-size: .98rem; }
.compare thead th { background: var(--paper); font-weight: 800; font-size: .9rem; }
.compare thead th.nex { background: var(--ink); color: #fff; }
.compare tbody td.nex { background: var(--red-soft); font-weight: 700; color: var(--ink); }
.compare td:first-child { font-weight: 700; color: var(--ink); }
.compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--success); font-weight: 800; }
.compare .no { color: var(--muted-2); }

/* ---------- Split / agent CTA ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.split__pane { padding: 46px; }
.split__pane--seller { background: var(--paper); }
.split__pane--agent { background: var(--ink); color: #fff; }
.split__pane--agent h3, .split__pane--agent p { color: #fff; }
.split__pane--agent p { color: var(--muted-2); }
.split__pane h3 { font-size: 1.5rem; margin-bottom: 10px; }
.split__pane ul { list-style: none; margin: 18px 0 24px; }
.split__pane li { padding-left: 28px; position: relative; margin-bottom: 10px; font-size: .98rem; }
.split__pane li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }

/* ---------- Testimonials ---------- */
.quotes { margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.quote .stars { color: #F5A623; letter-spacing: 2px; margin-bottom: 12px; }
.quote p { font-size: 1.02rem; color: var(--ink-2); font-style: italic; }
.quote__who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.quote__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-weight: 800; }
.quote__name { font-weight: 700; font-size: .95rem; }
.quote__loc { font-size: .82rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 46px auto 0; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { width: 100%; text-align: left; background: none; border: 0; padding: 22px 0; font-size: 1.08rem; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq__q .icon { flex: 0 0 auto; width: 24px; height: 24px; position: relative; transition: transform .25s; }
.faq__q .icon::before, .faq__q .icon::after { content: ""; position: absolute; background: var(--red); border-radius: 2px; }
.faq__q .icon::before { top: 11px; left: 3px; width: 18px; height: 2px; }
.faq__q .icon::after { top: 3px; left: 11px; width: 2px; height: 18px; transition: transform .25s; }
.faq__item.open .faq__q .icon::after { transform: rotate(90deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq__a p { padding: 0 0 22px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; border-radius: var(--radius); padding: 56px; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.9); margin-bottom: 26px; max-width: 560px; margin-inline: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--muted-2); padding: 64px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.footer__logo img { height: 38px; margin-bottom: 16px; }
.footer p { color: var(--muted-2); font-size: .95rem; }
.footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a { font-size: .95rem; transition: color .15s; }
.footer a:hover { color: #fff; }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ink-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .84rem; }
.footer__legal { max-width: 720px; font-size: .78rem; color: #6a6a73; line-height: 1.5; margin-top: 18px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; gap: 38px; }
  .steps, .features, .quotes { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .split { grid-template-columns: 1fr; }
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: block; }
  .nav__links.open {
    display: flex; position: absolute; top: 78px; left: 0; right: 0; flex-direction: column;
    background: #fff; padding: 20px 24px 28px; gap: 8px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav__links.open a { padding: 12px 0; font-size: 1.1rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .cta-band { padding: 40px 24px; }
  .mobile-cta {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; gap: 10px; padding: 12px 16px;
    background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .mobile-cta .btn { flex: 1; padding: 14px; }
  body { padding-bottom: 74px; }
}
@media (max-width: 520px) {
  .field--row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .compare { overflow-x: auto; }
}
