/* OBDial – web
 *
 * Návrh vychází z přístrojové desky, ne z běžné landing page. Tankuj100 je
 * světlý papír s oranžovou; tohle je jeho protipól – tmavý ciferník, tabulkové
 * číslice, tenké rysky, zelená ručička s červenou hranicí. Barvy jsou převzaté
 * přímo z aplikace (Theme.swift a ikona), aby web a appka mluvily stejně.
 */

/* ------------------------------------------------------------------ fonty */
/* Vlastní hosting, subset na češtinu – stejně jako tankuj100. Žádné volání
   na cizí server jen kvůli písmu. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-cz.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-ext-cz.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ tokeny */
:root {
  /* ciferník aplikace */
  --paper: #0b0e13;
  --surface: #12161e;
  --surface-2: #171d26;
  --line: #232a35;
  --line-soft: #1a202a;

  --ink: #e8ecf2;
  --ink-2: #aab3c2;
  --ink-3: #737d8d;

  /* Theme.swift: accent/good, warn, bad */
  --accent: #00d999;
  --warn: #ffb300;
  --redline: #ff3b30;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 74rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 620;
  letter-spacing: -0.028em;
  text-wrap: balance;
  line-height: 1.1;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ------------------------------------------------------------------ ryska */
/* Podpisový prvek celého webu: dělicí čára není čára, ale stupnice budíku.
   Nahrazuje rozmazané kaňky, které má dnes na pozadí kdekdo. */
.scale {
  height: 9px;
  border: 0;
  margin: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 9px 100%;
  background-repeat: repeat-x;
  opacity: 0.85;
}
.scale--major {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to right, var(--ink-3) 1px, transparent 1px);
  background-size: 9px 100%, 45px 100%;
}

/* ------------------------------------------------------------------ layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 640;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lede {
  color: var(--ink-2);
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.15rem);
  max-width: var(--measure);
}

/* -------------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-size: 1.05rem;
}
.brand svg { width: 26px; height: 26px; }
.nav__links {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
  font-size: 0.925rem;
  color: var(--ink-2);
}
.nav__links a { text-decoration: none; }
.nav__links a:hover { color: var(--ink); }
@media (min-width: 56rem) {
  .nav__links { display: flex; }
}

/* ------------------------------------------------------------------- hero */
.hero {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.9rem);
  margin-bottom: 1.25rem;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lede { margin-bottom: 2rem; }

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-top: 1.75rem;
}
.ticks li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ticks li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.ticks ul, ul.ticks { padding: 0; margin: 1.75rem 0 0; }

/* ------------------------------------------------------------- tlačítka */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.25rem;
  padding-inline: 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 560;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease;
}
.btn:active { transform: scale(0.985); }
.btn--primary {
  background: var(--accent);
  color: #04120d;
}
.btn--primary:hover { background: #22e6ab; }
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink-3); background: var(--surface); }
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* -------------------------------------------------------------- budíky */
.cluster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(0.9rem, 2.5vw, 1.5rem);
}
.dial { text-align: center; }
.dial svg { width: 100%; height: auto; }
.dial__value {
  font-size: clamp(1rem, 0.8rem + 0.8vw, 1.35rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  margin-top: 0.35rem;
}
.dial__label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cluster__caption {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line-soft);
  padding-top: 0.85rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-3);
  text-align: center;
}

/* ------------------------------------------------- seznam veličin (spec) */
.spec {
  display: grid;
  gap: 0 clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.5rem;
}
@media (min-width: 44rem) { .spec { grid-template-columns: 1fr 1fr; } }
@media (min-width: 68rem) { .spec { grid-template-columns: repeat(3, 1fr); } }

.spec__group { margin-bottom: 2rem; }
.spec__title {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.35rem;
}
.spec__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.45rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.925rem;
}
.spec__row span:last-child { color: var(--ink-3); }

/* ------------------------------------------------------------ postup 1-2-3 */
.steps {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 2.5rem;
}
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--surface);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.step__no {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.step p { color: var(--ink-2); font-size: 0.925rem; }

/* ------------------------------------------------------------- screenshoty */
.shots {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: 2.5rem;
}
@media (min-width: 40rem) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .shots { grid-template-columns: repeat(4, 1fr); } }
.shot img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.shot p {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------ tabulka HW */
.table-wrap { overflow-x: auto; margin-top: 2rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  min-width: 34rem;
}
th, td {
  text-align: left;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
th {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  border-bottom-color: var(--line);
}
td:first-child { font-weight: 560; white-space: nowrap; }
td:nth-child(2) { color: var(--accent); white-space: nowrap; }
td:last-child { color: var(--ink-2); }

/* --------------------------------------------------------------- varování */
.note {
  border-left: 2px solid var(--warn);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin-top: 2rem;
  color: var(--ink-2);
  max-width: var(--measure);
}
.note strong { color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------------- FAQ */
.faq { margin-top: 2rem; max-width: 52rem; }
details {
  border-bottom: 1px solid var(--line-soft);
}
summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.1rem;
  font-weight: 560;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  color: var(--ink-3);
  font-weight: 400;
  transition: transform 0.2s ease;
  flex: none;
}
details[open] summary::after { transform: rotate(45deg); }
details p {
  color: var(--ink-2);
  padding-bottom: 1.2rem;
  max-width: var(--measure);
  font-size: 0.95rem;
}

/* -------------------------------------------------------------- inverze */
/* Tankuj100 obrací rytmus tmavým panelem na světlé stránce. Tady je stránka
   tmavá, takže inverze je světlá – stejný trik, opačný směr. */
.invert {
  background: #f4f6f8;
  color: #10151c;
}
.invert h2 { color: #10151c; }
.invert .lede { color: #4a5361; }
.invert .eyebrow { color: #0b8f66; }
.invert .btn--ghost { border-color: #cdd4dc; color: #10151c; }
.invert .btn--ghost:hover { background: #e7ebef; border-color: #9aa4b1; }

/* ------------------------------------------------------------------ patka */
.foot {
  border-top: 1px solid var(--line-soft);
  padding-block: 2.5rem 3rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink-2); }
.sig {
  display: block;
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  text-decoration: none;
}
.sig:hover, .sig:focus, .sig:active {
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

/* ------------------------------------------------------------ odhalování */
/* Jediná animace na webu. Pod 768 px je vypnutá – rychlé cuknutí prstem ji
   stejně předběhne a uživatel by koukal na prázdno. */
.reveal { opacity: 1; }
@media (min-width: 48rem) {
  .reveal {
    opacity: 0;
    transform: translateY(0.6rem);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* Ručička se rozjede jen jednou, po načtení. Žádné nekonečné poskakování –
   budík, který ukazuje pořád dokola totéž, je ozdoba, ne přístroj. */
.needle {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: sweep 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}
@keyframes sweep {
  from { transform: rotate(-118deg); }
  to { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .needle { animation: none; }
}
