/* DriveStar - prosta strona informacyjna */

:root {
  --accent: #1c74cf;
  --accent-hover: #14528f;
  --ink: #1f2430;
  --ink-soft: #5b6472;
  --bg: #ffffff;
  --hairline: #e6eaf1;
  --card: #f9fbfe;
  --accent-soft: rgba(28, 116, 207, .1);
  --wrap: 1120px;
  --fs-h1: clamp(34px, 3.4vw + 18px, 56px);
  --fs-h2: clamp(21px, .6vw + 18px, 26px);
  --fs-p: clamp(18px, .5vw + 15.5px, 22px);
  --fs-lead: clamp(20px, 1vw + 16px, 27px);
  --fs-small: clamp(15px, .3vw + 13.5px, 17px);
  --font-display: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* Wysoki kontrast - schemat jak na um.warszawa.pl: czarne tlo, zolty tekst */
[data-contrast="high"],
[data-contrast="high"][data-theme="dark"],
[data-contrast="high"][data-theme="light"] {
  --accent: #ffed00;
  --accent-hover: #ffffff;
  --ink: #ffed00;
  --ink-soft: #ffed00;
  --bg: #000000;
  --hairline: #ffed00;
  --card: #000000;
  --accent-soft: transparent;
}

[data-contrast="high"] body,
[data-contrast="high"] .site-header,
[data-contrast="high"] .site-footer,
[data-contrast="high"] .hero,
[data-contrast="high"] .section,
[data-contrast="high"] .skip-link { background: #000000; color: #ffed00; }

[data-contrast="high"] h1,
[data-contrast="high"] h2,
[data-contrast="high"] h3,
[data-contrast="high"] p,
[data-contrast="high"] li,
[data-contrast="high"] span,
[data-contrast="high"] address,
[data-contrast="high"] strong { color: #ffed00; }

[data-contrast="high"] a,
[data-contrast="high"] a:hover,
[data-contrast="high"] a:visited { color: #ffed00; text-decoration: underline; }

[data-contrast="high"] a:hover { background: #ffed00; color: #000000; }

[data-contrast="high"] .btn,
[data-contrast="high"] .button,
[data-contrast="high"] .cta,
[data-contrast="high"] button:not(.theme-toggle) {
  background: #ffed00;
  color: #000000;
  border: 2px solid #ffed00;
}

[data-contrast="high"] .theme-toggle {
  background: #000000;
  color: #ffed00;
  border: 2px solid #ffed00;
}
[data-contrast="high"] .theme-toggle:hover,
[data-contrast="high"] .theme-toggle[aria-pressed="true"] { background: #ffed00; color: #000000; }

[data-contrast="high"] .section-icon { background: #000000; color: #ffed00; border: 2px solid #ffed00; }

[data-contrast="high"] .brand-logo { filter: grayscale(1) brightness(0) invert(1) sepia(1) saturate(20) hue-rotate(4deg); }

[data-contrast="high"] .section,
[data-contrast="high"] .site-header,
[data-contrast="high"] .site-footer,
[data-contrast="high"] .contact-email a,
[data-contrast="high"] .footer-links a { border-color: #ffed00; }

[data-contrast="high"] .section { border-width: 2px; }

[data-contrast="high"] :focus-visible { outline: 3px solid #ffed00; outline-offset: 2px; }

/* Skalowanie tekstu pomija nagłówek, żeby przyciski nie zmieniały pozycji. */
[data-textsize="lg"] main,
[data-textsize="lg"] .site-footer { zoom: 1.15; }
[data-textsize="xl"] main,
[data-textsize="xl"] .site-footer { zoom: 1.32; }

.text-size-toggle { gap: 1px; font-family: var(--font-display); font-weight: 600; }
.text-size-toggle span { font-size: 13px; line-height: 1; }
.text-size-plus { font-size: 17px; }
.theme-toggle[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }

[data-theme="dark"] {
  --accent: #6badf1;
  --accent-hover: #97c6f7;
  --ink: #e8ecf2;
  --ink-soft: #9aa5b4;
  --bg: #12161c;
  --hairline: #242b35;
  --card: #171c24;
  --accent-soft: rgba(107, 173, 241, .14);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-p);
  line-height: 1.6;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 24px;
  top: 12px;
  z-index: 10;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Górny pasek */
.site-header {
  padding-top: 8px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 28px;
  height: auto;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, .5vw + 17px, 23px);
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
}

.brand { min-width: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  text-decoration: none;
}
.nav-link-icon { display: none; flex: 0 0 auto; }
.nav-link:hover {
  color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Wybór języka */
.lang-switch { position: relative; display: inline-flex; }

.lang-button { gap: 0; padding: 8px; }

.lang-code {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 1;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  display: grid;
  gap: 2px;
  min-width: 168px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 25, 45, .12);
}

.lang-menu[hidden] { display: none; }

.lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font: inherit;
  font-size: var(--fs-small);
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.lang-menu button span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

.lang-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.lang-menu button:hover span { color: var(--accent); }
.lang-menu button[aria-current="true"] { color: var(--accent); }
.lang-menu button[aria-current="true"] span { color: var(--accent); }

[data-contrast="high"] .lang-menu { background: #000; border: 2px solid #ffed00; box-shadow: none; }
[data-contrast="high"] .lang-menu button { color: #ffed00; }
[data-contrast="high"] .lang-menu button span { color: #ffed00; }
[data-contrast="high"] .lang-menu button:hover { background: #ffed00; color: #000; }
[data-contrast="high"] .lang-menu button:hover span { color: #000; }

.theme-toggle-dark,
.theme-toggle-light { display: inline-flex; }
.theme-toggle-light { display: none; }
[data-theme="dark"] .theme-toggle-dark { display: none; }
[data-theme="dark"] .theme-toggle-light { display: inline-flex; }

/* Sekcja główna */
.hero {
  padding: 80px 0 12px;
}

.hero .lead + .lead {
  margin-top: 14px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h1);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: none;
}

.lead {
  margin: 0;
  max-width: 60ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Sekcje treści */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 24px;
  padding-top: 64px;
  align-items: start;
}

.section p {
  font-size: clamp(17px, .35vw + 15.4px, 19.5px);
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.section {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 28px 26px 30px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}

.section h2 {
  color: var(--accent);
  font-size: var(--fs-small);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section p { color: var(--ink-soft); }
.section p:first-of-type { color: var(--ink); }

p {
  margin: 0 0 12px;
  max-width: 68ch;
}

p:last-child {
  margin-bottom: 0;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(20px, .8vw + 17px, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.contact-email a {
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.contact-email a:hover {
  border-bottom-color: var(--accent);
}

.company {
  width: max-content;
  max-width: none;
  flex-wrap: nowrap;
  white-space: nowrap;
  will-change: transform;
  font-style: normal;
  color: var(--ink-soft);
  font-size: clamp(12.5px, .3vw + 11.5px, 14px);
  line-height: 1.6;
  margin: 0 0 10px;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.company span { display: inline; white-space: nowrap; }

.company-marquee {
  overflow: hidden;
  margin: 0 0 10px;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}

.company span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
  margin-right: 10px;
}

/* Stopka */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--hairline);
  padding: 18px 0 24px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer p {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.footer-links a:hover {
  color: var(--accent);
}

/* Dokument prawny */
.doc {
  padding: 56px 0 24px;
}

.doc h1 { max-width: none; }

.doc h1 {
  margin-bottom: 8px;
}

.doc-meta {
  color: var(--ink-soft);
  font-size: var(--fs-small);
  margin-bottom: 40px;
}

.doc h2 {
  font-size: var(--fs-h2);
  margin: 40px 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.doc h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, .4vw + 16px, 21px);
  margin: 24px 0 8px;
}

.doc h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  margin: 18px 0 6px;
}

.doc p,
.doc li {
  font-size: var(--fs-p);
}

.doc ul {
  margin: 0 0 12px;
  padding-left: 22px;
  max-width: 62ch;
}

.doc li {
  margin-bottom: 4px;
}

.doc address {
  font-style: normal;
  margin: 0 0 12px;
  color: var(--ink);
}

.doc code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 14px;
  background: var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
}

.doc a { word-break: break-word; }

@media (max-width: 1100px) and (min-width: 761px) {
  .content-grid .section:last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-inner { min-height: 64px; }
  .header-inner { gap: 10px; }
  .header-nav { gap: 8px; }
  .nav-link-text { display: none; }
  .nav-link-icon { display: block; }
  .nav-link {
    width: 36px;
    height: 36px;
    justify-content: center;
    gap: 0;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    color: var(--ink-soft);
  }
  .nav-link:hover { color: var(--accent); border-color: var(--accent); }
  .hero { padding: 48px 0 8px; }
  .content-grid { gap: 16px; padding-top: 40px; grid-template-columns: 1fr; }
  .content-grid .section:last-child { grid-column: auto; }
  .section { padding: 24px 20px 26px; }
  .wrap { padding: 0 20px; }
  .company { gap: 2px 8px; }

.company span + span::before { margin-right: 8px; }
  .contact-email { font-size: 18px; }
  h1 { max-width: none; }
  .lead { font-size: 17px; }
  .doc { padding: 40px 0 16px; }
}

#main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

@media (max-width: 400px) {
  .brand-name { display: none; }
}

@media (max-width: 600px) {
  .lead { max-width: none; }
  p { max-width: none; }
}
