/* Linewise Railways — strona www. Statyczny HTML + CSS, bez zasobów z zewnątrz. */

@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonty/noto-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonty/noto-sans-latin-400-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonty/noto-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonty/noto-sans-latin-600-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonty/noto-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonty/noto-sans-latin-700-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ground: #f5f5f2;
  --tone: #e9e9e4;
  --ink: #15181c;
  --ink-soft: #464c54;
  --field: #1c232c;
  --field-tone: #26303b;
  --field-ink: #f1f1ed;
  --field-soft: #b7bec7;
  --accent: #f3b511;
  --accent-press: #dca10a;
  --accent-ink: #15181c;
  --focus: #1f6feb;

  --margin: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --gap-section: clamp(96px, 12vw, 176px);

  --t-display: clamp(2.5rem, 1.7rem + 2.8vw, 4rem);
  --t-h2: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --t-h3: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  --t-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }

/* Pasek */
.bar { position: sticky; top: 0; z-index: 5; background: var(--ground); }
.bar .wrap { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a, .lang { text-decoration: none; font-weight: 600; font-size: var(--t-small); color: var(--ink-soft); }
.nav a, .lang { position: relative; display: inline-flex; align-items: center; min-height: 44px; }
.lang { padding: 0 10px; margin-right: -10px; }
.nav a:hover, .lang:hover { color: var(--ink); text-decoration: underline; }
.on-field :focus-visible { outline-color: #8ab8ff; }
.bar .btn { padding: 10px 18px; font-size: var(--t-small); }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 28px; border: 0; border-radius: 4px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-steam { background: var(--accent); color: var(--accent-ink); }
.btn-steam:hover { background: var(--accent-press); text-decoration: none; }
.btn-second { background: var(--tone); color: var(--ink); }
.btn-second:hover { background: #dcdcd5; text-decoration: none; }
.on-field .btn-second { background: var(--field-tone); color: var(--field-ink); }
.on-field .btn-second:hover { background: #313d4a; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Zaślepka „wkrótce” — nieklikalna */
.soon { display: inline-flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--tone); border-radius: 4px; font-weight: 700; }
.soon::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.on-field .soon { background: var(--field-tone); color: var(--field-ink); }

/* Hero */
.hero { padding: clamp(24px, 4vw, 56px) 0 0; }
.hero .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 32px; align-items: center; }
.hero-text { grid-column: 1 / span 6; padding: 24px 0 48px; }
.hero h1 { font-size: var(--t-display); line-height: 1.02; letter-spacing: -0.035em; }
.hero .lead { margin-top: 28px; font-size: var(--t-lead); color: var(--ink-soft); max-width: 34em; }
.hero .cta { margin-top: 40px; }
.hero .note { margin-top: 16px; font-size: var(--t-small); color: var(--ink-soft); }
.hero-pic { grid-column: 7 / -1; margin: 0; }
.hero-pic img { width: 100%; height: min(76vh, 720px); min-height: 460px; object-fit: cover; object-position: 30% 40%; }

/* Sekcje */
section { scroll-margin-top: 80px; }
.section { padding-top: var(--gap-section); }
.section-head { max-width: 22ch; font-size: var(--t-h2); line-height: 1.08; }

.feature { margin-top: clamp(56px, 7vw, 96px); }
.feature h3 { font-size: var(--t-h3); line-height: 1.2; }
.feature p { margin-top: 14px; max-width: 36em; }
.caption { margin-top: 12px; font-size: var(--t-small); color: var(--ink-soft); }

/* Przewozy: szeroki kadr, tekst pod nim w dwóch kolumnach */
.f-wide figure { margin: 0; }
.f-wide .text { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 32px; margin-top: 32px; }
.f-wide .text h3 { grid-column: 1 / span 4; }
.f-wide .text p { grid-column: 6 / -1; margin-top: 0; }

/* Tabor: tekst i kadr obok siebie */
.f-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; }
.f-split .text { grid-column: 1 / span 5; }
.f-split figure { grid-column: 7 / -1; margin: 0; }

/* Konkurencja: płaszczyzna tonu z wycinkiem wyniku */
.f-field { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; background: var(--tone); padding: clamp(28px, 4vw, 56px); }
.f-field figure { grid-column: 1 / span 7; margin: 0; }
.f-field figure img { width: 100%; }
.f-field .text { grid-column: 9 / -1; }

/* Zasięg */
.reach { padding-top: var(--gap-section); }
.reach .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 32px; align-items: end; }
.reach p.big { grid-column: 1 / span 8; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
.reach p.small { grid-column: 10 / -1; font-size: var(--t-lead); color: var(--ink-soft); }

/* Demo — jedyna ciemna płaszczyzna */
.demo { margin-top: var(--gap-section); background: var(--field); color: var(--field-ink); padding: clamp(80px, 10vw, 144px) 0; }
.demo .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px 32px; }
.demo .text { grid-column: 1 / span 6; }
.demo h2 { font-size: var(--t-h2); line-height: 1.08; }
.demo .text p { margin-top: 24px; font-size: var(--t-lead); color: var(--field-ink); max-width: 32em; }
.demo .cta { margin-top: 40px; }
.req { grid-column: 8 / -1; align-self: start; }
.req h3 { font-size: 1.125rem; }
.req dl { margin: 16px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 0; }
.req dt, .req dd { margin: 0; padding: 14px 0; }
.req dt { font-weight: 600; padding-right: 24px; }
.req dd { color: var(--field-soft); }
.req dt:nth-of-type(odd), .req dd:nth-of-type(odd) { background: var(--field-tone); }
.req dt:nth-of-type(odd) { padding-left: 16px; }
.req dd:nth-of-type(odd) { padding-right: 16px; }
.req dt:nth-of-type(even) { padding-left: 16px; }

/* Stopka */
.foot { padding: clamp(72px, 9vw, 120px) 0 40px; }
.foot .name { font-size: clamp(2.25rem, 1.2rem + 5vw, 5.5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.foot .row { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 40px; font-weight: 600; }
.foot .row a { text-decoration: none; }
.foot .row a:hover { text-decoration: underline; }
.foot .social { display: flex; gap: 12px; }
.foot .social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; background: var(--tone); border-radius: 50%; }
.foot .social svg { width: 18px; height: 18px; fill: var(--ink); }
.foot .legal { margin-top: 40px; font-size: var(--t-small); color: var(--ink-soft); max-width: 60em; }
.foot .legal p + p { margin-top: 6px; }

/* Strona prywatności */
.doc { padding: clamp(48px, 8vw, 112px) 0 0; }
.doc h1 { font-size: var(--t-h2); line-height: 1.08; }
.doc p { margin-top: 20px; max-width: 40em; font-size: var(--t-lead); }

/* Telefon i tablet */
@media (max-width: 900px) {
  .nav { display: none; }
  .bar .wrap { gap: 16px; }
  .lang { margin-left: auto; }
  .hero .wrap, .f-wide .text, .f-split, .f-field, .demo .wrap { grid-template-columns: 1fr; }
  .hero-text, .hero-pic, .f-wide .text h3, .f-wide .text p, .f-split .text, .f-split figure,
  .f-field figure, .f-field .text, .demo .text, .req { grid-column: 1 / -1; }
  .hero-text { padding-bottom: 32px; }
  .hero-pic { margin-left: calc(-1 * var(--margin)); margin-right: calc(-1 * var(--margin)); }
  .reach .wrap { grid-template-columns: 1fr; }
  .reach p.big, .reach p.small { grid-column: 1 / -1; }
  .hero-pic img { height: auto; min-height: 0; aspect-ratio: 4 / 5; }
  .f-split figure { order: -1; }
  .f-field { margin-left: calc(-1 * var(--margin)); margin-right: calc(-1 * var(--margin)); }
}
@media (max-width: 600px) {
  .bar .btn { display: none; }
}
@media (max-width: 420px) {
  .brand span { font-size: 1rem; }
  .bar .btn { padding: 9px 12px; }
  .btn, .soon { width: 100%; }
}

/* Co jest w grze: nagłówek z lewej, lista dwóch kolumn z prawej */
.perks .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
.perks h2 { grid-column: 1 / span 4; font-size: var(--t-h2); line-height: 1.08; }
.perks ul { grid-column: 5 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 48px 40px; }
.perks h3 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.01em; }
.perks p { margin-top: 8px; color: var(--ink-soft); }
@media (max-width: 900px) {
  .perks .wrap, .perks ul { grid-template-columns: 1fr; }
  .perks h2, .perks ul { grid-column: 1 / -1; }
  .perks ul { gap: 32px; }
}

/* Film w hero (wersja PL) */
.hero-video { position: relative; grid-column: 6 / -1; margin: 0; }
.hero:has(.hero-video) .hero-text { grid-column: 1 / span 5; }
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tone); }
.video-toggle { position: absolute; right: 12px; top: 12px; padding: 8px 14px; border: 0; border-radius: 4px; background: rgba(21, 24, 28, 0.78); color: #fff; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.video-toggle:hover { background: rgba(21, 24, 28, 0.92); }
@media (max-width: 900px) { .hero-video, .hero:has(.hero-video) .hero-text { grid-column: 1 / -1; } .hero-video { margin: 0 calc(-1 * var(--margin)); } }

/* Ruch — tylko gdy system nie ogranicza animacji. Bez skryptu wszystko jest widoczne. */
@media (prefers-reduced-motion: no-preference) {
  .bar { transition: background-color 240ms ease; }
  .bar .wrap { transition: min-height 240ms ease; }
  .bar.is-scrolled { background: rgba(245, 245, 242, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .bar.is-scrolled .wrap { min-height: 60px; }

  .nav a { text-decoration: none !important; }
  .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 260ms cubic-bezier(.2,.7,.2,1); }
  .nav a:hover::after { transform: scaleX(1); transform-origin: left; }

  .btn { transition: background-color 160ms ease, transform 200ms cubic-bezier(.2,.7,.2,1); }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .soon::before { animation: puls 2.4s ease-in-out infinite; }
  @keyframes puls { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }

  /* Wejście hero przy załadowaniu */
  .js .hero h1, .js .hero .lead, .js .hero .cta { animation: wejdz 900ms cubic-bezier(.2,.7,.2,1) both; }
  .js .hero .lead { animation-delay: 120ms; }
  .js .hero .cta { animation-delay: 240ms; }
  .js .hero-pic { animation: odslon 1200ms cubic-bezier(.65,0,.25,1) 150ms both; }
  .js .hero-pic img, .js .hero-pic video { animation: przybliz 1800ms cubic-bezier(.2,.7,.2,1) 150ms both; }
  @keyframes wejdz { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  @keyframes odslon { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
  @keyframes przybliz { from { transform: scale(1.12); } to { transform: none; } }
  .hero-pic { overflow: hidden; }

  /* Wejście sekcji przy przewijaniu (klasy dodaje efekty.js) */
  .reveal { opacity: 0; transform: translateY(32px); transition: opacity 800ms ease, transform 900ms cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
  .reveal.is-in { opacity: 1; transform: none; }
  .reveal-pic { overflow: hidden; clip-path: inset(14% 0 0 0); transition: clip-path 1100ms cubic-bezier(.65,0,.25,1); }
  .reveal-pic img { transform: scale(1.08); transition: transform 1600ms cubic-bezier(.2,.7,.2,1); }
  .reveal-pic.is-in { clip-path: inset(0 0 0 0); }
  .reveal-pic.is-in img { transform: none; }

  /* Zasięg: tekst „Docelowo: cała Polska” wypełnia się akcentem */
  .reach .mark { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 88% / 0% 0.32em; transition: background-size 1200ms cubic-bezier(.65,0,.25,1) 400ms; } /* taste-skill-ignore: jednolity pasek koloru */
  .reach .is-in .mark, .reach .mark.is-in { background-size: 100% 0.32em; }
}
