/* karfisllc.com home page: rules used only by index.html.
   The "See it work" demo is a dark card (ink-2) sitting on the paper band, so
   its tokens are the same in light and dark mode. Everything else on the home
   page comes from site.css. Contract: karfisllc-ecc-redesign/DESIGN.md */

/* ---------- demo shell ---------- */
.demo { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: var(--r-md); color: var(--on-ink); box-shadow: var(--sh-3); overflow: hidden; }
.demo :focus-visible { outline-color: #ffd27a; }
.demo-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--ink-line); }
.demo-top .pill { background: rgba(255, 255, 255, 0.06); color: var(--on-ink-muted); border-color: var(--ink-line); }
.demo-status { margin: 0; font-size: var(--fs-sm); color: var(--on-ink-muted); min-height: 1.4em; }

/* tabs: 44px targets, state on aria-selected */
.demo-tabs { display: flex; flex-wrap: wrap; gap: var(--s1); padding: var(--s3) var(--s4) 0; border-bottom: 1px solid var(--ink-line); }
.demo-tab {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4);
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: var(--r-sm) var(--r-sm) 0 0;
  color: var(--on-ink-muted); font: 600 15px/1 var(--font-sans); cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease;
}
.demo-tab:hover { color: #ffffff; }
.demo-tab[aria-selected="true"] { color: #ffffff; border-bottom-color: var(--gold); }
.demo-tab .step-no { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--gold); }
.demo-panel { padding: var(--s5); }
.demo-panel[hidden] { display: none; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); align-items: start; }
@media (max-width: 820px) { .demo-grid { grid-template-columns: 1fr; gap: var(--s5); } }
.demo h3 { color: #ffffff; font-size: 18px; margin-bottom: var(--s2); }
.demo p { color: var(--on-ink-muted); }
.demo .small { font-size: var(--fs-sm); }

/* fields on ink (the mock booking widget) */
.demo .field label { color: var(--on-ink-muted); }
.demo .field input, .demo .field select { background: var(--ink); color: var(--on-ink); border-color: var(--ink-line); }
.demo .field input:focus-visible, .demo .field select:focus-visible { border-color: var(--gold); outline-color: #ffd27a; }
.demo .form { gap: var(--s3); }

/* demo controls: product-simulation controls, deliberately not .btn (CTA labels are reserved) */
.demo-action {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); width: 100%;
  min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-sm);
  background: var(--gold); color: var(--ink); border: 1.5px solid var(--gold);
  font: 600 15px/1 var(--font-sans); cursor: pointer; transition: background-color 0.15s ease, opacity 0.15s ease;
}
.demo-action:hover { background: #c8954a; }
.demo-action.is-quiet { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
.demo-action.is-quiet:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.demo-action[disabled] { opacity: 0.5; cursor: not-allowed; }
.demo-action[disabled]:hover { background: var(--gold); }
.demo-action.is-quiet[disabled]:hover { background: transparent; border-color: rgba(255, 255, 255, 0.35); }

/* quote result */
.demo-quote { background: var(--ink); border: 1px solid var(--ink-line); border-radius: var(--r-md); padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.demo-quote[hidden] { display: none; }
.demo-quote .quote-route { margin: 0 0 var(--s2); color: #ffffff; font-weight: 600; overflow-wrap: anywhere; }
.demo-quote .quote-fare { font-family: var(--font-mono); font-weight: 500; font-size: 30px; line-height: 1; color: var(--gold); margin: 0 0 var(--s1); font-variant-numeric: tabular-nums; }
.demo-quote .quote-note { margin: 0; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-ink-muted); }

/* dispatcher board */
.demo-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.demo-stat { background: var(--ink); border: 1px solid var(--ink-line); border-radius: var(--r-sm); padding: var(--s3) var(--s4); }
.demo-stat b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.1; color: var(--gold); }
.demo-stat span { display: block; font-size: var(--fs-xs); color: var(--on-ink-muted); margin-top: 2px; }
.demo-rides { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s2); }
.demo-ride { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); background: var(--ink); border: 1px solid var(--ink-line); border-radius: var(--r-sm); padding: var(--s3) var(--s4); min-height: 52px; }
.demo-ride.is-new { border-color: var(--gold); }
.demo-ride .ride-route { font-size: var(--fs-sm); font-weight: 600; color: #ffffff; min-width: 0; overflow-wrap: anywhere; }
.demo-pill { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; background: rgba(255, 255, 255, 0.06); color: var(--on-ink-muted); border: 1px solid var(--ink-line); }
.demo-pill.is-live { background: rgba(217, 180, 111, 0.14); color: var(--gold); border-color: transparent; }
.demo-pill.is-done { background: rgba(76, 201, 138, 0.14); color: #4cc98a; border-color: transparent; }
.demo-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.demo-feed li { margin: 0; display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--fs-sm); color: var(--on-ink-muted); }
.demo-feed li::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--gold); }

/* driver view */
.phone { max-width: 300px; margin: 0 auto; background: var(--ink); border: 1px solid var(--ink-line); border-radius: 28px; padding: var(--s6) var(--s4) var(--s5); box-shadow: var(--sh-2); }
.phone-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(217, 180, 111, 0.14); color: var(--gold); margin-bottom: var(--s4); }
.phone-badge.is-done { background: rgba(76, 201, 138, 0.14); color: #4cc98a; }
.phone-route { margin: 0 0 var(--s4); color: #ffffff; font-weight: 600; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.phone-route .arrow { display: block; color: var(--gold); font-family: var(--font-mono); margin: 2px 0; }
.phone-card { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: var(--r-sm); padding: var(--s3) var(--s4); margin-bottom: var(--s3); font-size: var(--fs-sm); color: #ffffff; }
.phone-card .label { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-ink-muted); margin-bottom: 2px; }
.phone .demo-action { margin-top: var(--s2); }
.demo-action + .small { margin-top: var(--s3); margin-bottom: 0; }

/* ---------- small page-level tweaks ---------- */
.price-more { margin-top: var(--s6); text-align: center; }
.proof-link { margin-top: var(--s2); margin-bottom: var(--s6); }

/* ---------- 2026-11-23 redesign: hero product stage ---------- */
.hero-v2 { padding: var(--s8) 0 var(--s9); }
.hero-v2 .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.hero-v2 h1 { max-width: 15ch; text-wrap: balance; }
.hero-v2 h1 .hl { color: var(--gold); }
.hero-v2 .lead { max-width: 34em; text-wrap: pretty; }
.stage { position: relative; padding: 0 0 168px 72px; }
.stage-board { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 16px; box-shadow: var(--sh-3); overflow: hidden; color: var(--on-ink); }
.stage-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--ink-line); background: rgba(255, 255, 255, 0.03); }
.stage-chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-line); }
.stage-chrome span { margin-left: var(--s3); font: 500 12px/16px var(--font-mono); color: var(--on-ink-muted); }
.stage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5) var(--s3); }
.stage-head b { display: block; color: #fff; font-size: 16px; }
.stage-head span { font-size: 13px; color: var(--on-ink-muted); }
.stage-alert { font: 500 12px/16px var(--font-mono); color: #ffd27a; background: rgba(255, 210, 122, 0.12); border: 1px solid rgba(255, 210, 122, 0.35); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.stage-rows { list-style: none; margin: 0; padding: 0 var(--s3) var(--s3); }
.stage-rows li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 10px 12px; border-radius: 10px; margin: 0; }
.stage-rows li + li { border-top: 1px solid var(--ink-line); }
.stage-time { font-size: 13px; color: var(--on-ink-muted); }
.stage-route { color: #fff; font-size: 14px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-route small { display: block; color: var(--on-ink-muted); font-size: 12px; font-weight: 400; }
.stage-pill { font: 500 12px/16px var(--font-sans); padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--on-ink-muted); white-space: nowrap; }
.stage-pill.is-live { background: rgba(217, 180, 111, 0.16); color: var(--gold); }
.stage-pill.is-ok { background: rgba(76, 201, 138, 0.14); color: #4cc98a; }
.stage-pill.is-warn { background: rgba(255, 138, 128, 0.14); color: #ff9d94; }
.stage-phone { position: absolute; left: 0; bottom: 0; width: 184px; background: #0b0e17; border: 1px solid var(--ink-line); border-radius: 22px; padding: var(--s4); box-shadow: var(--sh-3); color: var(--on-ink); }
.stage-phone-badge { display: inline-block; font: 500 11px/16px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--s2); }
.stage-phone p { margin: 0 0 var(--s3); font-size: 13px; color: var(--on-ink-muted); line-height: 1.4; }
.stage-phone p b { display: block; color: #fff; font-size: 15px; }
.stage-phone-btn { display: block; text-align: center; background: transparent; border: 1px solid var(--gold); color: var(--gold); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.stage-track { position: absolute; right: 0; bottom: 8px; display: flex; gap: var(--s3); align-items: center; background: #fbfaf7; color: #14161d; border-radius: 14px; padding: 10px 14px; box-shadow: var(--sh-3); max-width: 270px; }
.stage-track svg { width: 64px; height: 30px; color: #7d5a1e; flex: none; }
.stage-track p { margin: 0; font-size: 12px; color: #585a66; line-height: 1.35; }
.stage-track p b { display: block; color: #14161d; font-size: 13px; }
.stage-note { position: absolute; top: -26px; right: 0; margin: 0; font: 500 12px/16px var(--font-mono); color: var(--on-ink-muted); letter-spacing: 0.06em; text-transform: uppercase; }
@media (max-width: 1099px) {
  .hero-v2 .hero-grid { grid-template-columns: 1fr; }
  .stage { padding: var(--s5) 0 0; }
  .stage-note { top: 0; }
  .stage-phone, .stage-track { position: static; width: auto; max-width: none; margin-top: var(--s3); }
  .stage-phone { display: none; }
}
@media (max-width: 480px) { .stage-rows li { grid-template-columns: minmax(0, 1fr) auto; } .stage-time { display: none; } }

/* entrance: rises once into place; reduced motion keeps it still */
@media (prefers-reduced-motion: no-preference) {
  .stage-board, .stage-phone, .stage-track { animation: stage-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .stage-phone { animation-delay: 0.18s; }
  .stage-track { animation-delay: 0.32s; }
}
@keyframes stage-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- nine modules ---------- */
.module-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .module-grid { grid-template-columns: 1fr; } }
.module h3 { font-size: 18px; margin-bottom: var(--s2); }
.module p { margin: 0; color: var(--muted); font-size: 15px; }
a.card.module:hover { border-color: var(--gold); transform: translateY(-2px); }

/* ---------- tagline reveal ---------- */
.tagline-band { padding: var(--s9) 0; }
.tagline { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.15; letter-spacing: -0.015em; max-width: 22ch; margin: 0 auto; text-align: center; text-wrap: balance; color: var(--text); }
.tagline.is-armed span { opacity: 0.28; transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.tagline.is-armed span.is-on { opacity: 1; }

/* ---------- photo-led preview (2026-11-23) ---------- */
.hero-photo { background: var(--paper); padding: 56px 0 96px; }
.hp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero-photo h1 { color: var(--text); max-width: 15ch; text-wrap: balance; margin-bottom: var(--s4); }
.hero-photo h1 .hl { color: var(--gold-ink); }
.hero-photo .lead { color: var(--muted); max-width: 34em; text-wrap: pretty; font-size: 18px; }
.hp-trust { list-style: none; margin: 0; padding: var(--s4) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--s2); }
.hp-trust li { margin: 0; display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: 14px; font-weight: 500; }
.hp-trust li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hp-visual { position: relative; }
.hp-photo { border-radius: 24px; overflow: hidden; box-shadow: var(--sh-3); aspect-ratio: 1 / 1.08; }
.hp-photo picture, .hp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* cards sit on the photo, so their colours stay fixed in both themes */
.hp-card { position: absolute; background: rgba(251, 250, 247, 0.94); color: #14161d; border-radius: 16px; padding: 14px 16px; box-shadow: 0 24px 60px -24px rgba(16, 19, 31, 0.55); font-size: 13px; line-height: 1.4; }
.hp-card b { display: block; font-size: 15px; color: #14161d; }
.hp-card span { color: #585a66; }
.hp-card-label { display: block; font: 500 11px/16px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #7d5a1e !important; margin-bottom: 2px; }
.hp-card-ride { left: -40px; bottom: 56px; min-width: 240px; }
.hp-card-track { right: -20px; top: 40px; display: flex; gap: var(--s3); align-items: center; }
.hp-card-track b { font-size: 14px; }
.hp-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #157a4d; box-shadow: 0 0 0 5px rgba(21, 122, 77, 0.18); }
@media (prefers-reduced-motion: no-preference) {
  .hp-photo { animation: stage-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hp-card-ride { animation: stage-in 0.8s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hp-card-track { animation: stage-in 0.8s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
@media (max-width: 960px) {
  .hp-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { padding: 32px 0 64px; }
  .hp-card-ride { left: 12px; bottom: 12px; min-width: 0; }
  .hp-card-track { right: 12px; top: 12px; }
}
@media (max-width: 480px) { .hp-card-track { display: none; } .hp-photo { aspect-ratio: 4 / 3.4; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split + .split { margin-top: 96px; }
.split.is-flipped .split-media { order: 2; }
.split-media picture, .split-media img { display: block; width: 100%; border-radius: 20px; }
.split-media img { aspect-ratio: 4 / 4.4; object-fit: cover; box-shadow: var(--sh-2); }
.split-copy h2 { margin-bottom: var(--s4); }
.split-copy .check-list { margin: 0 0 var(--s5); }
.split-board .stage { padding: 0; }
.split-board .stage-phone, .split-board .stage-track { display: none; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .split.is-flipped .split-media { order: 0; } .split + .split { margin-top: 64px; } }

/* ---------- high-end layer (preview, 2026-11-23): editorial luxury ---------- */
/* warm cream base in light mode; dark mode keeps the existing tokens */
/* film grain: fixed, non-interactive, never on a scrolling layer */

/* floating island nav (home only) */

/* pill tag above the hero heading */
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font: 500 11px/16px var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: var(--s5); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.is-home .hero-photo h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -0.025em; }

/* pill buttons with the arrow in its own circle */
.btn-pill { border-radius: 999px; padding-left: 24px; padding-right: 24px; gap: 10px; transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease; }
.btn-pill:active { transform: scale(0.97); }
.btn-pill:has(.btn-ic) { padding-right: 6px; }
.btn-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(16, 19, 31, 0.12); transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn-pill:hover .btn-ic { transform: translate(2px, -1px) scale(1.05); } }

/* double bezel: a hairline tray around the image or card */
.bezel { padding: 8px; border-radius: 32px; background: rgba(20, 22, 29, 0.035); border: 1px solid rgba(20, 22, 29, 0.06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bezel { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); } }
.bezel > .hp-photo, .bezel > picture, .bezel img { border-radius: 24px; }
.hp-bezel .hp-photo { box-shadow: 0 40px 80px -40px rgba(16, 19, 31, 0.45); }
.split-media.bezel img { box-shadow: none; }

/* module cards: softer, airier, inner highlight */
.is-home .module { border-radius: 24px; border-color: rgba(20, 22, 29, 0.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 20px 40px -32px rgba(16, 19, 31, 0.3); transition: transform 240ms var(--ease-out), border-color 200ms ease; }
.is-home .module:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .is-home a.card.module:hover { transform: translateY(-3px); border-color: var(--gold); } }
.is-home .module .card-icon { border-radius: 14px; }

/* scroll reveal: only armed when JS runs, once per element, transform + opacity only */
.reveal-armed [data-rv] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal-armed [data-rv].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal-armed [data-rv] { transform: none; transition: opacity 0.3s ease; } }
@media (max-width: 520px) {
  .tag { font-size: 10px; letter-spacing: 0.1em; padding: 5px 12px; }
}
/* impeccable audit fixes: icon beside heading, readable note on light bands */
.is-home .module { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; align-items: start; }
.is-home .module .card-icon { grid-row: span 2; margin: 0; background: transparent; border: 1px solid var(--line); }
.is-home .module h3 { margin-top: 8px; }
.split-board .stage-note { position: static; text-align: right; margin-bottom: 8px; color: var(--muted); }
.is-home .hero-photo h1 { margin-top: 8px; }
