/* ─────────────────────────────────────────────────────────────────────────
   tankujemy.pl — arkusz strony informacyjnej.

   Tokeny są przepisane 1:1 z lib/shared/theme/app_colors.dart. Gdy zmienia
   się paleta w aplikacji, zmienia się i tutaj — źródłem prawdy jest Dart.
   ───────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/Archivo-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/Archivo-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ── Tokeny: motyw ciemny (domyślny, tak jak user_settings.theme_mode) ──── */
:root {
  --bg: #0A0E10;
  --surface: #141A1D;
  --surface-2: #1E262A;
  --ink: #EDF2F0;
  --muted: #93A19A;
  --line: rgba(255, 255, 255, 0.13);
  --brand: #2FCB96;
  --brand-ink: #04241B;
  --plate: #04070A;
  --plate-ink: #FFFFFF;
  --fresh: #3BD37F;
  --aging: #E3A62B;
  --stale: #FF8371;
  --info: #5AA0F0;
  --accent: #D6FF3F;

  /* Skala base-4 z AppSpacing */
  --x1: 4px;  --x2: 8px;  --x3: 12px; --x4: 16px;
  --x5: 20px; --x6: 24px; --x8: 32px;

  /* Drabinka promieni z AppRadius */
  --r-xs: 8px; --r-sm: 11px; --r-md: 14px;
  --r-lg: 16px; --r-xl: 20px; --r-pill: 99px;

  --ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Archivo', var(--ui);

  --wrap: 1120px;
  --doc: 720px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F4F5F3;
    --surface: #FFFFFF;
    --surface-2: #ECEFEA;
    --ink: #101619;
    --muted: #5C6A72;
    --line: rgba(16, 22, 25, 0.10);
    --brand: #0C5C4A;
    --brand-ink: #FFFFFF;
    --plate: #101619;
    --plate-ink: #FFFFFF;
    --fresh: #14804A;
    --aging: #A96C00;
    --stale: #C0392B;
    --info: #2C7BE5;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip {
  position: absolute;
  left: -9999px;
  top: var(--x3);
  padding: var(--x3) var(--x5);
  background: var(--accent);
  color: #101619;
  border-radius: var(--r-sm);
  font-weight: 700;
  z-index: 10;
}
.skip:focus { left: var(--x4); }

/* ── Typografia ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

p { margin: 0 0 var(--x4); }

.lead {
  font-size: clamp(1.05rem, 1.9vw, 1.25rem);
  color: var(--muted);
  max-width: 46ch;
}

/* Etykieta sekcji — wersalikowa, rozstrzelona, w kolorze brandu. */
.eyebrow {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 var(--x3);
}

/* ── Układ ──────────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--x5);
}

.section { padding-block: clamp(56px, 9vw, 104px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--ruled { border-top: 1px solid var(--line); }

/* ── Nagłówek serwisu ───────────────────────────────────────────────────── */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-head__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--x4);
  min-height: 68px;
  flex-wrap: wrap;
}

.site-head__logo { display: inline-flex; flex-shrink: 0; }
.site-head__logo img { height: 26px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--x5);
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--ink); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--x8), 6vw, 72px);
  align-items: center;
}

.hero__claim { margin-bottom: var(--x6); }
.hero__claim em { font-style: normal; color: var(--brand); }

/* ── Pylon: sygnatura strony ────────────────────────────────────────────
   Slab z cenami + maszt. To, co kierowca widzi z drogi — tyle że zanim
   tam dojedzie. Wiersze wjeżdżają kaskadą przy wczytaniu strony.        */
.pylon {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pylon__slab {
  width: 100%;
  max-width: 380px;
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--x5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.pylon__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--x3);
  padding-bottom: var(--x4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pylon__head img { height: 20px; width: auto; }

.pylon__where {
  font-size: 0.72rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
}

.pylon__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fuel {
  display: grid;
  grid-template-columns: 3.6rem 1fr auto;
  align-items: center;
  gap: var(--x3);
  padding-block: var(--x4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fuel:last-child { border-bottom: 0; padding-bottom: var(--x1); }

.fuel__name {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.62);
}

/* Plakietka ceny: cyfry tabularne Archivo + limonkowa jednostka pod spodem. */
.plate {
  display: flex;
  align-items: baseline;
  gap: var(--x2);
  justify-self: start;
}

.plate__num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--plate-ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.plate__unit {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* Pigułka świeżości — progi z Freshness.of(): <1 h, <12 h, dalej. */
.pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: var(--x1) var(--x3);
  border-radius: var(--r-pill);
  white-space: nowrap;
  border: 1px solid currentColor;
}
.pill--fresh { color: #3BD37F; }
.pill--aging { color: #E3A62B; }
.pill--stale { color: #FF8371; }

.pylon__mast {
  width: 14px;
  height: 56px;
  background: linear-gradient(var(--line), transparent);
  border-inline: 1px solid var(--line);
}

.pylon__caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: var(--x2) 0 0;
  max-width: 30ch;
}

/* ── Przyciski pobierania ───────────────────────────────────────────────── */
.get {
  display: flex;
  gap: var(--x3);
  flex-wrap: wrap;
  margin: 0 0 var(--x4);
  padding: 0;
  list-style: none;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: var(--x3);
  padding: var(--x3) var(--x5);
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.store:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-1px); }

.store__text { display: flex; flex-direction: column; line-height: 1.15; }
.store__kicker { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.store__name { font-family: var(--display); font-weight: 700; font-size: 1rem; }

.store--soon { opacity: 0.72; }
.store--soon::after {
  content: 'Wkrótce';
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #101619;
  background: var(--accent);
  border-radius: var(--r-pill);
  padding: 2px var(--x2);
  align-self: center;
}

.get__note { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ── Kroki ──────────────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  margin: var(--x8) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--x6);
  counter-reset: step;
}

.step { counter-increment: step; }

.step::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--brand-ink);
  background: var(--brand);
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  text-align: center;
  line-height: 30px;
  margin-bottom: var(--x4);
}

.step h3 { margin-bottom: var(--x2); }
.step p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* ── Kafle funkcji ──────────────────────────────────────────────────────── */
.cards {
  list-style: none;
  margin: var(--x8) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--x4);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--x6);
}

.card h3 { margin-bottom: var(--x2); }
.card p { color: var(--muted); margin: 0; font-size: 0.94rem; }

/* ── Pasek CTA ──────────────────────────────────────────────────────────── */
.cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(var(--x6), 5vw, 56px);
  text-align: center;
}
.cta .lead { margin-inline: auto; margin-bottom: var(--x6); }
.cta .get { justify-content: center; }
.cta .get__note { text-align: center; }

/* ── Stopka ─────────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: var(--x8) var(--x6);
  font-size: 0.88rem;
  color: var(--muted);
}

.site-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: var(--x6);
  margin-bottom: var(--x8);
}

.site-foot__logo { height: 24px; width: auto; margin-bottom: var(--x4); }

.site-foot h4 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--x3);
}

.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: var(--x2); }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

.site-foot__legal {
  border-top: 1px solid var(--line);
  padding-top: var(--x5);
  display: flex;
  gap: var(--x5);
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.site-foot__legal p { margin: 0; max-width: 62ch; }

/* ── Dokumenty prawne ───────────────────────────────────────────────────── */
.doc { max-width: var(--doc); margin-inline: auto; }

.doc__head { margin-bottom: var(--x8); }

.doc__meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: var(--x4) 0 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--x5) var(--x6);
  margin-bottom: var(--x8);
}
.doc .toc h2 {
  font-size: 0.72rem;
  margin-top: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--x3);
}
.doc .toc ol { margin: 0; padding-left: var(--x5); color: var(--muted); }
.doc .toc li { margin-bottom: var(--x1); }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.doc h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-top: var(--x8); margin-bottom: var(--x4); scroll-margin-top: var(--x5); }
.doc h3 { margin-top: var(--x6); margin-bottom: var(--x3); }
.doc ul, .doc ol { padding-left: var(--x6); margin: 0 0 var(--x4); }
.doc li { margin-bottom: var(--x2); }
.doc dl { margin: 0 0 var(--x4); }
.doc dt { font-weight: 700; margin-top: var(--x4); }
.doc dd { margin: var(--x1) 0 0; color: var(--muted); }

.doc__table { width: 100%; border-collapse: collapse; margin: 0 0 var(--x4); font-size: 0.92rem; }
.doc__table th, .doc__table td { text-align: left; vertical-align: top; padding: var(--x3); border-bottom: 1px solid var(--line); }
.doc__table th { font-family: var(--display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.doc__scroll { overflow-x: auto; }

/* Wyróżniona uwaga w dokumencie — lewa krecha w kolorze brandu. */
.note {
  border-left: 3px solid var(--brand);
  background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--x4) var(--x5);
  margin: 0 0 var(--x4);
}
.note p:last-child { margin-bottom: 0; }
.note--warn { border-left-color: var(--stale); }

.doc address { font-style: normal; margin: 0 0 var(--x4); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); padding-block: var(--x5); }
.faq__item h2 { font-size: 1.15rem; margin: 0 0 var(--x3); }
.faq__item p:last-child { margin-bottom: 0; }

/* ── Wejście strony ─────────────────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.rise { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
.rise--1 { animation-delay: 0.06s; }
.rise--2 { animation-delay: 0.14s; }
.rise--3 { animation-delay: 0.22s; }
.rise--4 { animation-delay: 0.30s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ── Responsywność ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--x8); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: var(--x6); }
  .site-foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-head__bar { min-height: 60px; padding-block: var(--x3); }
  .nav { gap: var(--x4); width: 100%; }
  .site-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .fuel { grid-template-columns: 3.2rem 1fr auto; gap: var(--x2); }
  .plate__num { font-size: 1.8rem; }
  .store { width: 100%; }
}
