/* Rail Terminal Rzepin – site styles */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-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+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-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+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-condensed-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+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-condensed-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-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+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --red: #e73028;          /* BTT brand red: large accents only */
  --red-strong: #d52a22;   /* buttons and small text on red: 5.02:1 with white */
  --red-hover: #b9241d;
  --ink: #1f2428;          /* text, dark bands */
  --steel: #5a6470;        /* secondary text */
  --concrete: #eef0f1;     /* section bands */
  --rail: #c4cad0;         /* track lines, hairlines */
  --paper: #ffffff;
  --on-dark-muted: #c9ced4;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--red-strong); }

:focus-visible {
  outline: 3px solid var(--red-strong);
  outline-offset: 3px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 9vw, 5.25rem); font-weight: 700; max-width: 17ch; }
h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.2; }

p { margin: 0; }
p, li, dd { hyphens: auto; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
}
.skip:focus { top: 1rem; color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--rail);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.25rem;
}
.brand { display: inline-flex; margin-right: auto; text-decoration: none; }
.brand:hover .brand-text { color: var(--ink); }
.brand-logo { width: auto; height: auto; max-height: 2.5rem; max-width: min(11rem, 36vw); }
.brand-text { display: grid; font-family: var(--font-display); font-size: 1.3125rem; font-weight: 700; line-height: 1.05; color: var(--ink); white-space: nowrap; }
.brand-text span:first-child { color: var(--red-strong); }

.nav-desktop ul, .lang, .menu-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop { display: none; }
.nav-desktop a, .menu-panel nav a { text-decoration: none; font-weight: 600; }

.lang { display: flex; gap: 0.25rem; }
.lang a {
  display: inline-block;
  padding: 0.4rem 0.5rem;
  color: var(--steel);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }

.menu { position: relative; }
.menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: #fff; }
@media (max-width: 26rem) {
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.icon { flex: none; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.5rem 0;
  background: #fff;
  border: 1px solid var(--rail);
  box-shadow: 0 16px 40px rgba(31, 36, 40, 0.18);
}
.menu-panel nav a { display: block; padding: 0.8rem 1.25rem; }

@media (min-width: 62rem) {
  .nav-desktop { display: block; }
  .header-inner { gap: 1.5rem; min-height: 5rem; }
  .brand-logo { max-height: 3rem; max-width: 13rem; }
  .nav-desktop ul { display: flex; gap: 1.75rem; }
  .menu { display: none; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 3px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.btn-primary { background: var(--red-strong); color: #fff; }
.btn-primary:hover { background: var(--red-hover); color: #fff; }
.btn-secondary { border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--concrete); color: var(--ink); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.75); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }

/* Hero */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.lead { max-width: 40rem; margin-top: 1.25rem; font-size: clamp(1.125rem, 2.3vw, 1.3125rem); }

.route {
  margin: clamp(2.5rem, 7vw, 4.5rem) 0 0;
  padding: clamp(1.25rem, 3.5vw, 2.25rem) clamp(1rem, 3.5vw, 2.25rem);
  background: var(--concrete);
}
.route-ends { display: flex; justify-content: space-between; gap: 1rem; }
.route-end { display: grid; gap: 0.15rem; }
.route-end strong { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2.5rem); font-weight: 700; line-height: 1; }
.route-end span { color: var(--steel); font-size: 0.9375rem; line-height: 1.35; }
.route-end-to { text-align: right; }
.route-line { width: 100%; height: auto; margin-block: 1rem; }
.r-sleepers { stroke: var(--rail); stroke-width: 14; stroke-dasharray: 2 12; }
.r-track, .r-buffer { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.r-node { fill: var(--ink); }
.r-train { fill: var(--red); transform: translateX(300px); animation: travel 2.8s cubic-bezier(0.5, 0, 0.2, 1) 0.4s both; }
@keyframes travel {
  from { transform: translateX(0); }
  to { transform: translateX(300px); }
}
.route-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; font-weight: 600; }
.route-meta { flex-direction: column; align-items: center; text-align: center; }
@media (min-width: 36rem) {
  .route-meta { flex-direction: row; }
  .route-meta span + span { padding-left: 1.25rem; border-left: 1px solid var(--rail); }
}

/* Sections */
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.band { background: var(--concrete); }
.dark { background: var(--ink); color: #fff; }
.dark :focus-visible { outline-color: #fff; }

.split { display: grid; gap: 2rem; }
@media (min-width: 62rem) {
  .split { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
}
.intro { max-width: 34rem; margin-top: 1rem; color: var(--steel); }
.dark .intro { color: var(--on-dark-muted); }

/* Specs */
.specs { margin: 0; border-top: 2px solid var(--ink); }
.specs > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rail);
}
.specs dt { color: var(--steel); }
.specs dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.125rem);
  font-weight: 600;
  line-height: 1.1;
  hyphens: none;
}

/* Services */
.services { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.services li { position: relative; padding: 1.25rem 0 1.25rem 2.25rem; border-bottom: 1px solid var(--rail); }
.services li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.75rem;
  width: 1.25rem;
  height: 3px;
  background: var(--red);
}
.services p { margin-top: 0.35rem; color: var(--steel); }
.note { margin-top: 1.25rem; color: var(--steel); }
.units-h { margin-top: 2.25rem; }
.units { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0.85rem 0 0; padding: 0; }
.units li { padding: 0.35rem 0.75rem; border: 1px solid var(--ink); background: var(--paper); }

/* Drivers */
.addr-label { color: var(--on-dark-muted); font-size: 0.9375rem; }
.addr {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.75rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.1;
}
.dark .actions { margin-top: 1.75rem; }

/* Documents */
.doc-groups { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 48rem) {
  .doc-groups { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
.doc-group h3 { padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); }
.docs { list-style: none; margin: 0; padding: 0; }
.docs a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--rail);
  text-decoration: none;
}
.docs a:hover { color: var(--ink); }
.docs a:hover .doc-title { text-decoration: underline; }
.doc-type {
  flex: none;
  padding: 0.05rem 0.35rem;
  border: 1px solid currentColor;
  color: var(--steel);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.doc-title { flex: 1; font-weight: 600; line-height: 1.35; }
.doc-icon { flex: none; width: 1.25rem; height: 1.25rem; fill: none; stroke: var(--red-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Contact */
.contact { display: grid; gap: 2rem; margin: 2.5rem 0 0; }
@media (min-width: 48rem) {
  .contact { grid-template-columns: 1fr 1.4fr 1fr; }
}
.contact dt { color: var(--steel); font-size: 0.9375rem; }
.contact dd {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.4vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
  hyphens: none;
}
.contact dd a { text-decoration: none; }
.contact dd a:hover { text-decoration: underline; }
.contact address { font-family: var(--font-body); font-size: 1.0625rem; font-style: normal; font-weight: 400; line-height: 1.5; }
.group-note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rail); color: var(--steel); }
.group-note a { color: var(--ink); font-weight: 600; }

/* Footer */
.site-footer { padding-block: 2.5rem; background: var(--ink); color: var(--on-dark-muted); font-size: 0.875rem; }
.site-footer p { max-width: 60rem; }
.site-footer p + p { margin-top: 0.5rem; }
.site-footer :focus-visible { outline-color: #fff; }

/* 404 */
.notfound { min-height: 70vh; }
.notfound .lead + p { margin-top: 1rem; color: var(--steel); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .r-train { animation: none; }
}
