.service-page {
  --service-accent: var(--accent-highlight);
  --service-accent-rgb: 255, 138, 29;
  background: var(--paper);
}

.service--milling { --service-accent: #ff9b42; --service-accent-rgb: 255, 155, 66; }
.service--grinding { --service-accent: #ffc06a; --service-accent-rgb: 255, 192, 106; }
.service--welding { --service-accent: #ff6d28; --service-accent-rgb: 255, 109, 40; }
.service--assembly { --service-accent: #e9a56c; --service-accent-rgb: 233, 165, 108; }

.service-header {
  color: var(--ink);
  border-bottom-color: var(--line);
  background: rgba(243, 242, 239, 0.96);
  backdrop-filter: blur(18px);
}

.service-header .brand-logo-on-dark {
  opacity: 0;
}

.service-header .brand-logo-on-light {
  opacity: 1;
}

.service-hero {
  position: relative;
  min-height: min(78svh, 780px);
  padding-top: var(--header);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.service-hero::before,
.service-hero::after {
  position: absolute;
  right: 0;
  left: 0;
  pointer-events: none;
  content: "";
}

.service-hero::before {
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 79% 34%, rgba(var(--service-accent-rgb), .08), transparent 28%),
    linear-gradient(90deg, rgba(14, 16, 18, 0.94) 0%, rgba(14, 16, 18, 0.78) 35%, rgba(14, 16, 18, 0.22) 62%, rgba(14, 16, 18, 0.04) 100%),
    linear-gradient(0deg, rgba(14, 16, 18, 0.38) 0%, transparent 40%);
}

.service-hero::after {
  right: 0;
  bottom: -4px;
  left: 0;
  z-index: 2;
  height: 260px;
  background: linear-gradient(
    180deg,
    rgba(243, 242, 239, 0) 0%,
    rgba(243, 242, 239, 0) 12%,
    rgba(243, 242, 239, 0.08) 28%,
    rgba(243, 242, 239, 0.3) 47%,
    rgba(243, 242, 239, 0.72) 69%,
    rgba(243, 242, 239, 0.98) 88%,
    var(--paper) 96%,
    var(--paper) 100%
  );
}

.service-hero + .section {
  position: relative;
  z-index: 5;
  margin-top: -8px;
  background: var(--paper);
}

.service-hero-copy {
  position: relative;
  z-index: 4;
  display: flex;
  width: min(980px, calc(100% - 80px));
  min-height: calc(min(78svh, 780px) - var(--header));
  flex-direction: column;
  justify-content: flex-end;
  margin-left: clamp(40px, 7vw, 120px);
  padding: clamp(74px, 6vw, 105px) 0 clamp(112px, 11vh, 148px);
}

.service-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(28px, 3.5vw, 46px);
  color: var(--text-on-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-breadcrumbs a:hover {
  color: var(--accent-on-dark);
}

.service-hero h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(3.5rem, 5.8vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.93;
}

.service-hero h1 span {
  display: block;
  color: var(--service-accent);
}

.service-lead {
  max-width: 610px;
  margin-bottom: 20px;
  color: #c1c4c6;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

.service-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 0;
  max-width: 760px;
  margin: 0 0 24px;
  padding: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.115em;
  list-style: none;
  text-transform: uppercase;
}

.service-hero-meta li {
  position: relative;
  padding: 0 19px;
}

.service-hero-meta li:first-child { padding-left: 0; }

.service-hero-meta li + li::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 3px;
  background: var(--service-accent);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.service-hero .button {
  align-self: flex-start;
}

.service-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.service-hero-media[data-reveal] {
  opacity: 1;
  clip-path: inset(0);
  transform: none;
  animation: service-photo-enter 1.15s cubic-bezier(.2, .75, .2, 1) both;
  transition: none;
}

.service-hero-media[data-reveal].is-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: none;
}

@keyframes service-photo-enter {
  from { opacity: .28; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1); }
}

.service-hero-media::after {
  display: none;
}

.service-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.72) contrast(1.06);
}

.service-number {
  position: absolute;
  right: 36px;
  bottom: 104px;
  z-index: 4;
  color: rgba(255,255,255,.76);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Rysunek techniczny w hero — jeden alfabet, pięć motywów procesu. */
.service-tech {
  position: absolute;
  top: clamp(130px, 16vh, 190px);
  right: clamp(38px, 7vw, 118px);
  z-index: 3;
  width: clamp(190px, 21vw, 330px);
  aspect-ratio: 1;
  color: var(--service-accent);
  opacity: 0;
  pointer-events: none;
}

.service-tech.is-visible { opacity: .34; }

.service-tech::before,
.service-tech::after,
.service-tech .tech-axis,
.service-tech .tech-shape,
.service-tech .tech-point {
  position: absolute;
  display: block;
  content: "";
}

.service-tech::before {
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.22) .7px, transparent .7px);
  background-size: 13px 13px;
  border: 1px solid rgba(255,255,255,.15);
}

.service-tech::after {
  inset: 12%;
  border: 1px solid rgba(var(--service-accent-rgb), .42);
}

.service-tech .tech-axis {
  top: 50%;
  left: 50%;
  background: rgba(var(--service-accent-rgb), .72);
  transform-origin: left center;
}

.service-tech .tech-axis-x { width: 58%; height: 1px; }
.service-tech .tech-axis-y { width: 1px; height: 58%; }

.service-tech .tech-shape {
  inset: 24%;
  border: 1px solid currentColor;
}

.service-tech .tech-point {
  top: calc(50% - 4px);
  left: calc(50% - 4px);
  width: 9px;
  height: 9px;
  background: var(--service-accent);
  border: 2px solid rgba(14,16,18,.72);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(var(--service-accent-rgb), .16);
}

.service-tech .tech-code {
  position: absolute;
  right: 0;
  bottom: -24px;
  padding-left: 44px;
  color: rgba(255,255,255,.78);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-tech .tech-code::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 34px;
  height: 1px;
  background: var(--service-accent);
  content: "";
}

.service-tech.is-visible .tech-axis-x { animation: tech-draw-x 1s .45s both cubic-bezier(.2,.75,.2,1); }
.service-tech.is-visible .tech-axis-y { animation: tech-draw-y 1s .6s both cubic-bezier(.2,.75,.2,1); }

@keyframes tech-draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tech-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.service--turning .service-tech::after,
.service--turning .tech-shape { border-radius: 50%; }
.service--turning .tech-shape { box-shadow: 0 0 0 22px rgba(var(--service-accent-rgb),.09), 0 0 0 48px rgba(255,255,255,.08); }

.service--milling .service-tech { transform: rotate(-4deg); }
.service--milling .service-tech::after { inset: 15% 10% 10% 15%; }
.service--milling .tech-shape { inset: 25% 18% 19% 28%; box-shadow: inset 18px -18px rgba(var(--service-accent-rgb),.09); }
.service--milling .tech-point { border-radius: 1px; transform: rotate(45deg); }
.service--milling .tech-code { transform: rotate(4deg); }

.service--grinding .service-tech::before {
  background: repeating-linear-gradient(165deg, transparent 0 10px, rgba(255,255,255,.18) 10px 11px);
}
.service--grinding .service-tech::after { inset: 22% 8%; border-right: 0; border-left: 0; }
.service--grinding .tech-shape { inset: 35% 15%; border-right: 0; border-left: 0; box-shadow: 0 13px rgba(var(--service-accent-rgb),.08), 0 -13px rgba(var(--service-accent-rgb),.08); }

.service--welding .service-tech::before { background-image: radial-gradient(rgba(var(--service-accent-rgb),.32) 1px, transparent 1px); }
.service--welding .service-tech::after { inset: 16%; border: 0; border-bottom: 1px dashed rgba(255,255,255,.48); transform: rotate(-18deg); }
.service--welding .tech-shape { inset: 24%; border: 0; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.service--welding .tech-point { box-shadow: 0 0 18px 8px rgba(var(--service-accent-rgb),.28); }

.service--assembly .service-tech::after { inset: 13% 18% 27% 8%; }
.service--assembly .tech-shape { inset: 30% 9% 10% 27%; box-shadow: -20px -20px 0 -1px rgba(14,16,18,.18), -20px -20px 0 0 rgba(var(--service-accent-rgb),.62), -40px -40px 0 -1px rgba(14,16,18,.18), -40px -40px 0 0 rgba(255,255,255,.28); }
.service--assembly .tech-point { border-radius: 2px; }

.service-intro-grid {
  display: grid;
  grid-template-columns: minmax(180px, .3fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
}

.service-intro-content > p {
  max-width: 900px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.36rem);
}

.service-intro-content .display-heading {
  max-width: 1050px;
  margin-bottom: clamp(32px, 4vw, 52px);
  font-size: clamp(3rem, 5.2vw, 5.6rem);
  line-height: 0.97;
}

.service-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service-facts div {
  min-height: 132px;
  padding: 24px 30px 24px 0;
}

.service-facts div + div {
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.service-facts small,
.service-facts strong {
  display: block;
}

.service-facts small {
  margin-bottom: 28px;
  color: var(--orange);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.service-facts strong {
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: clamp(42px, 5vw, 66px);
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.scope-card {
  position: relative;
  overflow: hidden;
  min-height: 215px;
  padding: clamp(26px, 3vw, 42px);
  background: var(--ink);
}

.scope-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56px;
  height: 1px;
  background: rgba(var(--service-accent-rgb), .68);
  content: "";
  transition: width .45s ease;
}

.scope-card:hover::after { width: 100%; }

.scope-card span {
  display: block;
  margin-bottom: 34px;
  color: var(--accent-on-dark);
  font-size: .68rem;
  font-weight: 800;
}

.scope-card h3 {
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 2.6vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -.05em;
}

.scope-card p {
  max-width: 560px;
  margin: 0;
  color: var(--text-dark-muted);
}

.requirements {
  background: var(--paper-card);
}

.requirements-grid {
  display: grid;
  grid-template-columns: minmax(300px, .7fr) minmax(440px, 1fr);
  gap: clamp(48px, 7vw, 105px);
}

.requirements-copy h2 {
  margin: 36px 0 24px;
  font-size: clamp(2.8rem, 4.7vw, 5.1rem);
  font-weight: 500;
  letter-spacing: -.07em;
  line-height: .96;
}

.requirements-copy h2 span {
  color: var(--orange);
}

.requirements-copy p {
  max-width: 520px;
  color: var(--muted);
}

.requirements-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.requirements-list li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.requirements-list span {
  color: var(--orange);
  font-size: .68rem;
  font-weight: 800;
}

.requirements-list strong {
  display: block;
  margin-bottom: 5px;
}

.requirements-list p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.service-faq .faq-heading {
  position: static;
}

.service-cta {
  padding: clamp(72px, 7vw, 108px) 0;
  color: var(--white);
  background: var(--ink);
}

.service-cta-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.service-cta h2 {
  max-width: 930px;
  margin: 34px 0 0;
  font-size: clamp(3rem, 5.2vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -.075em;
  line-height: .94;
}

.service-cta h2 span {
  color: var(--accent-highlight);
}

.service-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-light);
  background: var(--ink);
}

.service-nav a {
  min-height: 92px;
  padding: 24px;
  color: var(--text-dark-muted);
  border-right: 1px solid var(--line-light);
  font-size: .78rem;
  font-weight: 800;
}

.service-nav a:hover,
.service-nav a[aria-current="page"] {
  color: var(--white);
  background: rgba(255,255,255,.045);
}

.service-nav a[aria-current="page"] {
  box-shadow: inset 0 3px var(--service-accent);
}

@media (min-width: 1101px) {
  .service--milling .scope-grid,
  .service--assembly .scope-grid { grid-template-columns: repeat(12, 1fr); }
  .service--milling .scope-card:nth-child(1),
  .service--milling .scope-card:nth-child(4) { grid-column: span 7; }
  .service--milling .scope-card:nth-child(2),
  .service--milling .scope-card:nth-child(3) { grid-column: span 5; }
  .service--grinding .scope-grid { grid-template-columns: repeat(4, 1fr); }
  .service--grinding .scope-card { min-height: 250px; }
  .service--welding .scope-grid { padding-bottom: 16px; }
  .service--welding .scope-card:nth-child(even) { transform: translateY(16px); }
  .service--assembly .scope-card:nth-child(1),
  .service--assembly .scope-card:nth-child(4) { grid-column: span 5; }
  .service--assembly .scope-card:nth-child(2),
  .service--assembly .scope-card:nth-child(3) { grid-column: span 7; }
  .service--milling .service-facts { grid-template-columns: 1.2fr .9fr .9fr; }
  .service--assembly .service-facts { grid-template-columns: .9fr .9fr 1.2fr; }
  .service--welding .requirements-grid { grid-template-columns: minmax(440px, 1fr) minmax(300px, .7fr); }
}

@media (max-width: 1100px) {
  .service-hero-copy { width: min(760px, calc(100% - 80px)); }
  .service-tech { right: 40px; width: min(27vw, 250px); }
  .service-nav { grid-template-columns: repeat(3, 1fr); }
}

.service-page .section { padding: clamp(62px, 5.5vw, 84px) 0; }
.service-page .section-top { margin-bottom: clamp(38px, 4vw, 58px); }
.service-page .faq-grid { gap: clamp(48px, 7vw, 105px); }
.service-page .faq-heading h2 { margin: 36px 0 24px; font-size: clamp(2.8rem, 4.8vw, 5.2rem); }
.service-page .accordion summary { padding: 24px 0; }
.service-page .accordion details p { margin-bottom: 24px; }

@media (max-width: 760px) {
  .service-hero { min-height: 710px; padding-top: 0; }
  .service-hero::before { background: linear-gradient(0deg, rgba(14,16,18,.94) 0%, rgba(14,16,18,.58) 58%, rgba(14,16,18,.08) 100%); }
  .service-hero::after { bottom: -4px; height: 170px; }
  .service-hero-copy { width: calc(100% - 36px); min-height: 710px; margin-left: 18px; padding: 116px 0 94px; justify-content: flex-end; }
  .service-breadcrumbs { margin-bottom: 30px; }
  .service-hero h1 { max-width: 100%; margin-bottom: 18px; font-size: var(--heading-mobile-xl); line-height: .96; }
  .service-lead { font-size: .98rem; }
  .service-hero-meta { gap: 8px 0; margin-bottom: 26px; font-size: .56rem; }
  .service-hero-meta li { padding: 0 13px; }
  .service-hero .button { align-self: stretch; }
  .service-tech { top: 108px; right: 18px; width: 138px; opacity: 0; }
  .service-tech.is-visible { opacity: .18; }
  .service-tech .tech-code { display: none; }
  .service-number { display: none; }
  .service-intro-grid { grid-template-columns: 1fr; }
  .service-intro-content .display-heading { font-size: clamp(2.8rem, 12vw, 4.3rem); line-height: 1; }
  .service-facts { grid-template-columns: 1fr; }
  .service-facts div { min-height: auto; padding: 24px 0; }
  .service-facts div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .service-facts small { margin-bottom: 18px; }
  .scope-grid { grid-template-columns: 1fr; }
  .scope-card { min-height: 190px; }
  .requirements-grid { grid-template-columns: 1fr; }
  .service-cta-inner { display: grid; }
  .service-nav { grid-template-columns: 1fr; }
  .service-nav a { min-height: 64px; }
  .service-page .section { padding: 52px 0; }
  .service-page .faq-grid { gap: 34px; }
  .service-page .accordion summary { padding: 20px 0; }
}

@media (max-width: 420px) {
  .service-hero-meta li:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .service-hero-media[data-reveal],
  .service-hero-media[data-reveal].is-visible {
    opacity: 1;
    clip-path: inset(0);
    transform: none;
    animation: none;
    transition: none;
  }
  .service-tech.is-visible .tech-axis-x,
  .service-tech.is-visible .tech-axis-y { animation: none; }
  .scope-card::after { transition: none; }
}
