/* nwheels.com - "nocni okruh": asfalt, karbon (odkaz na puvodni web z 2008), modra znacka, zavodni oranzova.
   Pismo Archivo: siroky rez (font-stretch 112-125 %) na nadpisy, normalni na text. Vychozi vzhled je tmavy. */

:root {
  color-scheme: dark;
  --bg: #0B0E13;
  --surface: #131821;
  --surface-2: #1A2130;
  --ink: #EEF1F5;
  --ink-2: #C3CAD4;
  --muted: #8F99A8;
  --line: #242C3A;
  --blue: #3D8BFF;
  --blue-deep: #0C3E6D;
  --orange: #FF6B1A;
  --orange-ink: #FF8A47;
  --shadow: 0 10px 40px rgb(0 0 0 / .45);
  --carbon: repeating-linear-gradient(45deg, rgb(255 255 255 / .022) 0 2px, transparent 2px 6px), repeating-linear-gradient(-45deg, rgb(255 255 255 / .018) 0 2px, transparent 2px 6px);
  --font: "Archivo", "Segoe UI", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --surface-2: #E8EBF0;
  --ink: #0E1218;
  --ink-2: #2E3644;
  --muted: #5B6472;
  --line: #D9DEE5;
  --blue: #1D5FD8;
  --orange: #D9480F;
  --orange-ink: #C2410C;
  --shadow: 0 10px 30px rgb(14 18 24 / .12);
  --carbon: repeating-linear-gradient(45deg, rgb(0 0 0 / .025) 0 2px, transparent 2px 6px), repeating-linear-gradient(-45deg, rgb(0 0 0 / .02) 0 2px, transparent 2px 6px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-ink); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-stretch: 118%; font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
h1 { font-size: clamp(2.1rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); text-transform: uppercase; }
h3 { font-size: 1.15rem; font-stretch: 108%; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.prose { max-width: 70ch; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: baseline; gap: 2px; color: var(--ink); text-decoration: none; line-height: 1; margin-right: auto; }
.logo__n { font-size: 1.9rem; font-weight: 900; font-stretch: 125%; color: var(--blue); letter-spacing: -.04em; }
.logo__wheels { font-size: .98rem; font-weight: 800; font-stretch: 125%; letter-spacing: .14em; }
.logo__tld { font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.logo:hover { color: var(--ink); }
.logo--small .logo__n { font-size: 1.5rem; }

/* ---------- hlavicka ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: clamp(10px, 2vw, 24px);
  padding: 12px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-nav { display: flex; gap: 4px; }
.site-nav a, .lang { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 6px; }
.site-nav a:hover, .lang:hover { color: var(--ink); background: var(--surface); }
.lang { border: 1px solid var(--line); }
.theme-toggle { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; padding: 0; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 720px) { .site-nav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 48px); background: var(--carbon); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: auto -10% -40% 30%; height: 80%; background: radial-gradient(closest-side, rgb(255 107 26 / .18), transparent); pointer-events: none; }
.hero__grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; position: relative; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 18px; }
.kicker::before { content: ""; width: 28px; height: 3px; background: var(--orange); transform: skewX(-30deg); }
.hero h1 { font-size: clamp(2.3rem, 4.9vw, 4.1rem); font-stretch: 125%; text-transform: uppercase; line-height: .95; letter-spacing: -.02em; }
.hero__lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--ink-2); max-width: 46ch; margin: 22px 0 28px; }
.hero__photo { position: relative; display: block; border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); transform: skewY(-2deg); transform-origin: right; }
.hero__photo img { width: 100%; transform: skewY(2deg) scale(1.06); transition: transform .6s ease; }
.hero__photo:hover img { transform: skewY(2deg) scale(1.1); }
.hero__caption { position: absolute; left: 0; bottom: 0; padding: 8px 14px; background: rgb(11 14 19 / .75); color: #EEF1F5; font-size: .8rem; font-weight: 600; transform: skewY(2deg); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; background: var(--orange); color: #111; font-weight: 800; font-stretch: 110%; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; text-decoration: none; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn::after { content: "→"; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: clamp(32px, 5vw, 56px) 0 0; border-top: 1px solid var(--line); }
.stats div { padding: 18px 16px 4px 0; }
.stats dt { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; font-stretch: 125%; line-height: 1; }
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }

/* ---------- sekce ---------- */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(24px, 4vw, 40px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 .88rem var(--font); color: var(--ink-2); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
html:not(.js) .filters { display: none; }

.year { display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 56px); }
@media (min-width: 900px) { .year { grid-template-columns: 9rem 1fr; } }
.year__label { font-size: clamp(1.8rem, 2.8vw, 2.4rem); font-stretch: 118%; font-weight: 900; color: transparent; -webkit-text-stroke: 1.5px var(--muted); line-height: 1; position: sticky; top: 84px; align-self: start; }
.year[hidden] { display: none; }

.cards { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--orange); box-shadow: var(--shadow); color: var(--ink); }
.card[hidden] { display: none; }
.card__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__img img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card__meta { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card__title { font-weight: 700; font-stretch: 108%; font-size: 1.05rem; line-height: 1.3; }
.card__foot { margin-top: auto; font-size: .85rem; color: var(--muted); }
.badge { display: inline-block; padding: 3px 8px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2); color: var(--ink); border-left: 3px solid var(--muted); }
.badge--drift { border-color: var(--orange); }
.badge--tuning { border-color: #B26BFF; }
.badge--racing { border-color: #3DDC97; }
.badge--meet { border-color: var(--blue); }
.badge--show { border-color: #F5C518; }

/* ---------- videa ---------- */
.videos { display: grid; gap: clamp(20px, 3vw, 32px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.video h3 { margin: 14px 0 4px; }
.video h3 a { color: var(--ink); text-decoration: none; }
.video h3 a:hover { color: var(--orange-ink); }
.video__frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video__frame img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--orange); cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 30px rgb(0 0 0 / .5); transition: transform .2s ease; }
.video__play:hover { transform: scale(1.08); }
.video__play svg { width: 34px; height: 34px; fill: #111; margin-left: 4px; }
.video--single { max-width: 960px; }
.note { margin-top: 16px; font-size: .85rem; color: var(--muted); }

.about { display: grid; gap: 20px 64px; }
@media (min-width: 900px) { .about { grid-template-columns: 18rem 1fr; } }

/* ---------- galerie ---------- */
.event__head { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(24px, 4vw, 40px); }
.crumb { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.crumb:hover { color: var(--ink); }
.event__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.event__head h1 { max-width: 22ch; text-transform: uppercase; font-stretch: 122%; }
.event__text { margin-top: 22px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 20px 0 0; }
.tags li { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); }
.grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .35s ease; }
.grid a:hover img { transform: scale(1.06); }

.pager { display: flex; justify-content: space-between; gap: 16px; padding-top: clamp(32px, 5vw, 56px); }
.pager__link { display: flex; flex-direction: column; gap: 4px; max-width: 46%; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.3; }
.pager__link span { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.pager__link:hover { border-color: var(--orange); color: var(--ink); }
.pager__link--next { text-align: right; margin-left: auto; }

/* ---------- stranka fotky ---------- */
.photo-page { padding-top: clamp(16px, 3vw, 32px); }
.photo-page__bar { display: flex; justify-content: space-between; align-items: baseline; }
.photo-page__count { color: var(--muted); font-size: .92rem; }
.photo-page__title { font-size: clamp(1.3rem, 2.6vw, 1.8rem); text-transform: uppercase; margin-bottom: 18px; }
.photo-page__figure { margin: 0 auto; max-width: 1000px; padding-inline: var(--gutter); }
.photo-page__figure img { margin: 0 auto; max-height: 80vh; width: auto; }
.pager--photo { max-width: 1000px; }

/* ---------- prohlizec pres celou obrazovku ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: #05070A; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); color: #EEF1F5; touch-action: pan-y pinch-zoom; }
.lightbox[hidden] { display: none; }
.lightbox__bar { display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter); }
.lightbox__title { flex: 1; min-width: 0; font-weight: 700; font-stretch: 110%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox__count { flex: none; color: #A9B2BF; font-size: .9rem; white-space: nowrap; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(8px, 6vw, 80px); }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .2s ease; }
.lightbox__btn { flex: none; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .16); color: #EEF1F5; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; display: grid; place-items: center; }
.lightbox__btn:hover { background: var(--orange); color: #111; border-color: var(--orange); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: clamp(6px, 2vw, 20px); }
.lightbox__nav--next { right: clamp(6px, 2vw, 20px); }
.lightbox__foot { padding: 10px var(--gutter) 16px; text-align: center; font-size: .82rem; color: #8F99A8; }
@media (max-width: 640px), (pointer: coarse) { .lightbox__nav, .lightbox__foot { display: none; } }
body.lightbox-open { overflow: hidden; }

/* ---------- 404 ---------- */
.notfound__code { font-size: clamp(5rem, 18vw, 11rem); font-weight: 900; font-stretch: 125%; line-height: .9; color: transparent; -webkit-text-stroke: 2px var(--orange); margin: 0 0 12px; }

/* ---------- paticka ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--carbon), var(--surface); margin-top: clamp(32px, 6vw, 72px); }
.site-footer__inner { padding-block: 36px; display: grid; gap: 12px; color: var(--muted); font-size: .88rem; }
.site-footer__inner p { margin: 0; max-width: 80ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
