/* Lapelly homepage — portrait-studio editorial theme (see /.impeccable.md).
   Scoped to body.home so the rest of the site is untouched until approved.
   Serif display (Source Serif 4) + Public Sans; warm paper, navy ink, one blue.
   Hairlines instead of shadows; small radii; motion only where it explains. */

body.home {
  --paper: #FAF8F4;
  --paper-2: #F2EFE8;
  --ink: #15223A;
  --ink-soft: #3F4B5E;
  --muted: #6A7282;
  --hair: #E3DED4;
  --accent: #1F4FD8;
  --accent-deep: #173DAA;
  --night: #13233F;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}
body.home h1, body.home h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
body.home h3 { font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
body.home a { color: var(--accent); }

/* header */
body.home .site-header { background: var(--paper); border-bottom: 1px solid var(--hair); box-shadow: none; }
body.home .nav-links a { color: var(--ink-soft); font-weight: 500; }
body.home .gbtn { border-radius: 8px; border: 1px solid var(--hair); background: #fff; box-shadow: none; }

/* ── hero ─────────────────────────────────────────────── */
body.home .hw-hero { background: none; padding: clamp(28px, 5vw, 64px) 0 clamp(36px, 5vw, 56px); }
.hm-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: center; margin-bottom: clamp(32px, 5vw, 56px); }
.hm-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: .9rem; font-weight: 600; color: var(--accent); }
.hm-kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hm-kicker.on-dark { color: #9DB5F2; }
body.home .hm-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); line-height: 1.08; margin: 0 0 20px; max-width: 17ch; }
.hm-lede { font-size: clamp(1.05rem, 1.4vw, 1.18rem); line-height: 1.6; color: var(--ink-soft); max-width: 34rem; margin: 0 0 28px; }
.hm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 24px; border-top: 1px solid var(--hair); max-width: 34rem; }
.hm-facts div { padding: 14px 16px 0 0; }
.hm-facts dt { font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.hm-facts dd { margin: 0; font-weight: 600; font-size: .95rem; }
.hm-team-line { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.hm-team-line a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* before / after compare */
.hm-compare { margin: 0; justify-self: end; width: 100%; max-width: 480px; }
.hm-compare-frame { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; background: var(--paper-2); }
.hm-compare-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.hm-compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.hm-compare-knob { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #fff; border: 1px solid rgba(21,34,58,.15); }
.hm-compare-knob::before, .hm-compare-knob::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: solid var(--ink); border-width: 0 0 2px 2px; }
.hm-compare-knob::before { left: 9px; transform: rotate(45deg); }
.hm-compare-knob::after { right: 9px; transform: rotate(-135deg); }
.hm-compare-tag { position: absolute; bottom: 12px; padding: 4px 8px; border-radius: 4px; font-size: .75rem; font-weight: 600; background: rgba(250,248,244,.92); color: var(--ink); pointer-events: none; }
.hm-compare-tag.before { left: 12px; }
.hm-compare-tag.after { right: 12px; }
.hm-compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.hm-compare-range:focus-visible + * { outline: none; }
.hm-compare-frame:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.hm-compare figcaption { margin-top: 10px; font-size: .8rem; color: var(--muted); line-height: 1.45; }

/* workbench: flatten the chrome */
body.home .hw-shell { border: 1px solid var(--hair); border-radius: 10px; box-shadow: none; background: #fff; }
body.home .hw-topbar { border-bottom: 1px solid var(--hair); background: var(--paper); }
body.home .hw-tab { border-radius: 6px; font-weight: 600; }
body.home .hw-tab.active { background: #fff; box-shadow: none; border: 1px solid var(--hair); }
body.home .hw-top-meta span { display: none; }
body.home .st-dark-cta, body.home .hw-gen-btn, body.home #hw-gen-btn { border-radius: 8px; box-shadow: none; background: var(--accent); }
body.home .st-dark-cta:hover, body.home #hw-gen-btn:hover { background: var(--accent-deep); }
body.home .hw-privacy-note { color: var(--muted); font-weight: 400; }
body.home .hw-privacy-note a { color: var(--muted); }

/* ── results marquee ──────────────────────────────────── */
.hm-results { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); border-top: 1px solid var(--hair); }
.hm-section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 32px; }
body.home .hm-section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.1; margin: 0; text-align: left; }
.hm-section-head p { margin: 0; color: var(--ink-soft); max-width: 30rem; justify-self: end; }
.hm-marquee { display: flex; overflow: hidden; gap: 14px; padding: 0 0 4px; }
.hm-marquee-track { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; flex-shrink: 0; animation: hm-scroll 70s linear infinite; }
.hm-marquee:hover .hm-marquee-track { animation-play-state: paused; }
.hm-marquee-track li { width: clamp(150px, 15vw, 210px); flex-shrink: 0; }
.hm-marquee-track img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; background: var(--paper-2); }
@keyframes hm-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 14px)); } }
@media (prefers-reduced-motion: reduce) {
  .hm-marquee { overflow-x: auto; }
  .hm-marquee-track { animation: none; }
  .hm-marquee-track[aria-hidden="true"] { display: none; }
}
.hm-uses { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.hm-uses li { border-top: 1px solid var(--ink); padding-top: 14px; }
.hm-uses h3 { font-size: 1rem; margin: 0 0 6px; }
.hm-uses p { margin: 0; font-size: .93rem; color: var(--ink-soft); line-height: 1.55; }

/* ── teams band ───────────────────────────────────────── */
.hm-teams { background: var(--night); color: #D7DEEA; padding: clamp(56px, 8vw, 96px) 0; }
.hm-teams-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
body.home .hm-teams h2 { color: #FAF8F4; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.1; margin: 0 0 18px; text-align: left; }
.hm-teams-lede { font-size: 1.05rem; line-height: 1.65; margin: 0 0 28px; max-width: 32rem; }
.hm-btn-light { display: inline-block; padding: 13px 22px; border-radius: 8px; background: #FAF8F4; color: var(--night) !important; font-weight: 600; text-decoration: none !important; }
.hm-btn-light:hover { background: #fff; }
.hm-cost { margin: 0; }
.hm-cost > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-top: 1px solid rgba(215,222,234,.22); }
.hm-cost dt { font-size: .95rem; }
.hm-cost dd { margin: 0; font-family: var(--serif); font-size: 1.9rem; color: #FAF8F4; text-align: right; line-height: 1.1; }
.hm-cost dd span { display: block; font-family: var(--sans); font-size: .8rem; color: #9FAEC6; margin-top: 4px; }
.hm-cost .ours dt { color: #FAF8F4; font-weight: 600; }
.hm-cost .ours dd { color: #9DB5F2; }
.hm-cost-src { font-size: .75rem; color: #8494AE; margin: 6px 0 0; border-top: 1px solid rgba(215,222,234,.22); padding-top: 12px; }
.hm-cost-src a { color: #B6C6E6; }

/* ── shared sections on the homepage ──────────────────── */
body.home .section { padding: clamp(56px, 7vw, 88px) 0; }
body.home .section.alt { background: var(--paper-2); }
body.home .section h2 { text-align: left; font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 8px; }
body.home .section .sub { text-align: left; margin: 0 0 32px; color: var(--ink-soft); }
body.home .plan { border-radius: 8px; box-shadow: none; border: 1px solid var(--hair); background: #fff; }
body.home .plan.feature { border-color: var(--ink); box-shadow: none; }
body.home .plan .price { font-family: var(--serif); font-weight: 600; }
body.home .btn { border-radius: 8px; box-shadow: none; }
body.home .btn:not(.btn-ghost) { background: var(--accent); }
body.home .seo-country-link { border-radius: 6px; box-shadow: none; border: 1px solid var(--hair); background: #fff; }
body.home details { border-radius: 6px; box-shadow: none; border-color: var(--hair); }
body.home .callout { border-radius: 6px; border-left: 0; border: 1px solid var(--hair); background: #fff; }
body.home .site-footer { background: var(--night); }

/* ── responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hm-hero, .hm-teams-grid, .hm-section-head { grid-template-columns: 1fr; }
  .hm-compare { justify-self: start; max-width: 520px; }
  .hm-section-head p { justify-self: start; }
  .hm-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  body.home .hm-hero h1 { max-width: none; }
  .hm-facts { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .hm-uses { grid-template-columns: 1fr; gap: 20px; }
  .hm-cost dd { font-size: 1.5rem; }
}

/* ── review fixes ─────────────────────────────────────── */
body.home .btn:not(.btn-ghost) { color: #fff; }
body.home .btn:not(.btn-ghost):hover { background: var(--accent-deep); text-decoration: none; }
body.home .plan .price small { font-family: var(--sans); font-weight: 500; }
body.home .seo-country-grid { margin-left: 0; margin-right: 0; max-width: none; }
body.home .hw-trust-pill, body.home .hw-trust-pill.sage { background: transparent; border: 1px solid var(--hair); color: var(--ink-soft); }
body.home .hm-teams .hm-cost-src a { color: #B6C6E6; }

/* Mobile: tool first. Copy → workbench → compare; facts live in the workbench. */
@media (max-width: 900px) {
  body.home .hw-hero > .container { display: flex; flex-direction: column; }
  body.home .hm-hero { display: contents; }
  body.home .hm-hero-copy { order: 1; margin-bottom: 20px; }
  body.home .hw-shell { order: 2; }
  body.home .hm-compare { order: 3; margin-top: 32px; }
  body.home .hm-facts, body.home .hm-team-line { display: none; }
  body.home .hm-lede { margin-bottom: 0; }
  body.home .hw-top-meta { display: none; }
}
