/* =====================================================================
   CarSiq — veřejný web (úvodní stránka + světlá varianta)
   Tmavá varianta = výchozí tokeny z app.css. Světlá (html[data-theme=light])
   je inspirovaná přehledností velkých inzertních portálů: světle šedé
   pozadí, bílé zaoblené karty, tmavě fialová a oranžovočervená akce.
   ===================================================================== */

/* ------------------------------------------------------- světlé tokeny */
html[data-theme="light"] {
  color-scheme: light;
  --bg-0: #e9ebf2;
  --bg-1: #ffffff;
  --bg-2: #f4f5f9;
  --bg-3: #eceef4;
  --ink:   #16161f;
  --ink-2: #3b3c4a;
  --ink-3: #5f6170;
  --ink-4: #8a8c99;
  --line-1: #e1e3ea;
  --line-2: #d3d6df;
  --line-3: #b9bdc9;
  --glass:  #ffffff;
  --glass-2:#f4f5f9;
  --brand:      #e5401f;
  --brand-dim:  rgba(229,64,31,.10);
  --brand-soft: #ff6a3d;
  --violet:     #3c0f5f;
  --violet-dim: rgba(60,15,95,.09);
  --green: #13804a; --green-dim: rgba(19,128,74,.10);
  --amber: #b26a00; --amber-dim: rgba(178,106,0,.11);
  --red:   #d0252f; --red-dim:   rgba(208,37,47,.09);
  --blue:  #1f63c6; --blue-dim:  rgba(31,99,198,.09);
  --slate: #5f6170; --slate-dim: rgba(95,97,112,.10);
  --shadow-1: 0 1px 2px rgba(22,22,31,.05), 0 6px 20px rgba(22,22,31,.06);
  --shadow-2: 0 2px 6px rgba(22,22,31,.06), 0 24px 60px rgba(22,22,31,.12);
}
html[data-theme="light"] body { background: var(--bg-0); font-weight: 400; }
html[data-theme="light"] .aurora { display: none; }
html[data-theme="light"] ::selection { background: rgba(229,64,31,.2); }
html[data-theme="light"] *::-webkit-scrollbar-thumb { background: rgba(22,22,31,.18); background-clip: content-box; }
html[data-theme="light"] .site-nav { background: rgba(255,255,255,.92); border-bottom-color: var(--line-1); }
html[data-theme="light"] .site-nav__links { color: var(--ink); font-weight: 500; }
html[data-theme="light"] .btn { background: #fff; border-color: var(--line-2); color: var(--ink); font-weight: 500; }
html[data-theme="light"] .btn:hover { background: var(--bg-2); border-color: var(--line-3); }
html[data-theme="light"] .btn--ghost { background: transparent; border-color: transparent; }
html[data-theme="light"] .btn--primary { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: none; }
html[data-theme="light"] .btn--primary:hover { background: #52197e; box-shadow: 0 8px 20px rgba(60,15,95,.25); }
html[data-theme="light"] .card, html[data-theme="light"] .feature { background: #fff; border-color: var(--line-1); box-shadow: var(--shadow-1); }
html[data-theme="light"] .bar { background: var(--bg-3); }
html[data-theme="light"] .chip { background: var(--bg-2); }
html[data-theme="light"] .input, html[data-theme="light"] .select, html[data-theme="light"] .textarea { background: #fff; border-color: var(--line-2); color: var(--ink); }
html[data-theme="light"] .flash--ok   { color: #0b5a33; }
html[data-theme="light"] .flash--err  { color: #8f1820; }
html[data-theme="light"] .flash--info { color: #17468c; }
html[data-theme="light"] .site-foot { background: #fff; color: var(--ink-3); }
html[data-theme="light"] .site-foot img { filter: invert(1) brightness(.35); }
html[data-theme="light"] .hero h1 em, html[data-theme="light"] .h-hero h1 em, html[data-theme="light"] .h-cta em {
  background: linear-gradient(100deg, var(--brand), #c22a74 60%, var(--violet));
  -webkit-background-clip: text; background-clip: text;
}

/* ----------------------------------------------------- přepínač motivu */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center;
  color: var(--ink-2); border: 1px solid var(--line-2); background: var(--glass);
  transition: all .16s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-3); }
.theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (max-width: 760px) {
  .site-nav { gap: 12px; }
  .site-nav__links { display: none; }
  .site-nav .btn--ghost { display: none; }
}

/* ============================================================ ÚVODNÍ STRÁNKA */
.site-main:has(.h-hero) { padding: 0 0 80px; }
.h-wrap { max-width: 1180px; margin: 0 auto; padding: clamp(44px, 6vw, 88px) clamp(18px, 4vw, 48px); box-sizing: content-box; }
.h-h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1.08; }
.h-p { color: var(--ink-2); font-size: 15.5px; margin-top: 16px; max-width: 54ch; }
.h-head { max-width: 680px; margin-bottom: 36px; }
.h-head p { color: var(--ink-3); font-size: 15.5px; margin-top: 14px; }

/* ------------------------------------------------------------ hero */
.h-hero { position: relative; min-height: min(86vh, 780px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.h-hero__bg { position: absolute; inset: 0; z-index: -2; }
.h-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.h-hero__bg--light { display: none; }
html[data-theme="light"] .h-hero__bg { display: none; }
html[data-theme="light"] .h-hero__bg--light { display: block; }
.h-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6,7,10,.92) 0%, rgba(6,7,10,.7) 38%, rgba(6,7,10,0) 70%),
    linear-gradient(0deg, var(--bg-0) 0%, rgba(6,7,10,0) 28%);
}
html[data-theme="light"] .h-hero::after {
  background:
    linear-gradient(90deg, rgba(238,240,245,.96) 0%, rgba(238,240,245,.78) 40%, rgba(238,240,245,0) 70%),
    linear-gradient(0deg, var(--bg-0) 0%, rgba(233,235,242,0) 26%);
}
.h-hero__inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) clamp(18px, 4vw, 48px); box-sizing: content-box; }
.h-hero h1 { font-size: clamp(38px, 6.4vw, 76px); line-height: 1.0; letter-spacing: -.04em; max-width: 14ch; }
.h-hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--brand), var(--violet));
                -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-hero .lead { font-size: clamp(15.5px, 1.5vw, 18.5px); color: var(--ink-2); max-width: 42ch; margin-top: 22px; }
@media (max-width: 760px) {
  .h-hero { align-items: flex-start; min-height: 0; }
  .h-hero__inner { padding-top: 40px; padding-bottom: 230px; }
  .h-hero__bg img { height: auto; max-width: none; position: absolute; bottom: 0; left: -45%; width: 175%; }
  .h-hero::after { background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-0) 55%, rgba(6,7,10,0) 80%), linear-gradient(0deg, var(--bg-0) 0%, rgba(6,7,10,0) 12%); }
  html[data-theme="light"] .h-hero::after { background: linear-gradient(180deg, #eef0f5 0%, #eef0f5 55%, rgba(238,240,245,0) 80%), linear-gradient(0deg, var(--bg-0) 0%, rgba(233,235,242,0) 12%); }
  .h-vinres { margin-top: 0; }
}

/* ------------------------------------------------------------ VIN box */
.vin { margin-top: 34px; max-width: 640px; }
.vin__label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; font-weight: 500; }
.vin__box {
  display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 16px;
  border-radius: 16px; background: rgba(16,19,26,.72); border: 1px solid var(--line-2);
  backdrop-filter: blur(18px); box-shadow: var(--shadow-2);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.vin__box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-dim), var(--shadow-2); }
html[data-theme="light"] .vin__box { background: #fff; border-color: var(--line-3); backdrop-filter: none; }
.vin__icon { color: var(--ink-3); display: grid; }
.vin__input {
  flex: 1; min-width: 0; height: 46px; background: none; border: 0; outline: 0;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace; font-size: 16.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.vin__input::placeholder { color: var(--ink-4); letter-spacing: .02em; text-transform: none; font-family: inherit; font-style: italic; }
.vin__count { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.vin__count.is-ok { color: var(--green); }
.vin__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 11px;
  background: linear-gradient(180deg, #ff4d4d, var(--brand)); color: #fff; font-weight: 600; font-size: 14px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), opacity .15s;
}
.vin__btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255,45,45,.35); }
html[data-theme="light"] .vin__btn { background: var(--brand); }
html[data-theme="light"] .vin__btn:hover { background: #cc3315; box-shadow: 0 8px 20px rgba(229,64,31,.3); }
.vin__btn.is-loading { opacity: .7; pointer-events: none; }
.vin__btn.is-loading svg { animation: vin-spin .9s linear infinite; }
@keyframes vin-spin { to { transform: rotate(360deg); } }
.vin__help { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.vin__chip {
  height: 28px; padding: 0 11px; border-radius: 20px; font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line-2); background: var(--glass); transition: all .15s var(--ease);
}
.vin__chip:hover { color: var(--ink); border-color: var(--brand); }
.vin__err { margin-top: 10px; font-size: 13px; color: var(--red); }
@media (max-width: 560px) {
  .vin__btn span, .vin__count { display: none; }
  .vin__btn { padding: 0 14px; }
}

/* ---------------------------------------------------- výsledek VIN */
.h-vinres { padding-top: 0; padding-bottom: 0; margin-top: -40px; position: relative; z-index: 2; }
.vres {
  border-radius: 22px; border: 1px solid var(--line-2); background: var(--bg-1); box-shadow: var(--shadow-2);
  padding: clamp(20px, 3vw, 32px); animation: vres-in .45s var(--ease);
}
@keyframes vres-in { from { opacity: 0; transform: translateY(14px); } }
.vres__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.vres__kicker { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 600; }
.vres__title { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; margin-top: 6px; }
.vres__vin { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink-3); margin-top: 6px; letter-spacing: .08em; }
.vres__score { display: flex; align-items: center; gap: 12px; color: var(--ink-3); }
.ring {
  --p: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--bg-3) 0);
  font-family: 'Aspekta', sans-serif; font-size: 18px; color: var(--ink); position: relative;
}
.ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg-1); }
.ring span { position: relative; }
.vres__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 24px;
}
.vf {
  padding: 12px 14px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line-1);
  opacity: 0; transform: translateY(6px); animation: vf-in .35s var(--ease) forwards;
}
@keyframes vf-in { to { opacity: 1; transform: none; } }
.vf__k { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.vf__v { font-size: 15px; font-weight: 550; margin-top: 3px; color: var(--ink); font-family: 'Aspekta', sans-serif; letter-spacing: -.01em; }
.vf--empty .vf__v { color: var(--ink-4); font-weight: 400; font-size: 13px; font-family: inherit; font-style: italic; }
.vf__ok { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.vf--empty .vf__ok { background: var(--line-3); }
.vres__note { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.vres__note:empty { display: none; }
.vres__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-1); }

/* ------------------------------------------------------------ KPI */
.h-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding-top: clamp(36px, 5vw, 64px); padding-bottom: 0; }
.h-kpi { padding: 6px 22px; border-left: 1px solid var(--line-2); }
.h-kpi:first-child { border-left: 0; padding-left: 0; }
.h-kpi b { display: block; font-family: 'Aspekta', sans-serif; font-weight: 550; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.h-kpi span { color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 760px) {
  .h-kpis { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .h-kpi:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* ------------------------------------------------------ split sekce */
.h-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.h-split--rev > :first-child { order: 2; }
@media (max-width: 900px) {
  .h-split { grid-template-columns: 1fr; }
  .h-split--rev > :first-child { order: 0; }
}
.h-media { margin: 0; position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-1); box-shadow: var(--shadow-2); }
.h-media img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; transition: transform 1.2s var(--ease); }
.h-media:hover img { transform: scale(1.03); }
.h-badge {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px; font-size: 13px; color: #fff; font-weight: 500;
  background: rgba(10,12,18,.72); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.14);
}
.h-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.2); }
.h-float {
  position: absolute; right: 16px; bottom: 16px; display: grid; gap: 6px; padding: 12px;
  border-radius: 14px; background: rgba(10,12,18,.76); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 12.5px; min-width: 250px;
}
.h-float__row { display: flex; align-items: center; gap: 9px; }
.h-float__row b { margin-left: auto; font-weight: 500; color: rgba(255,255,255,.7); }
.sem { width: 8px; height: 8px; border-radius: 50%; }
.sem--g { background: #4ade80; } .sem--a { background: #f7b955; } .sem--r { background: #ff5a5a; }

.h-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 4px; }
.h-steps li { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-1); }
.h-steps li:first-child { border-top: 0; }
.h-steps__n {
  flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-dim); color: var(--brand); font-family: 'Aspekta', sans-serif; font-weight: 550;
}
.h-steps h3 { font-size: 16px; margin-bottom: 4px; }
.h-steps p { color: var(--ink-3); font-size: 14px; margin: 0; }
.h-checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.h-checks li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14.5px; }
.h-checks svg { color: var(--green); flex: none; }

/* ----------------------------------------------------------- moduly */
.h-mods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .h-mods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .h-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .h-mods { grid-template-columns: 1fr; } }
.h-mod {
  padding: 22px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line-1);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.h-mod:hover { transform: translateY(-3px); border-color: var(--line-3); box-shadow: var(--shadow-1); }
.h-mod__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-dim); color: var(--brand); margin-bottom: 14px; }
.h-mod h3 { font-size: 15.5px; margin-bottom: 6px; }
.h-mod p { color: var(--ink-3); font-size: 13.5px; margin: 0; }
html[data-theme="light"] .h-mod { box-shadow: var(--shadow-1); }
html[data-theme="light"] .h-mod:hover { box-shadow: var(--shadow-2); }

/* ---------------------------------------------------- poctivá data */
.h-trust {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 60px); align-items: center;
  padding: clamp(24px, 4vw, 44px); border-radius: 24px; background: var(--glass); border: 1px solid var(--line-1);
}
html[data-theme="light"] .h-trust { box-shadow: var(--shadow-1); }
@media (max-width: 900px) { .h-trust { grid-template-columns: 1fr; } }
.h-conf { display: grid; gap: 14px; }
.h-conf__row { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; align-items: center; font-size: 14px; }
.h-conf__row .tiny { grid-column: 2; }

.h-mini { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.h-mini b { display: block; font-family: 'Aspekta', sans-serif; font-weight: 550; font-size: 30px; letter-spacing: -.03em; }
.h-mini span { color: var(--ink-3); font-size: 13px; }

/* ------------------------------------------------------------ fáze */
.h-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .h-phases { grid-template-columns: 1fr; } }
.h-phase { padding: 24px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line-1); }
html[data-theme="light"] .h-phase { box-shadow: var(--shadow-1); }
.h-phase__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.h-phase__head h3 { font-size: 17px; }
.h-phase ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.h-phase li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.h-phase li svg { color: var(--green); flex: none; }

/* ------------------------------------------------------------- CTA */
.h-cta {
  text-align: center; padding: clamp(40px, 6vw, 72px) 24px; border-radius: 28px; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(255,45,45,.22), transparent 70%),
    radial-gradient(600px 300px at 85% 100%, rgba(139,123,255,.22), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--line-2);
}
html[data-theme="light"] .h-cta {
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(229,64,31,.12), transparent 70%),
    radial-gradient(600px 300px at 85% 100%, rgba(60,15,95,.12), transparent 70%),
    #fff;
  box-shadow: var(--shadow-1);
}
.h-cta h2 { font-size: clamp(26px, 3.6vw, 42px); letter-spacing: -.035em; line-height: 1.1; }
.h-cta em { font-style: normal; background: linear-gradient(100deg, var(--brand), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-cta__btns { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* reveal (app.js přidá .is-in) — bez JS zůstane vše viditelné */
@media (prefers-reduced-motion: reduce) {
  .vres, .vf { animation: none; opacity: 1; transform: none; }
  .h-media img { transition: none; }
}
