/* APOGEO – style strony firmowej
   Kolory zgodne z logo: granat #06223B, pomarańcz #FF7900.
   Motyw: Klasyczny. Kolory i kroje pisma są zmiennymi w :root – łatwo je zmienić w jednym miejscu. */

:root {
  /* paleta marki */
  --navy: #06223B;
  --orange: #FF7900;
  --orange-dark: #d96600;     /* pomarańcz do tekstu (lepszy kontrast) */
  --steel: #678099;
  --steel-light: #9DAEBE;

  /* role */
  --brand: var(--navy);       /* ramki, przycisk konturowy, ikonki */
  --heading: var(--navy);     /* nagłówki */
  --h1-accent: var(--steel);  /* druga linia hasła */
  --ink: #142233;             /* tekst */
  --muted: #55657a;           /* tekst drugorzędny */
  --bg: #ffffff;
  --bg-alt: #f3f6f9;
  --surface: #ffffff;         /* karty, chipy */
  --line: #dfe5ec;
  --header-bg: rgba(255,255,255,.94);
  --hero-bg: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  --contour: var(--steel-light);
  --contour-opacity: .55;
  --contact-bg: var(--navy);
  --footer-bg: #041829;

  /* kształty i typografia */
  --radius: 10px;
  --card-radius: 6px;
  --btn-radius: 999px;
  --wrap: 1140px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --font-label: var(--font);  /* małe etykiety (eyebrow, numery) */
  --head-weight: 700;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--heading); }
h1, h2, h3 {
  color: var(--heading); font-family: var(--font-head); font-weight: var(--head-weight);
  line-height: 1.15; margin: 0 0 .5em;
}
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-family: var(--font-label);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: .75em;
}

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: .85em 1.4em;
  border-radius: var(--btn-radius);
  border: 2px solid var(--orange);
  transition: background .2s, border-color .2s, color .2s;
}
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.btn-sm { padding: .5em 1.1em; font-size: .95rem; }

/* TYMCZASOWE: pasek „Strona w budowie” */
.notice-bar {
  background: #fff3e6;
  border-bottom: 1px solid #ffd9b3;
  color: var(--navy);
  font-size: .9rem;
  line-height: 1.45;
}
.notice-bar .wrap { padding-top: 9px; padding-bottom: 9px; text-align: center; }
.notice-bar strong { margin-right: .35em; }
.notice-bar a { color: var(--orange-dark); font-weight: 600; white-space: nowrap; }
.notice-dot {
  display: inline-block; width: 8px; height: 8px; margin-right: .6em;
  background: var(--orange); vertical-align: middle; position: relative; top: -1px;
  animation: notice-pulse 2s ease-in-out infinite;
}
@keyframes notice-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .notice-dot { animation: none; } }
@media (max-width: 600px) { .notice-bar { font-size: .84rem; } }

/* Nagłówek */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 68px; width: auto; margin-left: -8px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  text-decoration: none; color: var(--ink); font-weight: 500;
  position: relative; padding: 4px 0; white-space: nowrap;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 2px; background: var(--orange); transition: right .2s;
}
.nav a:not(.btn):hover::after { right: 0; }

.nav-toggle { display: none; }

@media (max-width: 980px) {
  .brand img { height: 60px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { height: 2px; background: var(--brand); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; justify-content: center; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  padding: clamp(64px, 11vw, 140px) 0 clamp(72px, 10vw, 130px);
}
.hero-contours {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--contour); opacity: var(--contour-opacity);
}
.hero-contours .plus { color: var(--steel); }
.hero-contours .stake { stroke: var(--brand); }
.hero-contours .stake-box { fill: var(--orange); }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--orange) 0 32%, var(--brand) 32% 100%);
}
.hero-inner { position: relative; max-width: var(--wrap); }
.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  letter-spacing: -.02em;
  max-width: 20ch;
  margin-bottom: .45em;
}
.hero h1 span { color: var(--h1-accent); font-weight: 600; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }

@media (max-width: 820px) {
  .hero-contours { opacity: calc(var(--contour-opacity) * .55); }
  .hero-contours .stake, .hero-contours .stake-box { display: none; }
  .hero h1 { max-width: none; }
}

/* Sekcje */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p:last-child { color: var(--muted); }

/* Usługi */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service {
  padding: 32px 28px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .2s;
}
.service::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 0; height: 3px;
  background: var(--orange); transition: width .25s;
}
.service:hover { background: var(--bg-alt); }
.service:hover::before { width: calc(100% + 2px); }
.service .num {
  display: inline-block;
  font-family: var(--font-label);
  font-size: .85rem; font-weight: 700;
  color: var(--orange-dark);
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}
.service p { color: var(--muted); margin: 0; font-size: .98rem; }

@media (max-width: 900px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } .service { padding: 24px 20px; } }

/* Geodezja kolejowa */
.rail-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 64px; align-items: start; }
.rail-intro { position: sticky; top: 110px; }
.rail-intro p:not(.eyebrow) { color: var(--muted); }
.rail-art { width: 100%; max-width: 300px; margin: 28px 0 32px; color: var(--brand); }
.rail-art .sleepers { color: var(--steel-light); stroke: var(--steel-light); }
.rail-art .axis { stroke: var(--orange); }
.rail-art .axis-box { fill: var(--orange); }

.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rail-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--card-radius);
  padding: 20px 24px;
  transition: border-color .2s, transform .2s;
}
.rail-list li:hover { border-left-color: var(--orange); transform: translateX(3px); }
.rail-list h3 { font-size: 1.05rem; margin-bottom: .3em; }
.rail-list p { margin: 0; color: var(--muted); font-size: .96rem; }
.rail-list .sub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rail-list .sub-list li {
  background: none; border: 0; border-radius: 0; padding: 0 0 0 18px; transform: none;
  position: relative; color: var(--muted); font-size: .96rem;
}
.rail-list .sub-list li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; background: var(--orange);
}

@media (max-width: 900px) {
  .rail-grid { grid-template-columns: 1fr; gap: 36px; }
  .rail-intro { position: static; }
  .rail-art { max-width: 220px; margin: 20px 0 24px; }
}
@media (prefers-reduced-motion: reduce) { .rail-list li:hover { transform: none; } }

/* Kroki */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 2px solid var(--brand);
  color: var(--brand); font-weight: 700; font-family: var(--font-label);
  background: var(--surface);
}
.steps li::after {
  content: ""; position: absolute; top: 22px; left: 56px; right: -20px;
  border-top: 2px dashed var(--steel-light);
}
.steps li:last-child::after { display: none; }
.steps li:last-child::before { background: var(--orange); border-color: var(--orange); color: #fff; }
.steps p { color: var(--muted); margin: 0; font-size: .98rem; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps li { padding: 0 0 0 64px; }
}

/* Obszar */
.area { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.area p { color: var(--muted); }
.area-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.area-list li {
  padding: .5em 1em;
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  background: var(--surface);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: .5em;
}
.area-list li::before {
  content: ""; width: 7px; height: 7px; background: var(--orange);
}
.link-arrow {
  font-weight: 600; text-decoration: none; color: var(--heading);
  border-bottom: 2px solid var(--orange); padding-bottom: 2px;
}
.link-arrow::after { content: " →"; }
.link-arrow:hover { color: var(--orange-dark); }

@media (max-width: 820px) { .area { grid-template-columns: 1fr; gap: 32px; } }

/* Kontakt */
.contact { background: var(--contact-bg); color: #d5dee8; position: relative; overflow: hidden; }
.contact h2, .contact h3 { color: #fff; }
.contact .eyebrow { color: var(--orange); }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.contact-main > p { max-width: 52ch; }

.contact-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list small {
  display: block; font-family: var(--font-label);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--steel-light);
}
.contact-list a { color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 600; word-break: break-word; }
.contact-list a:hover { color: var(--orange); }
.contact-list li > div { color: #fff; font-size: 1.05rem; }
.ic {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
}
.ic svg { width: 20px; height: 20px; fill: var(--orange); }

.company-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.14);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 28px;
}
.company-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
.company-card dt { color: var(--steel-light); font-size: .9rem; }
.company-card dd { margin: 0; color: #fff; font-weight: 500; overflow-wrap: anywhere; }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .88rem; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 420px) {
  .company-card dl { grid-template-columns: 1fr; gap: 2px; }
  .company-card dd { margin-bottom: 10px; }
}

/* Stopka */
.site-footer { background: var(--footer-bg); color: var(--steel-light); font-size: .9rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 22px; padding-bottom: 22px;
}
.footer-inner p { margin: 0; }
.footer-inner strong { color: #fff; }
