/* ============ Strona Cyfrowa — design system ============ */
/* Brand: #86119C magenta-violet · #3B119C deep violet · #119C22 green · #589C07 olive · #412047 plum */
/* Type: Fraunces (display serif) + Space Grotesk (grotesque sans) — self-hosted */

/* ---------- Self-hosted fonts (SIL Open Font License) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin.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: "Space Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin.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 {
  --violet: #86119C;
  --violet-deep: #3B119C;
  --green: #119C22;
  --green-olive: #589C07;
  --plum: #412047;
  --bg-light: #f2ecf6;
  --ink: #2a1233;
  --ink-soft: #4a2d55;
  --on-dark: #f2ecf6;
  --muted: #7a6a85;
  --muted-dark: #c5b3d1;
  --green-bright: #6fdc7d;
  --line-light-mode: rgba(65, 32, 71, 0.16);
  --line-dark-mode: rgba(242, 236, 246, 0.18);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Space Grotesk", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--bg-light);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--green); color: #fff; }

img { display: block; max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--plum); color: var(--on-dark);
  padding: 0.75rem 1.5rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.9rem 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--violet-deep);
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: scale(1.06); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.btn--solid { background: var(--green); border-color: var(--green); color: #fff; }
.btn--solid:hover { background: var(--green-olive); border-color: var(--green-olive); }
.btn--ghost { background: transparent; color: var(--violet-deep); }
.btn--ghost:hover { background: var(--violet-deep); color: #fff; }
.btn--onDark { border-color: var(--on-dark); color: var(--on-dark); }
.btn--onDark:hover { background: var(--on-dark); color: var(--plum); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 1rem; left: 0; right: 0;
  display: flex; justify-content: center;
  z-index: 50; padding: 0 1rem; pointer-events: none;
}
.nav__pill {
  pointer-events: auto;
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; width: min(1100px, 100%);
  padding: 0.55rem 1.2rem 0.55rem 2rem;
  border-radius: 999px;
  background: rgba(242, 236, 246, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-light-mode);
}
/* content stays above the hover glow (menu keeps its own positioning) */
.nav__pill > *:not(.nav__glowclip):not(.nav__menu) { position: relative; z-index: 1; }
/* clips the glow sphere to the pill's rounded shape */
.nav__glowclip {
  position: absolute; inset: 0; z-index: 0;
  border-radius: 999px; overflow: hidden; pointer-events: none;
}
/* cursor-following glow: darker purple ellipse tilted 40deg left, opacity pulses 50% <-> 100% in a 2s loop (JS-driven) */
/* rotation is applied in JS (main.js place()) because it owns the element's transform */
.nav__glow {
  position: absolute; left: 0; top: 0;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(59, 17, 156, 0.55) 0%,
    rgba(59, 17, 156, 0.28) 40%,
    rgba(59, 17, 156, 0) 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s linear;
  will-change: transform, opacity;
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.nav__brand img { width: 34px; height: 34px; }

/* ---------- 3D cube logo — 0 on top, scroll reveals 1 ---------- */
.cube { display: inline-block; flex: none; perspective: 480px; }
.cube--nav { --cube-s: 34px; width: 34px; height: 34px; }
.cube--hero { --cube-s: clamp(58px, 7vw, 84px); width: var(--cube-s); height: var(--cube-s); }
.cube__rotor {
  display: block;
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--cube-x, -19deg)) rotateY(var(--cube-y, -38deg));
  will-change: transform;
}
.cube--hero .cube__rotor {
  transform: rotateX(var(--cube-xh, 0deg)) rotateY(var(--cube-yh, -20deg));
}
.cube__face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600;
  font-size: calc(var(--cube-s) * 0.44); line-height: 1;
  color: #fff;
  border: 1px solid rgba(242, 236, 246, 0.35);
  border-radius: calc(var(--cube-s) * 0.14);
  backface-visibility: hidden;
}
.cube__face--front  { background: var(--plum); transform: translateZ(calc(var(--cube-s) / 2)); }
.cube__face--right  { background: linear-gradient(135deg, var(--violet), var(--violet-deep)); transform: rotateY(90deg) translateZ(calc(var(--cube-s) / 2)); }
.cube__face--back   { background: var(--violet-deep); transform: rotateY(180deg) translateZ(calc(var(--cube-s) / 2)); }
.cube__face--left   { background: linear-gradient(135deg, var(--violet-deep), var(--plum)); transform: rotateY(-90deg) translateZ(calc(var(--cube-s) / 2)); }
.cube__face--top    { background: linear-gradient(135deg, var(--green), var(--green-olive)); transform: rotateX(90deg) translateZ(calc(var(--cube-s) / 2)); }
.cube__face--bottom { background: var(--green); transform: rotateX(-90deg) translateZ(calc(var(--cube-s) / 2)); }

.hero__brandrow { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 2rem; }
.hero__brandrow .hero__eyebrow { margin-bottom: 0; }
.nav__logo {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.2rem, 5.25vw, 1.68rem);
  color: var(--ink); letter-spacing: -0.01em;
}
.nav__logo span { color: var(--violet); }

/* ---------- True 3D extruded wordmark (green depth layers) ---------- */
.nav__brand, .footer__brand { perspective: 700px; }
.logo3d {
  position: relative; display: inline-block;
  transform-style: preserve-3d;
  transform: rotateX(var(--text-x, -10deg));
}
.logo3d__front { position: relative; }
.nav__logo .logo3d__front { color: var(--ink); }
.nav__logo .logo3d__front span { color: var(--violet); }
.footer__logo .logo3d__front { color: var(--ink); }
.footer__logo .logo3d__front span { color: var(--violet); }
.nav__logo .logo3d__layer, .footer__logo .logo3d__layer {
  position: absolute; inset: 0; pointer-events: none;
}
.nav__logo .logo3d__layer span, .footer__logo .logo3d__layer span { color: inherit; }
.logo3d__layer:nth-of-type(1) { transform: translateZ(-0.65px); color: #119C22; }
.logo3d__layer:nth-of-type(2) { transform: translateZ(-1.3px); color: #119C22; }
.logo3d__layer:nth-of-type(3) { transform: translateZ(-1.95px); color: #119C22; }
.logo3d__layer:nth-of-type(4) { transform: translateZ(-2.6px); color: #119C22; }
.logo3d__layer:nth-of-type(5) { transform: translateZ(-3.25px); color: #119C22; }
.logo3d__layer:nth-of-type(6) { transform: translateZ(-3.9px); color: #119C22; }
.logo3d__layer:nth-of-type(7) { transform: translateZ(-4.55px); color: #119C22; }
.logo3d__layer:nth-of-type(8) { transform: translateZ(-5.2px); color: #119C22; }
.logo3d__layer:nth-of-type(9) { transform: translateZ(-5.85px); color: #119C22; }
.logo3d__layer:nth-of-type(10) { transform: translateZ(-6.5px); color: #119C22; }
.logo3d__layer:nth-of-type(11) { transform: translateZ(-7.15px); color: #119C22; }
.logo3d__layer:nth-of-type(12) { transform: translateZ(-7.8px); color: #119C22; }
.logo3d__layer:nth-of-type(13) { transform: translateZ(-8.45px); color: #119C22; }
.logo3d__layer:nth-of-type(14) { transform: translateZ(-9.1px); color: #119C22; }
.logo3d__layer:nth-of-type(15) { transform: translateZ(-9.75px); color: #119C22; }
.logo3d__layer:nth-of-type(16) { transform: translateZ(-10.4px); color: #119C22; }
.logo3d__layer:nth-of-type(17) { transform: translateZ(-11.05px); color: #119C22; }
.logo3d__layer:nth-of-type(18) { transform: translateZ(-11.7px); color: #119C22; }
.nav__menu {
  display: flex; align-items: center; gap: 1.75rem; list-style: none;
}
.nav__menu a {
  color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  position: relative; transition: color 0.2s var(--ease);
}
.nav__menu a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--green);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav__menu a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__menu a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.nav__cta {
  border: 1px solid var(--violet-deep); border-radius: 999px;
  padding: 0.45rem 1.2rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav__cta:hover { background: var(--violet-deep); color: #fff; }
.nav__lang {
  margin-left: auto;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--violet-deep);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__lang:hover { background: var(--violet-deep); color: #fff; }
.nav__lang:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.nav__toggle {
  display: flex; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.25s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Desktop nav swap: logo bar <-> pill menu (PC only) ---------- */
/* Bar rests like the mobile bar (brand + two lines). Clicking the toggle
   slides the brand down out of the bar and the menu options slide down in,
   evenly spaced, all as pills like "Darmowa wycena". */
@media (min-width: 1025px) {
  .nav__pill { overflow: hidden; } /* clips the slide animations; mobile dropdown unaffected (it lives <1025px) */
  .nav__brand { transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
  .nav__pill.is-swapped .nav__brand,
  .nav__pill.is-swapped .nav__lang {
    transform: translateY(170%); opacity: 0; pointer-events: none;
  }
  .nav__pill > .nav__toggle.nav__toggle.nav__toggle { z-index: 2; } /* keep the X clickable above the menu overlay (extra class = specificity tie-break) */
  .nav__menu {
    position: absolute; inset: 0; z-index: 1;
    align-items: center; justify-content: space-evenly; gap: 0.5rem;
    padding: 0 60px 0 16px;
    visibility: hidden; pointer-events: none;
    transition: visibility 0s linear 0.5s; /* let the slide-up finish before hiding */
  }
  .nav__menu li {
    opacity: 0; transform: translateY(-170%);
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  }
  .nav__pill.is-swapped .nav__menu { visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .nav__pill.is-swapped .nav__menu li { opacity: 1; transform: translateY(0); }
  .nav__pill.is-swapped .nav__menu li:nth-child(1) { transition-delay: 0.05s; }
  .nav__pill.is-swapped .nav__menu li:nth-child(2) { transition-delay: 0.10s; }
  .nav__pill.is-swapped .nav__menu li:nth-child(3) { transition-delay: 0.15s; }
  .nav__pill.is-swapped .nav__menu li:nth-child(4) { transition-delay: 0.20s; }
  .nav__pill.is-swapped .nav__menu li:nth-child(5) { transition-delay: 0.25s; }
  .nav__pill.is-swapped .nav__menu li:nth-child(6) { transition-delay: 0.30s; }
  .nav__pill.is-swapped .nav__menu li:nth-child(7) { transition-delay: 0.35s; }
  /* every option becomes a pill like "Darmowa wycena" */
  .nav__menu a {
    border: 1px solid var(--violet-deep); border-radius: 999px;
    padding: 0.45rem 1.15rem; white-space: nowrap;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
  }
  .nav__menu a:not(.nav__cta)::after { display: none; }
  .nav__menu a:not(.nav__cta):hover { background: rgba(59, 17, 156, 0.08); }
}

/* ---------- Hero (violet immersion) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  max-width: none;
  background: linear-gradient(150deg, var(--violet-deep) 0%, var(--violet) 78%, #9c2fb0 100%);
  color: var(--on-dark);
  padding: 9rem 1.5rem 6rem;
}

/* Tilted columns of website thumbnails drifting up/down behind the hero */
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
  perspective: 1600px;
}
.hero__bgtilt {
  position: absolute; top: -50%; bottom: -50%; left: -30%; right: -32%;
  display: flex; flex-direction: column; gap: 2.4rem; justify-content: center;
  transform:
    translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0)
    rotateX(30deg) rotateY(35deg) rotate(-25deg);
  opacity: 1;
  will-change: transform;
}
.hero__bgtilt.is-paused .bgcol__track { animation-play-state: paused; }
.bgcol {
  overflow: visible;
  transform: translate3d(
    calc(var(--px, 0px) * (var(--depth, 0.5) - 0.5)),
    calc(var(--py, 0px) * (var(--depth, 0.5) - 0.5)),
    0
  );
  will-change: transform;
}
.bgcol:nth-child(1) { --depth: 0.55; }
.bgcol:nth-child(2) { --depth: 0.85; }
.bgcol:nth-child(3) { --depth: 0.4; }
.bgcol:nth-child(4) { --depth: 0.7; }
.bgcol:nth-child(5) { --depth: 1; }
.bgcol:nth-child(6) { --depth: 0.6; }
.bgcol:nth-child(7) { --depth: 0.8; }
.bgcol__track {
  display: flex; flex-direction: row; width: max-content;
  animation: bgcol-scroll 43s linear infinite;
}
.bgcol--rev .bgcol__track { animation-direction: reverse; animation-duration: 55s; }
.bgcol:nth-child(3) .bgcol__track { animation-duration: 62s; }
.bgcol:nth-child(4) .bgcol__track { animation-duration: 48s; }
.bgcol:nth-child(5) .bgcol__track { animation-duration: 52s; }
.bgcol:nth-child(6) .bgcol__track { animation-duration: 58s; }
.bgcol:nth-child(7) .bgcol__track { animation-duration: 46s; }
.bgcol__track img {
  width: 360px; aspect-ratio: 8 / 5; object-fit: cover;
  margin-right: 2.4rem;
  border-radius: 12px; display: block;
  box-shadow: 0 24px 60px rgba(20, 5, 30, 0.45), 0 0 0 1px rgba(242, 236, 246, 0.16);
}
@keyframes bgcol-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.hero__bgveil {
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    rgba(65, 32, 71, 0.96) 0%,
    rgba(59, 17, 156, 0.82) 26%,
    rgba(96, 17, 156, 0.42) 50%,
    rgba(134, 17, 156, 0.16) 76%,
    rgba(134, 17, 156, 0.12) 100%);
}
.hero__grid {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.05fr;
  gap: 4rem; align-items: center;
}
.hero__eyebrow {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-bright); font-weight: 500; margin-bottom: 2rem;
}
.hero__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 5.6vw, 4.9rem);
  line-height: 1.04; letter-spacing: -0.025em;
  margin-bottom: 2rem;
}
.hero__title span { display: block; }
.hero__title em { font-style: italic; color: var(--green-bright); }
.hero__lead {
  max-width: 32rem; font-size: 1.08rem; color: #e2d6ec;
  margin-bottom: 2.5rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .btn--ghost { border-color: var(--on-dark); color: var(--on-dark); }
.hero .btn--ghost:hover { background: var(--on-dark); color: var(--violet-deep); }

/* Hero FX stage — tilted screenshot dissolving into binary */
.hero__stage { position: relative; }
.fx-tilt {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 6px rgba(22, 10, 28, 0.38), 0 40px 90px rgba(20, 5, 30, 0.55), 0 0 0 1px rgba(242, 236, 246, 0.12);
  transform: perspective(1200px) rotateX(7deg) rotateY(-13deg) rotateZ(1deg);
  animation: fx-float 7s ease-in-out infinite;
  background: #160a1c;
  aspect-ratio: 8 / 5;
}
@keyframes fx-float {
  0%, 100% { transform: perspective(1200px) rotateX(7deg) rotateY(-13deg) rotateZ(1deg) translateY(0); }
  50% { transform: perspective(1200px) rotateX(7deg) rotateY(-13deg) rotateZ(1deg) translateY(-14px); }
}
.fx-tilt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fx-tilt__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none;
}

/* ---------- Marquee ---------- */
.marquee {
  padding: 1.1rem 0;
  background: var(--plum); color: var(--on-dark);
  overflow: hidden; white-space: nowrap;
}
.marquee__track {
  display: inline-flex; align-items: center; gap: 2.5rem;
  padding-right: 2.5rem;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 300; letter-spacing: 0.01em;
}
.marquee__track i { color: var(--green-bright); font-style: normal; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Sections shared ---------- */
section { max-width: 1280px; margin: 0 auto; padding: 7rem 1.5rem; }
.section--dark { background: var(--plum); color: var(--on-dark); max-width: none; }
.section--dark > * { max-width: 1280px; margin-left: auto; margin-right: auto; }

.split-heading {
  display: flex; justify-content: flex-start; align-items: baseline;
  column-gap: 0.35em; row-gap: 0.5rem; flex-wrap: wrap;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem, 5.5vw, 4.25rem);
  line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 4rem;
}
.split-heading__right { font-style: italic; color: var(--violet); }
.section--dark .split-heading__right { color: var(--green-bright); }

/* ---------- Problem ---------- */
.problem__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3rem; margin-bottom: 4.5rem;
}
.problem__stat strong {
  display: block; font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.5rem, 7vw, 5.5rem); line-height: 1; color: var(--green-bright);
  margin-bottom: 0.75rem;
}
.problem__stat p { color: var(--muted-dark); max-width: 20rem; }
.problem__media { border-radius: 12px; overflow: hidden; max-width: 760px; }
.problem__media img { width: 100%; }

/* ---------- Services ---------- */
.services__list { border-top: 1px solid var(--line-light-mode); }
.service {
  display: grid; grid-template-columns: 5rem 1fr auto;
  align-items: baseline; gap: 2rem;
  padding: 2.75rem 0; border-bottom: 1px solid var(--line-light-mode);
  transform-origin: left center; /* hover zoom grows from the left edge — no sideways jump */
}
.service__num {
  font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--violet);
}
.service h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}
.service p { color: var(--muted); max-width: 44rem; }
.service__tag {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--violet-deep); border: 1px solid var(--line-light-mode);
  padding: 0.35rem 0.9rem; border-radius: 999px; white-space: nowrap;
}

/* ---------- Process (interactive 3D radial menu) ---------- */
.pwheel {
  position: relative;
  width: 100%;
  margin-bottom: 4.5rem;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.pwheel__viewport {
  position: relative;
  width: 100%;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1150px;
  perspective-origin: 50% 50%;
}
.pwheel__scale-wrap {
  position: relative;
  width: 760px;
  height: 360px;
  transform-style: preserve-3d;
  flex: none;
  transform: scale(var(--pw-scale, 1)) translateX(var(--pw-pan, 0px));
  transition: transform 0.68s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.pwheel__rig {
  position: relative;
  width: 760px;
  height: 360px;
  transform-style: preserve-3d;
  will-change: transform;
}
.pwheel__shadow-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 282px;
  height: 282px;
  margin-left: -141px;
  margin-top: -141px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 3, 20, 0.78) 28%, rgba(12, 3, 20, 0.36) 58%, transparent 76%);
  transform: translate3d(var(--sx, 0px), var(--sy, 6px), -34px);
  pointer-events: none;
}
.pwheel__core-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 132px;
  margin-left: -66px;
  margin-top: -66px;
  border-radius: 50%;
  background: radial-gradient(circle at var(--core-lx, 42%) var(--core-ly, 34%), rgba(108, 52, 128, 0.62), rgba(34, 12, 44, 0.94) 72%);
  border: 1px solid rgba(242, 236, 246, 0.22);
  box-shadow:
    inset 0 2px 14px rgba(242, 236, 246, 0.12),
    0 10px 26px rgba(12, 3, 20, 0.55);
  transform: translateZ(-12px);
  pointer-events: none;
  transition: border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwheel__core-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(242, 236, 246, 0.14);
}
.pwheel__quads {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.pwheel__quad {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  transition: transform 0.68s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwheel__quad.is-active { transform: translateZ(12px) scale(1.025); }
.pwheel__quad-dim {
  fill: rgba(24, 8, 34, 0.34);
  opacity: 0;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwheel__quad.is-dimmed .pwheel__quad-dim { opacity: 1; }
.pwheel__quad-layer,
.pwheel__quad-text-layer {
  position: absolute;
  inset: 0;
  width: 760px;
  height: 360px;
  pointer-events: none;
  overflow: visible;
}
.pwheel__connectors {
  position: absolute;
  inset: 0;
  width: 760px;
  height: 360px;
  transform: translateZ(2px);
  pointer-events: none;
  overflow: visible;
}
.pwheel__conn-base {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.44;
  transition: opacity 0.35s ease;
}
.pwheel__conn-active {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
  transition: stroke-dashoffset 0.56s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}
.pwheel__conn-group.is-active .pwheel__conn-base { opacity: 0.92; }
.pwheel__conn-group.is-active .pwheel__conn-active { opacity: 1; stroke-dashoffset: 0; }
.pwheel__conn-dot {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.8;
}
.pwheel__conn-group.is-active .pwheel__conn-dot { opacity: 1; transform: scale(1.32); }

.pwheel__callout {
  position: absolute;
  width: 210px;
  pointer-events: none;
  opacity: 0;
  transform: translateZ(8px) translateY(8px);
  transition:
    opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.58s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 8px 10px;
  border-radius: 10px;
}
.pwheel__callout.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateZ(18px) translateY(0);
}
.pwheel__callout::before {
  content: "";
  position: absolute;
  inset: -4px -8px;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, var(--c-tint), transparent 72%);
  opacity: 0.44;
  z-index: -1;
  pointer-events: none;
}
.pwheel__callout--tl { left: 20px; bottom: 230px; text-align: left; --c-accent: #a78bfa; --c-tint: rgba(59, 17, 156, 0.55); }
.pwheel__callout--tr { right: 20px; bottom: 230px; text-align: right; --c-accent: #e879f9; --c-tint: rgba(134, 17, 156, 0.55); }
.pwheel__callout--br { right: 20px; top: 230px; text-align: right; --c-accent: #6fdc7d; --c-tint: rgba(17, 156, 34, 0.48); }
.pwheel__callout--bl { left: 20px; top: 230px; text-align: left; --c-accent: #a3e635; --c-tint: rgba(88, 156, 7, 0.48); }
.pwheel__callout-day {
  font-size: calc(0.72rem * var(--pw-cscale, 1));
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.2rem;
}
.pwheel__callout-title {
  font-family: var(--serif);
  font-size: calc(1.15rem * var(--pw-cscale, 1));
  font-weight: 400;
  line-height: 1.2;
  color: var(--on-dark);
  margin-bottom: 0.35rem;
}
.pwheel__callout-desc {
  font-size: calc(0.8rem * var(--pw-cscale, 1));
  line-height: 1.45;
  color: var(--muted-dark);
}

.pwheel__cube-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  transform-style: preserve-3d;
  transform: translateZ(16px);
  pointer-events: none;
}
.pwheel__cube-rotor {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(-34deg);
}
.pwheel__cube-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  color: #ffffff;
  border: 1px solid rgba(242, 236, 246, 0.38);
  border-radius: 8px;
  backface-visibility: hidden;
  overflow: hidden;
}
.pwheel__cube-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: var(--face-light, transparent);
  pointer-events: none;
}
.pwheel__cube-face--front  { background: var(--plum); transform: translateZ(30px); }
.pwheel__cube-face--right  { background: linear-gradient(135deg, var(--violet), var(--violet-deep)); transform: rotateY(90deg) translateZ(30px); }
.pwheel__cube-face--back   { background: var(--violet-deep); transform: rotateY(180deg) translateZ(30px); }
.pwheel__cube-face--left   { background: linear-gradient(135deg, var(--violet-deep), var(--plum)); transform: rotateY(-90deg) translateZ(30px); }
.pwheel__cube-face--top    { background: linear-gradient(135deg, var(--green), var(--green-olive)); transform: rotateX(90deg) translateZ(30px); }
.pwheel__cube-face--bottom { background: var(--green); transform: rotateX(-90deg) translateZ(30px); }

.pwheel__a11y-btn {
  position: absolute;
  width: 96px;
  height: 96px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}
.pwheel__a11y-btn--0 { left: 265px; top: 65px; }
.pwheel__a11y-btn--1 { left: 399px; top: 65px; }
.pwheel__a11y-btn--2 { left: 399px; top: 199px; }
.pwheel__a11y-btn--3 { left: 265px; top: 199px; }
.pwheel__a11y-btn:focus-visible { outline: 2px solid var(--green-bright); outline-offset: 2px; }

.pwheel__hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(197, 179, 209, 0.8);
  pointer-events: none;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}
.pwheel__hint.is-hidden { opacity: 0; }

@media (max-width: 760px) {
  .pwheel__viewport { height: clamp(290px, 70vw, 400px); }
  .pwheel__callout { width: 214px; }
  .pwheel__callout-day { font-size: calc(0.72rem * var(--pw-cscale, 1)); }
  .pwheel__callout-title { font-size: calc(1.14rem * var(--pw-cscale, 1)); }
  .pwheel__callout-desc { font-size: calc(0.84rem * var(--pw-cscale, 1)); line-height: 1.4; }
  .pwheel__hint { font-size: 0.72rem; bottom: 10px; }
}

.process__media { border-radius: 12px; overflow: hidden; }
.process__media img { width: 100%; max-height: 480px; object-fit: cover; }

/* ---------- Work gallery ---------- */
.work__grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem;
  align-items: start;
}
.work__item { position: relative; border-radius: 12px; overflow: hidden; }
.work__item[data-work-clip="0"] { clip-path: url(#workClip-0); }
.work__item[data-work-clip="1"] { clip-path: url(#workClip-1); }
.work__item[data-work-clip="2"] { clip-path: url(#workClip-2); }
.work__item.is-warping { overflow: visible; clip-path: none; }
.work__item.is-warping img { opacity: 0; }
.work__clips { position: absolute; width: 0; height: 0; pointer-events: none; overflow: hidden; }
.work__canvas {
  position: absolute;
  inset: -28px;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  display: block; pointer-events: none;
}
.work__item figcaption { z-index: 2; }
.work__item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.work__item:hover img { transform: scale(1.05); }
.work__item--tall { grid-row: span 2; }
.work__item--tall img { aspect-ratio: 3 / 3.4; }
.work__item figcaption {
  position: absolute; left: 1rem; bottom: 1rem;
  background: rgba(65, 32, 71, 0.78); color: var(--on-dark);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 0.6rem 1.1rem; border-radius: 10px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.work__item:hover figcaption, .work__item:focus-within figcaption { opacity: 1; transform: translateY(0); }
.work__item figcaption span { font-size: 0.8rem; color: var(--muted-dark); }
.work__note {
  margin-top: 3rem; font-family: var(--serif); font-style: italic;
  font-size: 1.25rem; color: var(--muted); max-width: 40rem;
}

/* ---------- Pricing ---------- */
.pricing__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-bottom: 3rem;
}
.price-card {
  border: 1px solid var(--line-light-mode); border-radius: 16px;
  padding: 2.25rem 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  background: rgba(255, 255, 255, 0.45);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.price-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(65, 32, 71, 0.16); }
.price-card--featured {
  background: linear-gradient(150deg, var(--violet-deep), var(--violet));
  color: var(--on-dark); border-color: transparent;
}
.price-card--featured .btn--ghost { border-color: var(--on-dark); color: var(--on-dark); }
.price-card--featured .btn--ghost:hover { background: var(--on-dark); color: var(--violet-deep); }
.price-card__badge {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--green-bright); font-weight: 600;
}
.price-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; }
.price-card__price { font-family: var(--serif); font-size: 2.25rem; font-weight: 300; letter-spacing: -0.02em; }
.price-card__price span { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.price-card--featured .price-card__price span { color: var(--muted-dark); }
.price-card ul { list-style: none; display: grid; gap: 0.6rem; flex: 1; }
.price-card li { padding-left: 1.4rem; position: relative; font-size: 0.95rem; }
.price-card li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
}
.price-card--featured li::before { background: var(--green-bright); }
.pricing__guarantee {
  font-size: 1.05rem; color: var(--muted);
  border-top: 1px solid var(--line-light-mode); padding-top: 2rem;
}
.pricing__guarantee strong { color: var(--ink); }

/* ---------- Contact ---------- */
.contact__inner { padding: 2rem 0; }
.contact__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 2rem;
}
.contact__title em { font-style: italic; color: var(--green-bright); }
.contact__lead { color: var(--muted-dark); max-width: 32rem; font-size: 1.1rem; margin-bottom: 2.5rem; }
.contact__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.contact__meta { font-size: 0.85rem; color: var(--muted-dark); letter-spacing: 0.04em; }

/* ---------- Footer ---------- */
.footer {
  max-width: 1280px; margin: 0 auto; padding: 3.5rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  border-top: 1px solid var(--line-light-mode);
}
.footer__brand { display: flex; align-items: center; gap: 0.6rem; }
.footer__logoimg { width: auto; height: clamp(34px, 5vw, 44px); }
.footer__logo { font-family: var(--serif); font-size: clamp(1.35rem, 6.3vw, 2.1rem); font-weight: 500; }
.footer__logo span { color: var(--violet); }
.footer__tag { font-family: var(--serif); font-style: italic; color: var(--muted); }
.footer__nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__nav a {
  color: var(--ink); text-decoration: none; font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}
.footer__nav a:hover { color: var(--violet); }
.footer__nav a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.footer__copy { font-size: 0.8rem; color: var(--muted); width: 100%; }

/* ---------- Calculator & form (wycena.html) ---------- */
.calc-hero { padding: 9rem 1.5rem 3rem; max-width: 1280px; margin: 0 auto; }
.calc-hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.02em; line-height: 1.05;
}
.calc-hero h1 em { font-style: italic; color: var(--violet); }
.calc-hero p { color: var(--muted); max-width: 40rem; margin-top: 1.25rem; font-size: 1.05rem; }

.calc {
  max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem 7rem;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: start;
}
.calc__options { display: grid; gap: 0; border-top: 1px solid var(--line-light-mode); }
.calc__row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line-light-mode);
}
.calc__row label { font-weight: 500; font-size: 1rem; cursor: pointer; }
.calc__row small { display: block; color: var(--muted); font-weight: 400; margin-top: 0.15rem; }
.calc__price-hint { color: var(--violet-deep); font-weight: 600; white-space: nowrap; font-size: 0.95rem; }

.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 2; margin: 0; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(65, 32, 71, 0.2); transition: background 0.25s var(--ease);
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.25s var(--ease);
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { outline: 2px solid var(--green); outline-offset: 3px; }

.calc__range { display: flex; align-items: center; gap: 1rem; }
.calc__range input[type="range"] { width: 160px; accent-color: var(--violet); cursor: pointer; }
.calc__range output { font-family: var(--serif); font-size: 1.4rem; min-width: 1.5rem; text-align: center; }

.stepper { display: flex; align-items: center; gap: 0.9rem; }
.stepper button {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-light-mode); background: transparent;
  font-size: 1.25rem; color: var(--violet-deep); cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.stepper button:hover { background: var(--violet-deep); color: #fff; }
.stepper button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.stepper output { font-family: var(--serif); font-size: 1.4rem; min-width: 1.5rem; text-align: center; }

.calc__select {
  font-family: var(--sans); font-size: 0.95rem; padding: 0.6rem 1rem;
  border: 1px solid var(--line-light-mode); border-radius: 10px;
  background: #fff; color: var(--ink); cursor: pointer;
}
.calc__select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.calc__summary {
  position: sticky; top: 6.5rem; overflow: hidden;
  background: linear-gradient(160deg, var(--violet-deep), var(--violet));
  color: var(--on-dark); border-radius: 18px; padding: 2.25rem 2rem;
  display: grid; gap: 1.1rem;
}
.calc__summary > :not(.calc__burger-fx) { position: relative; z-index: 2; }
.calc__burger-fx {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.calc__summary.has-burger h2,
.calc__summary.has-burger .calc__total,
.calc__summary.has-burger .calc__monthly { padding-right: 6.75rem; }
.calc__summary.has-fries h2,
.calc__summary.has-fries .calc__total,
.calc__summary.has-fries .calc__monthly { padding-right: 11.25rem; }
.calc__summary.has-drink h2,
.calc__summary.has-drink .calc__total,
.calc__summary.has-drink .calc__monthly { padding-right: 11.75rem; }
.calc__summary h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; }
.calc__total {
  font-family: var(--serif); font-weight: 300; font-size: 3.2rem;
  line-height: 1; letter-spacing: -0.02em;
}
.calc__monthly { color: var(--green-bright); font-size: 1.05rem; font-weight: 500; }
.calc__breakdown { list-style: none; display: grid; gap: 0.45rem; font-size: 0.9rem; color: var(--muted-dark); border-top: 1px solid var(--line-dark-mode); padding-top: 1.1rem; }
.calc__breakdown li { display: flex; justify-content: space-between; gap: 1rem; }
.calc__note {
  font-size: 0.85rem; color: var(--muted-dark); line-height: 1.55;
  border-top: 1px solid var(--line-dark-mode); padding-top: 1.1rem;
}

/* Form */
.form-section { background: var(--plum); color: var(--on-dark); }
.form-section__inner { max-width: 720px; margin: 0 auto; padding: 7rem 1.5rem; }
.form-section h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 3.75rem); letter-spacing: -0.02em; line-height: 1.05;
  margin-bottom: 1rem;
}
.form-section h2 em { font-style: italic; color: var(--green-bright); }
.form-section__inner > p { color: var(--muted-dark); margin-bottom: 3rem; font-size: 1.05rem; }

.form { display: grid; gap: 1.4rem; }
.form__field { display: grid; gap: 0.5rem; }
.form__field label { font-size: 0.9rem; font-weight: 500; color: var(--on-dark); }
.form__field input, .form__field textarea {
  font-family: var(--sans); font-size: 1rem;
  padding: 0.95rem 1.15rem; border-radius: 12px;
  border: 1px solid var(--line-dark-mode);
  background: rgba(242, 236, 246, 0.07); color: var(--on-dark);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.form__field input::placeholder, .form__field textarea::placeholder { color: var(--muted-dark); }
.form__field input:focus, .form__field textarea:focus {
  outline: none; border-color: var(--green-bright);
  background: rgba(242, 236, 246, 0.12);
}
.form__field textarea { min-height: 150px; resize: vertical; }
.form__hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form__status { font-size: 0.95rem; min-height: 1.5rem; }
.form__status--ok { color: var(--green-bright); }
.form__status--err { color: #ff9a8a; }
.form__privacy {
  font-size: 0.85rem; line-height: 1.55; color: var(--muted-dark);
}
.form__privacy a {
  color: var(--green-bright); text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.form__privacy a:hover { color: var(--on-dark); }
.form__privacy a:focus-visible { outline: 2px solid var(--green-bright); outline-offset: 2px; border-radius: 3px; }
.form .btn { justify-self: start; }

/* ---------- Legal / Privacy Policy (polityka-prywatnosci.html) ---------- */
.legal-hero { padding: 9rem 1.5rem 2.5rem; max-width: 880px; margin: 0 auto; }
.legal-hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.02em; line-height: 1.05;
}
.legal-hero h1 em { font-style: italic; color: var(--violet); }
.legal-hero__meta { color: var(--muted); margin-top: 1rem; font-size: 0.95rem; }

.legal {
  max-width: 880px; margin: 0 auto; padding: 1.5rem 1.5rem 6rem;
  display: grid; gap: 2.25rem;
}
.legal .legal__section {
  max-width: none; margin: 0; padding: 2rem 0 0;
  border-top: 1px solid var(--line-light-mode);
  display: grid; gap: 0.85rem;
}
.legal__section h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.35rem, 2.8vw, 1.8rem); letter-spacing: -0.015em;
  color: var(--ink);
}
.legal__section p, .legal__section li { color: var(--ink-soft); font-size: 0.98rem; }
.legal__section ul {
  list-style: none; display: grid; gap: 0.65rem; padding-left: 0;
}
.legal__section li { padding-left: 1.35rem; position: relative; }
.legal__section li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
}
.legal__section code {
  font-size: 0.9em; padding: 0.1rem 0.38rem; border-radius: 5px;
  background: rgba(65, 32, 71, 0.08); color: var(--violet-deep);
}
.legal__card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line-light-mode); border-radius: 14px;
  padding: 1.25rem 1.5rem; display: grid; gap: 0.35rem;
}
.legal__actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.5rem; border-top: 1px solid var(--line-light-mode);
}


/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0; transform: translateY(60px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.d-1 { transition-delay: 0.12s; }
.reveal.d-2 { transition-delay: 0.24s; }
.reveal.d-3 { transition-delay: 0.36s; }
.reveal.d-4 { transition-delay: 0.48s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Service rows step toward the visitor on hover — the standalone `scale`
   property so it never fights the .reveal translateY entrance. Must come
   after .reveal to win the `transition` shorthand. Ease-in curve: slow
   start, accelerates towards the end. */
.service {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
              scale 0.4s cubic-bezier(0.55, 0.06, 0.68, 0.19);
}
.service:hover { scale: 1.02; }

/* ---------- Word rotator (changing-words heading) ---------- */
/* Screen-reader-only text: visually hidden, still announced and indexed. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
/* All candidate words sit in the same grid cell, so the rotator is always
   as wide as the longest word. The mask (overflow: hidden) shows exactly one
   word; the JS cycler slides the current one up and the next one in from
   below — hugeinc-style. Padding + negative margin keeps italic descenders
   from clipping without breaking the mask. */
.word-rotator {
  display: inline-grid; overflow: hidden;
  padding: 0.12em 0.22em 0.12em 0.04em; margin: -0.12em -0.22em -0.12em -0.04em;
  vertical-align: baseline;
}
.word-rotator__item {
  grid-area: 1 / 1;
  transform: translateY(118%);
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.word-rotator__item.is-active { transform: translateY(0); }
.word-rotator__item.is-leaving { transform: translateY(-118%); }
/* Snap-back helper: a left word returns to the waiting position below
   instantly (no visible rewind through the mask). */
.word-rotator__item.no-anim { transition: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .calc { grid-template-columns: 1fr; }
  .calc__summary { position: relative; top: auto; }
}

@media (max-width: 1024px) {
  .nav__menu {
    position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-light); border: 1px solid var(--line-light-mode);
    border-radius: 20px; padding: 0.75rem;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__menu a { display: block; padding: 0.85rem 1rem; }
  .nav__cta { text-align: center; margin-top: 0.5rem; }
}

@media (max-width: 760px) {
  .hero { padding-top: 7.5rem; }
  .hero__actions .btn { width: 100%; text-align: center; }
  .fx-tilt { transform: none; animation: none; }
  .service { grid-template-columns: 1fr; gap: 0.75rem; }
  .service__tag { justify-self: start; }
  .work__grid { grid-template-columns: 1fr; }
  .work__item--tall { grid-row: auto; }
  .work__item--tall img { aspect-ratio: 4 / 3; }
  .contact__actions .btn { width: 100%; text-align: center; }
  .legal-hero { padding-top: 7.5rem; }
  .legal__actions .btn { width: 100%; text-align: center; }
  .calc__row { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  section { padding: 4.5rem 1.25rem; }
  .form-section__inner { padding: 4.5rem 1.25rem; }
}

@media (max-width: 480px) {
  .calc__summary { padding: 1.85rem 1.4rem; }
  .calc__summary.has-burger h2,
  .calc__summary.has-burger .calc__total,
  .calc__summary.has-burger .calc__monthly { padding-right: 5rem; }
  .calc__summary.has-fries h2,
  .calc__summary.has-fries .calc__total,
  .calc__summary.has-fries .calc__monthly { padding-right: 8rem; }
  .calc__summary.has-drink h2,
  .calc__summary.has-drink .calc__total,
  .calc__summary.has-drink .calc__monthly { padding-right: 8.75rem; }
  .calc__summary.has-burger .calc__total { font-size: clamp(2.25rem, 10vw, 3.2rem); }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .hero__bgtilt { top: -50%; bottom: -50%; left: -60%; right: -60%; opacity: 0.75; }
  .bgcol__track img { width: 300px; margin-right: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
  .bgcol__track { animation: none; }
  .fx-tilt { animation: none; transform: none; }
  .work__item img { transition: none; }
  .btn, .price-card, .service { transition: none; }
  .nav__brand, .nav__lang, .nav__menu, .nav__menu li { transition: none; }
  .word-rotator__item { transition: none; transform: none; }
  .word-rotator__item:not(.is-active) { display: none; }
  .bgcol__track { animation: none; }
  .pwheel__scale-wrap,
  .pwheel__quad,
  .pwheel__callout,
  .pwheel__conn-base,
  .pwheel__conn-active,
  .pwheel__conn-dot,
  .pwheel__core-ring,
  .pwheel__quad-dim { transition: none; }
}
