/* ============================================================
   AUTO29 — Redesign · design tokens + base + components
   Two themes driven by [data-theme]; accent via --accent.
   ============================================================ */

/* ---- Fonts (Polish diacritics supported) ---- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,500;0,600;0,700;0,800;0,900;1,800;1,900&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* accent is overridable by the Tweaks panel */
  --accent: #e11d2a;
  --accent-strong: color-mix(in oklab, var(--accent) 82%, #000 18%);
  --accent-ink: #ffffff;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --ease: cubic-bezier(.2, .7, .2, 1);

  /* density scale (overridable) */
  --space: 1;
  --section-y: calc(96px * var(--space));

  --maxw: 1240px;

  font-family: 'Hanken Grotesk', system-ui, sans-serif;
}

/* ---------- LIGHT (corporate / clean) ---------- */
:root,
[data-theme='light'] {
  --bg: #ffffff;
  --bg-soft: #f3f6f8;
  --bg-deep: #0f2233;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --ink: #0e2433;
  --ink-soft: #51677a;
  --ink-faint: #8497a6;
  --line: #e4eaf0;
  --line-strong: #d2dbe3;
  --navy: #123c56;
  --on-deep: #eaf2f8;
  --on-deep-soft: #9db4c4;
  --shadow-sm: 0 1px 2px rgba(13,38,56,.06), 0 2px 8px rgba(13,38,56,.05);
  --shadow-md: 0 8px 24px rgba(13,38,56,.10);
  --shadow-lg: 0 24px 60px rgba(13,38,56,.16);
  --tile-grad: linear-gradient(150deg, #16364c 0%, #0f2536 60%, #0b1c2a 100%);
}

/* ---------- DARK (premium) ---------- */
[data-theme='dark'] {
  --bg: #0a131c;
  --bg-soft: #0d1925;
  --bg-deep: #060d14;
  --surface: #112230;
  --surface-2: #16293a;
  --ink: #eef5fa;
  --ink-soft: #9fb6c6;
  --ink-faint: #6f8696;
  --line: rgba(255,255,255,.085);
  --line-strong: rgba(255,255,255,.16);
  --navy: #0c2638;
  --on-deep: #eef5fa;
  --on-deep-soft: #93aabb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 12px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.6);
  --tile-grad: linear-gradient(150deg, #1a3850 0%, #102634 60%, #0a1722 100%);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: 'Archivo', system-ui, sans-serif;
  margin: 0;
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--ink);
}
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(100% - 44px, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section-y); }

/* ============================================================
   SHARED UI
   ============================================================ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ''; width: 26px; height: 2px; background: var(--accent); border-radius: 2px;
}
.eyebrow.center::before { display: none; }

.section-head { max-width: 760px; }
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 800;
  margin-top: 16px;
}
.section-head p { margin-top: 16px; color: var(--ink-soft); font-size: 18px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15.5px;
  letter-spacing: .01em;
  padding: 15px 26px; border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px color-mix(in oklab, var(--accent) 40%, transparent); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in oklab, var(--accent) 48%, transparent); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-deep { background: var(--ink); color: var(--bg); }
.btn-deep:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-light { background: #fff; color: #0e2433; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.25); }

.btn-sm { padding: 11px 18px; font-size: 14px; }

/* ============================================================
   TOP UTILITY BAR
   ============================================================ */
.topbar {
  background: var(--bg-deep);
  color: var(--on-deep-soft);
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar .wrap { display: flex; align-items: center; gap: 26px; min-height: 42px; flex-wrap: wrap; }
.topbar a { color: var(--on-deep); display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.topbar a:hover { color: #fff; }
.topbar .sep { flex: 1; }
.topbar svg { width: 15px; height: 15px; color: var(--accent); }
.topbar .badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  color: #fff; font-weight: 700; padding: 4px 11px; border-radius: var(--r-pill); font-size: 12.5px;
}
.topbar .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.25); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { height: 40px; width: auto; }
[data-theme='dark'] .brand img { filter: drop-shadow(0 0 1px rgba(255,255,255,.2)); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--ink-soft); padding: 10px 16px; border-radius: var(--r-pill);
  position: relative; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.header .cta { display: flex; align-items: center; gap: 10px; }
.header .phone-link {
  display: inline-flex; flex-direction: column; line-height: 1.1; text-align: right; margin-right: 4px;
}
.header .phone-link small { font-size: 11px; color: var(--ink-faint); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.header .phone-link b { font-family: 'Archivo', sans-serif; font-size: 17px; color: var(--ink); }

.burger { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-deep); color: var(--on-deep-soft); padding-block: 72px 32px; }
.footer .grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 20px; font-weight: 800; }
.footer p { font-size: 15px; line-height: 1.7; }
.footer .col-brand img { height: 44px; margin-bottom: 20px; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer ul a { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.footer ul svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.footer .socials { display: flex; gap: 12px; margin-top: 22px; }
.footer .socials a {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); color: #fff;
  transition: background .2s, transform .2s, border-color .2s;
}
.footer .socials a:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.footer .socials svg { width: 19px; height: 19px; }
.footer .legal {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--on-deep-soft);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .footer .grid { grid-template-columns: 1fr 1fr; }
  .footer .col-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --section-y: calc(64px * var(--space)); }
  .nav, .header .phone-link { display: none; }
  .burger { display: inline-grid; }
  .footer .grid { grid-template-columns: 1fr; gap: 36px; }
}
