/* ==========================================================================
   Ink or Walk: brand layer (Phase 2 redesign)
   Loaded AFTER styles.css on every page. It re-skins the existing
   components (nav, buttons, cards, footer, wizard) and adds the new
   homepage sections. All class names used by app.js / wizard.js / hq.js
   are left untouched.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --navy: #101828;
  --navy-2: #162236;
  --navy-3: #22314a;
  --cream: #faf9f6;
  --cream-dark: #eeeae0;
  --paper: #ffffff;
  --ink: #101828;
  --ink-soft: #3a4556;
  --muted: #667085;
  --muted-light: #677080;
  --green: #157347;
  --green-dark: #0f5c3a;
  --green-darker: #0b4f25;
  --green-tint: #edf7f0;
  --red: #b42318;
  --red-dark: #912018;
  --red-tint: #fef3f2;
  --border: #e8e4da;
  --border-strong: #cfc8b8;
  --radius: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 2px 8px rgba(14,23,38,.06);
  --shadow-md: 0 8px 24px rgba(14,23,38,.08), 0 2px 8px rgba(14,23,38,.04);
  --shadow-lg: 0 24px 60px rgba(14,23,38,.12);
  --font-sans: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body { background: var(--cream); color: var(--ink); font-size: 17px; font-family: var(--font-sans); }
h1, h2, h3 { font-family: var(--font-sans); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; color: var(--ink); }
.price, .amt { font-variant-numeric: tabular-nums; }
a { color: var(--green-dark); }

/* ---------- Nav ---------- */
.nav { padding: 18px 0; border-bottom: 1px solid var(--border); }
.nav .brand-name { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--ink); }
.nav .links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav .links a:hover { color: var(--ink); }
/* Fix: nav CTA text was green-on-green (unreadable). */
.nav .links a.nav-cta, .nav .links a.btn-green { color: #fff !important; background: var(--green); border-color: var(--green); }
.nav .links a.nav-cta:hover { background: var(--green-dark); }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: 0; padding: 14px 32px; transition: background .15s ease, box-shadow .15s ease; }
.btn:focus-visible { outline: 3px solid var(--green-tint); outline-offset: 3px; }
.btn-green { background: var(--green); border: 2px solid var(--green); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; border: 2px solid #fff; color: var(--navy); }
.btn-light:hover { background: var(--cream); }
.btn-ghost-light { background: transparent; border: 2px solid rgba(255,255,255,.55); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-xl { font-size: 17px; padding: 16px 32px; }

/* ---------- Generic section scaffolding (new pages) ---------- */
.iw-section { padding: 112px 0; }
.iw-section.tight { padding: 64px 0; }
.iw-eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--green-dark); margin-bottom: 14px; }
.iw-eyebrow.on-dark { color: var(--highlight); }
.iw-h2 { font-family: var(--font-serif); font-size: clamp(30px, 4vw, 44px); line-height: 1.12; margin: 0 0 16px; }
.iw-lead { font-size: 19px; color: var(--muted); max-width: 680px; margin: 0 0 32px; }
.iw-center { text-align: center; }
.iw-center .iw-lead { margin-left: auto; margin-right: auto; }
.iw-mark { background: linear-gradient(transparent 62%, var(--highlight) 62%); padding: 0 .08em; }
.iw-grid-2 { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.iw-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.iw-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.iw-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-md); }
.iw-note { font-size: 13px; color: var(--muted-light); }

/* ---------- Hero ---------- */
.iw-hero { padding: 72px 0 80px; }
.iw-hero h1 { font-family: var(--font-serif); font-size: clamp(40px, 6vw, 68px); line-height: 1.02; margin: 0 0 22px; letter-spacing: -0.025em; }
.iw-hero .iw-sub { font-size: 20px; color: var(--ink-soft); max-width: 560px; margin: 0 0 30px; }
.iw-cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 26px; }
.iw-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; font-size: 15px; color: var(--ink-soft); font-weight: 600; }
.iw-trust li { display: flex; align-items: center; gap: 8px; }
.iw-trust li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M8.2 13.6 4.6 10l-1.2 1.2 4.8 4.8 9-9-1.2-1.2z'/%3E%3C/svg%3E") center/14px no-repeat; flex: none; }

/* Deal sheet mock (illustrative) */
.iw-sheet { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); padding: 26px 26px 20px; position: relative; transform: rotate(-1.2deg); max-width: 470px; margin-left: auto; }
.iw-sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 8px; }
.iw-sheet-head b { font-family: var(--font-serif); font-size: 19px; }
.iw-sheet-head span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.iw-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.iw-line .amt { font-variant-numeric: tabular-nums; font-weight: 700; }
.iw-line.iw-flag { background: var(--red-tint); margin: 0 -10px; padding: 9px 10px; border-radius: 8px; border-bottom-color: transparent; }
.iw-line.iw-flag .why { display: block; font-size: 12.5px; color: var(--red-dark); font-weight: 600; margin-top: 2px; }
.iw-line.ok .amt { color: var(--green-dark); }
.iw-stamp { position: absolute; right: -24px; bottom: -64px; width: 150px; height: 150px; border-radius: 50%; border: 6px double var(--red); color: var(--red); display: grid; place-items: center; font-family: var(--font-serif); font-weight: 800; font-size: 40px; letter-spacing: .06em; transform: rotate(-14deg); background: rgba(255,255,255,.95); box-shadow: 0 12px 32px rgba(180,35,24,.25); }
.iw-sheet-foot { font-size: 12px; color: var(--muted-light); margin-top: 12px; }

/* ---------- Trust pills (deal-site pattern) ---------- */
.trust-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--green-tint); color: var(--green-dark); border: 1px solid #c6e6d0; border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.trust-pill a { color: var(--green-dark); font-weight: 700; }

/* ---------- Problem: same car, three prices ---------- */
.iw-dark { background: var(--navy); color: #e8ecf3; }
.iw-dark h2, .iw-dark h3 { color: #fff; }
.iw-dark .iw-lead { color: #b7c1d1; }
.iw-buyer { background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: var(--radius-lg); padding: 28px; }
.iw-buyer .who { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: #8fa0b8; font-weight: 700; }
.iw-buyer .price { font-family: var(--font-serif); font-size: 40px; color: #fff; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.iw-buyer p { margin: 0; color: #b7c1d1; font-size: 15.5px; }
.iw-buyer.best { border-color: #2f7d4f; }
.iw-buyer.best .price { color: #7ee2a8; }
.iw-buyer.worst { border-color: #8a3a32; }
.iw-buyer.worst .price { color: #ff9b8f; }
.iw-punch { font-family: var(--font-serif); font-size: clamp(22px, 2.6vw, 30px); color: #fff; margin: 40px auto 0; max-width: 760px; text-align: center; line-height: 1.3; }

/* ---------- What we check ---------- */
.iw-check { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.iw-check h3 { font-size: 17px; margin: 0 0 6px; font-family: var(--font-sans); font-weight: 800; }
.iw-check p { margin: 0; font-size: 15px; color: var(--muted); }
.iw-check .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--green-tint); color: var(--green-dark); display: grid; place-items: center; font-weight: 900; margin-bottom: 14px; font-size: 18px; }

/* ---------- Steps ---------- */
.iw-step { position: relative; padding-top: 8px; }
.iw-step .num { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; margin-bottom: 16px; }
.iw-step h3 { font-family: var(--font-serif); font-size: 23px; margin: 0 0 8px; }
.iw-step p { color: var(--muted); margin: 0; }

/* ---------- Pricing cards ---------- */
.iw-price { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; position: relative; }
.iw-price.featured { background: #101828; border: none; color: #fff; }
.iw-price.featured h3 { color: #fff; }
.iw-price.featured .amt { color: #fff; font-size: 48px; font-weight: 500; }
.iw-price.featured .for { color: #cbd5e1; }
.iw-price.featured ul { color: #cbd5e1; }
.iw-price.featured li { border-top: 1px solid rgba(255,255,255,.1); }
.iw-price.featured li::before { color: var(--green); }
.iw-price .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.iw-price h3 { margin: 0; font-size: 19px; font-family: var(--font-sans); font-weight: 600; }
.iw-price .amt { font-family: var(--font-sans); font-size: 48px; font-weight: 500; margin: 10px 0 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.iw-price .for { color: var(--muted); font-size: 15px; margin: 0 0 16px; min-height: 46px; }
.iw-price ul { list-style: none; padding: 0; margin: 0 0 22px; font-size: 15px; }
.iw-price li { padding: 7px 0 7px 26px; position: relative; border-top: 1px solid var(--cream-dark); }
.iw-price li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 900; }
.iw-price .btn { margin-top: auto; text-align: center; }

/* ---------- Story ---------- */
.iw-story { background: var(--cream-dark); }
.iw-story blockquote { margin: 0; font-family: var(--font-serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.42; color: var(--ink); }
.iw-story .sig { margin-top: 22px; font-weight: 700; color: var(--ink-soft); }
.iw-promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.iw-promises li { background: #fff; border-radius: var(--radius); padding: 18px 20px 18px 56px; position: relative; border: 1px solid var(--border); font-weight: 600; }
.iw-promises li::before { content: ""; position: absolute; left: 18px; top: 18px; width: 24px; height: 24px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M8.2 13.6 4.6 10l-1.2 1.2 4.8 4.8 9-9-1.2-1.2z'/%3E%3C/svg%3E") center/16px no-repeat; }
.iw-promises li span { display: block; font-weight: 400; color: var(--muted); font-size: 15px; margin-top: 2px; }

/* ---------- Verdict ---------- */
.iw-verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.iw-verdict { border-radius: var(--radius-lg); padding: 30px; background: #fff; border: 2px solid var(--green); }
.iw-verdict.walk { border-color: var(--red); }
.iw-verdict .word { font-family: var(--font-serif); font-size: 44px; font-weight: 800; letter-spacing: .06em; color: var(--green); }
.iw-verdict.walk .word { color: var(--red); }
.iw-verdict p { margin: 6px 0 0; color: var(--ink-soft); }

/* ---------- Guarantee ---------- */
.iw-guarantee { background: var(--navy); color: #e8ecf3; border-radius: 24px; padding: 48px; display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.iw-guarantee .seal { width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--highlight); color: var(--highlight); display: grid; place-items: center; text-align: center; font-weight: 900; font-size: 13px; letter-spacing: .1em; line-height: 1.25; }
.iw-guarantee h2 { color: #fff; font-family: var(--font-serif); margin: 0 0 10px; font-size: clamp(26px, 3vw, 34px); }
.iw-guarantee p { margin: 0 0 6px; color: #c2cbd8; }

/* ---------- FAQ ---------- */
.iw-faq { max-width: 820px; margin: 0 auto; }
.iw-faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; padding: 0 22px; }
.iw-faq summary { cursor: pointer; font-weight: 700; padding: 20px 28px 20px 0; list-style: none; position: relative; font-size: 17px; }
.iw-faq summary::-webkit-details-marker { display: none; }
.iw-faq summary::after { content: "+"; position: absolute; right: 0; top: 16px; font-size: 24px; color: var(--muted); }
.iw-faq details[open] summary::after { content: "–"; }
.iw-faq details p { margin: 0 0 20px; color: var(--muted); }

/* ---------- Final CTA ---------- */
.iw-final { text-align: center; padding: 96px 0; }
.iw-final h2 { font-family: var(--font-serif); font-size: clamp(34px, 5vw, 56px); margin: 0 0 14px; line-height: 1.05; }
.iw-final p { font-size: 19px; color: var(--muted); margin: 0 auto 30px; max-width: 560px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); }
.footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.footer .brand-name { font-family: var(--font-serif); }

/* ---------- Existing inner pages: lift the look ---------- */
.hero h1, .page-hero h1, main > h1 { font-family: var(--font-serif); letter-spacing: -0.02em; }
.service-card, .card { border-radius: var(--radius-lg); }
.wiz-step h2 { font-family: var(--font-serif); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .iw-grid-2 { grid-template-columns: 1fr; gap: 44px; }
  .iw-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .iw-sheet { margin: 0 auto; transform: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .iw-section { padding: 60px 0; }
  .iw-hero { padding: 40px 0 56px; }
  .iw-hero .iw-sub { font-size: 18px; }
  .iw-grid-3, .iw-grid-4, .iw-verdicts { grid-template-columns: 1fr; }
  .iw-cta-row .btn { width: 100%; text-align: center; }
  .iw-guarantee { grid-template-columns: 1fr; padding: 32px 24px; text-align: center; }
  .iw-guarantee .seal { margin: 0 auto; }
  .iw-stamp { width: 112px; height: 112px; font-size: 30px; right: 2px; bottom: -58px; }
  .iw-buyer .price { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn-green:hover { transform: none; } }

/* ---------- HQ sign-in gate ---------- */
#gate .card { padding: 36px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
#gate h1 { font-size: 34px; margin-top: 0; }
#gate label { display: block; font-weight: 600; font-size: 15px; margin: 16px 0 0; color: var(--ink-soft); }
#gate input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1.5px solid var(--border-strong); border-radius: 10px; background: #fff; }
#gate input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(21,128,61,.18); }
#gate .btn-row .btn { width: 100%; margin-top: 18px; background: var(--ink); color: #fff; border: 2px solid var(--ink); }
#gate .btn-row .btn:hover { background: var(--navy-3); }

/* ---------- Attention & Retention: Sticky CTA Bar ---------- */
.iw-sticky-cta { position: fixed; bottom: 0; left: 0; right: 0; background: var(--navy); color: #fff; padding: 12px 20px; display: flex; align-items: center; justify-content: center; gap: 16px; z-index: 1000; transform: translateY(100%); transition: transform .3s ease; box-shadow: 0 -4px 20px rgba(0,0,0,.15); }
.iw-sticky-cta.visible { transform: translateY(0); }
.iw-sticky-cta .msg { font-size: 15px; font-weight: 600; }
.iw-sticky-cta .btn { padding: 10px 24px; font-size: 15px; }
@media (max-width: 640px) { .iw-sticky-cta .msg { display: none; } }

/* Codex accessibility polish: preserve visible keyboard focus and touch comfort. */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #b7791f;
  outline-offset: 4px;
}
.btn, .nav-toggle { min-height: 44px; }
.iw-sheet { color: var(--ink); }
@media (max-width: 640px) {
  .iw-hero h1 { font-size: clamp(38px, 10vw, 52px); line-height: 1.08; }
  .iw-trust { line-height: 1.6; }
}

/* ---------- Customer reviews (real, moderated) ---------- */
.iw-testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0; }
.iw-testimonial { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.iw-testimonial .stars { color: var(--gold); font-size: 18px; margin-bottom: 12px; letter-spacing: 2px; }
.iw-testimonial blockquote { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 16px; font-style: italic; }
.iw-testimonial .author { font-weight: 700; font-size: 14px; }
.iw-testimonial .detail { font-size: 13px; color: var(--muted); }
@media (max-width: 800px) { .iw-testimonials { grid-template-columns: 1fr; } }
