@import "./fonts.css";

/* ════════════════════════════════════════════════════════════════════════════
   REZERVA — design system. Dark, inky, editorial. One accent (teal) used sparely.
   Signature motif: the voice-line — a living teal waveform/signal that threads the
   whole site. Display: Clash Display. Body: General Sans. Built for motion (Lenis +
   GSAP) but fully legible and complete with JS off and prefers-reduced-motion on.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  /* ink family — dominant dark canvas */
  --ink: #0a0f0e; /* page background */
  --ink-2: #0d1412; /* alternate / slightly raised bands */
  --ink-3: #121b18; /* cards, inputs, panels */
  --ink-4: #18221f; /* hover surface */

  /* hairlines */
  --line: rgba(233, 239, 236, 0.1);
  --line-2: rgba(233, 239, 236, 0.16);
  --line-3: rgba(233, 239, 236, 0.28);

  /* light + neutral text */
  --bone: #e9efec; /* primary text / the one light value */
  --bone-dim: #cdd6d2;
  --muted: #97a39e; /* secondary text — AA on --ink (~6.9:1) */
  --muted-2: #6e7a75; /* tertiary / decorative only */

  /* accent — teal, used deliberately */
  --teal: #3ea094;
  --teal-bright: #5fc7b8; /* glow / active on dark */
  --teal-deep: #2c7a70;
  --teal-tint: rgba(62, 160, 148, 0.12);
  --teal-tint-2: rgba(95, 199, 184, 0.18);

  /* geometry */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* layout */
  --container: 1240px;
  --container-wide: 1440px;
  --gut: clamp(1.25rem, 4.5vw, 3.5rem);

  /* type */
  --font-display: "Clash Display", system-ui, -apple-system, sans-serif;
  --font-body: "General Sans", system-ui, -apple-system, sans-serif;

  /* motion */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-io: cubic-bezier(0.76, 0, 0.24, 1);
  --e-soft: cubic-bezier(0.33, 1, 0.68, 1);

  /* elevation (dark → glow + depth) */
  --shadow: 0 24px 70px -34px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 40px 110px -40px rgba(0, 0, 0, 0.85);
  --glow: 0 0 0 1px var(--teal-tint-2), 0 18px 60px -18px rgba(62, 160, 148, 0.4);

  color-scheme: dark;
}

/* ── reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  /* Lenis drives scrolling; native smooth off to avoid double-easing. */
  scroll-behavior: auto;
  background: var(--ink);
}
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--bone);
  font-size: clamp(1rem, 0.3vw + 0.97rem, 1.0625rem);
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Lenis */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
ul,
ol {
  list-style: none;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--teal);
  color: #04100d;
}

/* subtle film-grain over the whole canvas — premium texture, never distracting */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── typography ─────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--bone);
  text-wrap: balance;
}
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.9rem, 8.2vw, 8.25rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}
h1,
.h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.7rem);
  letter-spacing: -0.032em;
}
h2,
.h2 {
  font-size: clamp(1.9rem, 3.9vw, 3.25rem);
  letter-spacing: -0.028em;
}
h3,
.h3 {
  font-size: clamp(1.2rem, 1.5vw, 1.55rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
p {
  text-wrap: pretty;
}
.lead {
  font-size: clamp(1.08rem, 1.1vw, 1.35rem);
  line-height: 1.5;
  color: var(--bone-dim);
  font-weight: 400;
  max-width: 56ch;
}
.measure {
  max-width: 64ch;
}
.muted {
  color: var(--muted);
}
.tnum {
  font-variant-numeric: tabular-nums;
}

/* eyebrow — small structural label with a leading tick that nods to the wave */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-body);
  font-weight: 540;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-bright);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
}
.eyebrow--plain::before {
  display: none;
}

/* a highlighted phrase inside a heading — teal, optical underline */
.hl {
  color: var(--teal-bright);
  font-style: italic;
}

/* ── layout ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.container--wide {
  max-width: var(--container-wide);
}
.section {
  position: relative;
  padding-block: clamp(5rem, 11vw, 11rem);
}
.section--tight {
  padding-block: clamp(3.5rem, 7vw, 7rem);
}
.section--alt {
  /* alt tint fades to the base ink at the top & bottom edges so section seams vanish */
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 15%, var(--ink-2) 85%, var(--ink) 100%);
}
.section-head {
  max-width: 60ch;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-head .lead {
  margin-top: 1.25rem;
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center .lead {
  margin-inline: auto;
}
.section-head--center .eyebrow {
  justify-content: center;
}

/* the voice-line — recurring signature divider */
.voiceline {
  position: relative;
  height: 1px;
  border: 0;
  background: var(--line);
  overflow: visible;
}
.voiceline::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: clamp(80px, 18vw, 240px);
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--teal), var(--teal-bright));
  box-shadow: 0 0 16px var(--teal-tint-2);
}

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--teal);
  --btn-fg: #04120f;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  padding: 0.95em 1.6em;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 0.5s var(--e-out),
    box-shadow 0.5s var(--e-out),
    color 0.4s var(--e-out),
    background 0.4s var(--e-out);
  will-change: transform;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--teal-bright);
  transform: translateY(101%);
  transition: transform 0.5s var(--e-out);
}
.btn:hover {
  box-shadow: var(--glow);
}
.btn:hover::before {
  transform: translateY(0);
}
.btn:active {
  transform: scale(0.985);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--bone);
  border-color: var(--line-3);
}
.btn--ghost::before {
  background: var(--bone);
}
.btn--ghost:hover {
  --btn-fg: #04120f;
  box-shadow: none;
}
.btn--lg {
  font-size: 1.06rem;
  padding: 1.1em 1.9em;
}
.btn--block {
  width: 100%;
}

/* text link with animated chevron / underline */
.tlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 560;
  color: var(--teal-bright);
  width: fit-content;
}
.tlink::after {
  content: "→";
  font-family: var(--font-body);
  transition: transform 0.4s var(--e-out);
}
.tlink:hover::after {
  transform: translateX(5px);
}
.ulink {
  position: relative;
  color: var(--bone);
}
.ulink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--e-out);
}
.ulink:hover::after {
  transform: scaleX(1);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.1rem;
}

/* pills / chips */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bone-dim);
  background: rgba(233, 239, 236, 0.04);
  border: 1px solid var(--line);
  padding: 0.5em 0.95em;
  border-radius: var(--r-pill);
}
.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 10px var(--teal-bright);
}

/* ── site header / nav ──────────────────────────────────────────────────── */
.siteheader {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition:
    transform 0.6s var(--e-out),
    background 0.4s ease,
    border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.siteheader.is-scrolled {
  background: rgba(10, 15, 14, 0.72);
  backdrop-filter: saturate(150%) blur(16px);
  border-bottom-color: var(--line);
}
.siteheader.is-hidden {
  transform: translateY(-103%);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding: 1.05rem var(--gut);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--bone);
  flex: none;
}
.brand svg {
  height: 30px;
  width: auto;
}
.brand__word {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.34rem;
  letter-spacing: -0.03em;
  padding-bottom: 0.18em;
}
/* Logo signature: a teal line emerging from the R's right leg, running under the
   whole word. left offset ≈ the R-leg foot in Clash Display; scales with font-size. */
.brand__word::after {
  content: "";
  position: absolute;
  left: 0.44em;
  right: -0.02em;
  bottom: 0.02em;
  height: 0.085em;
  border-radius: 2px;
  background: var(--teal-bright);
  box-shadow: 0 0 10px rgba(95, 199, 184, 0.55);
  transform-origin: left;
  transform: scaleX(0);
  animation: brandline 0.9s var(--e-out) 0.3s forwards;
}
@keyframes brandline {
  to { transform: scaleX(1); }
}
.footer .brand__word::after {
  animation: none;
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .brand__word::after { animation: none; transform: scaleX(1); }
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav__link {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bone-dim);
  transition:
    color 0.3s,
    background 0.3s;
}
.nav__link:hover {
  color: var(--bone);
  background: rgba(233, 239, 236, 0.05);
}
.nav__cta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}
.nav__cta .btn {
  padding: 0.7em 1.2em;
  font-size: 0.92rem;
}
.nav__ghost {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bone-dim);
  padding: 0.5rem 0.6rem;
  transition: color 0.3s;
}
.nav__ghost:hover {
  color: var(--bone);
}
.nav__toggle {
  display: none;
  width: 2.7rem;
  height: 2.7rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--bone);
}
.nav__toggle svg {
  width: 20px;
  height: 20px;
}

/* industries dropdown (CSS hover/focus-within, JS mirrors aria) */
.nav__item {
  position: relative;
}
.nav__panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(640px, 88vw);
  background: rgba(13, 20, 18, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s var(--e-out),
    transform 0.3s var(--e-out),
    visibility 0.3s;
}
.nav__panel::before {
  content: "";
  position: absolute;
  inset: -14px 0 auto 0;
  height: 14px;
}
.nav__item:hover .nav__panel,
.nav__item:focus-within .nav__panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav__panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.15rem;
}
.nav__panel-link {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  color: var(--bone-dim);
  transition:
    background 0.25s,
    color 0.25s;
}
.nav__panel-link:hover {
  background: rgba(233, 239, 236, 0.05);
  color: var(--bone);
}
.nav__panel-link svg {
  width: 20px;
  height: 20px;
  color: var(--teal-bright);
  flex: none;
}
.nav__panel-all {
  grid-column: 1 / -1;
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
}
.footer__brandcol .lead {
  font-size: 1rem;
  margin-top: 1.1rem;
  color: var(--muted);
  max-width: 34ch;
}
.footer h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1.1rem;
}
.footer__links {
  display: grid;
  gap: 0.7rem;
  font-size: 0.96rem;
}
.footer__links a {
  color: var(--bone-dim);
  width: fit-content;
  transition: color 0.25s;
}
.footer__links a:hover {
  color: var(--teal-bright);
}
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted-2);
}
.footer__bar a {
  color: var(--muted);
}
.footer__bar a:hover {
  color: var(--bone);
}
.footer__bar-end {
  margin-left: auto;
}

/* ── generic card ───────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.2vw, 2.1rem);
  transition:
    border-color 0.4s var(--e-out),
    transform 0.5s var(--e-out),
    background 0.4s;
}
.card:hover {
  border-color: var(--line-2);
  background: var(--ink-4);
}

/* ── FAQ accordion ──────────────────────────────────────────────────────── */
.faq {
  border-top: 1px solid var(--line);
}
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  text-align: left;
  padding: 1.5rem 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  letter-spacing: -0.02em;
  color: var(--bone);
  transition: color 0.3s;
}
.faq__q:hover {
  color: var(--teal-bright);
}
.faq__icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.45s var(--e-out);
}
.faq__icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}
.faq__icon::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}
.faq__item.is-open .faq__icon {
  color: var(--teal-bright);
}
.faq__item.is-open .faq__icon::after {
  transform: translateX(-50%) scaleY(0);
}
.faq__a {
  overflow: hidden;
  height: 0;
}
.faq__a-inner {
  padding: 0 0 1.6rem;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.6;
}

/* ── pricing ────────────────────────────────────────────────────────────── */
.price {
  display: flex;
  flex-direction: column;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 2.4vw, 2.2rem);
}
.price--featured {
  border-color: var(--teal-deep);
  background: linear-gradient(180deg, rgba(62, 160, 148, 0.08), var(--ink-3) 42%);
  box-shadow: var(--glow);
}
.price__tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #04120f;
  background: var(--teal-bright);
  padding: 0.4em 0.8em;
  border-radius: var(--r-pill);
  margin-bottom: 1rem;
}
.price__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
}
.price__amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 3.2vw, 3rem);
  letter-spacing: -0.03em;
  margin-top: 0.6rem;
  line-height: 1;
}
.price__per {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.4rem;
}
.price__annual {
  color: var(--teal-bright);
  font-size: 0.88rem;
  margin-top: 0.3rem;
}
.price__list {
  display: grid;
  gap: 0.7rem;
  margin: 1.4rem 0;
}
.price__list li {
  position: relative;
  padding-left: 1.8rem;
  font-size: 0.96rem;
  color: var(--bone-dim);
}
.price__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--teal-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235fc7b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 0.8rem;
  background-repeat: no-repeat;
  background-position: center;
}
.price .btn {
  margin-top: auto;
}

/* ── accessibility ──────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--teal);
  color: #04120f;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus {
  left: 0;
}
:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
  border-radius: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── reveal (only hides when JS is active) ──────────────────────────────── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.9s var(--e-out),
    transform 0.9s var(--e-out);
}
/* SplitType lines: clip for the reveal, but pad the clip box so Polish accents
   and ogonki (ą ę ż ó) are never cut. Negative margin keeps layout unchanged. */
.js .split-ready .line {
  overflow: hidden;
  padding: 0.16em 0.04em;
  margin: -0.16em -0.04em;
}
.js .split-ready .word {
  display: inline-block;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ── responsive base ────────────────────────────────────────────────────── */
@media (max-width: 1040px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer__brandcol {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .nav__links,
  .nav__cta .btn {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }
}
@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .footer__bar-end {
    margin-left: 0;
  }
}

@media print {
  .siteheader,
  .footer,
  body::before {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   SECTION COMPONENTS (index)
   ════════════════════════════════════════════════════════════════════════════ */

/* nav CTAs that only appear inside the mobile menu */
.nav__menu-cta {
  display: none;
}
html.menu-open {
  overflow: hidden;
}

/* ── Hero (prism light backdrop) ───────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-top: clamp(6.5rem, 12vh, 9rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero__bg img,
.hero__bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}
/* second copy, opacity driven by JS to crossfade over the loop seam (seamless) */
.hero__vid--b {
  opacity: 0;
}
/* scrim: inky on the left for legibility, lets the colour breathe on the right */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--ink) 4%, rgba(10, 15, 14, 0.88) 32%, rgba(10, 15, 14, 0.32) 64%, rgba(10, 15, 14, 0.5) 100%),
    linear-gradient(0deg, var(--ink) 1%, transparent 24%, transparent 76%, rgba(10, 15, 14, 0.7) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 690px;
}
.hero__title {
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0.3em 0 0.5em;
  max-width: 17ch;
}
.hero__lead {
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.18rem);
  margin-bottom: 1.8rem;
  max-width: 46ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
  margin-bottom: 1.8rem;
}
.hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.hero__fine {
  font-size: 0.9rem;
}

/* ── Capabilities (editorial list) ──────────────────────────────────────── */
.caps {
  border-top: 1px solid var(--line);
}
.cap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: baseline;
  padding: clamp(1.6rem, 3vw, 2.6rem) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--e-out), background 0.4s;
}
.cap:hover {
  padding-left: 0.9rem;
}
.cap__no {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--teal-bright);
  font-variant-numeric: tabular-nums;
}
.cap__body { max-width: 54ch; }
.cap__body h3 { margin-bottom: 0.5rem; }
.cap__body p { color: var(--muted); }
.cap__link { align-self: center; flex: none; }

/* ── Language band ──────────────────────────────────────────────────────── */
.lang {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.lang__visual {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 4vw, 3.6rem);
}
.lang__lead-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.lang__lead-word em {
  font-style: normal;
  color: var(--teal-bright);
}
.lang__cap {
  display: block;
  margin-top: 1.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── ticks list ─────────────────────────────────────────────────────────── */
.ticks {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.ticks li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--bone-dim);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.85rem;
  height: 2px;
  border-radius: 2px;
  background: var(--teal-bright);
}
.ticks--human li::before { background: var(--muted-2); }

/* ── Control split ──────────────────────────────────────────────────────── */
.split2 {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.split2__line {
  align-self: stretch;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-2), transparent);
}
.split2__title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.3rem;
}
.split2__mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--ink-4);
  color: var(--bone);
  border: 1px solid var(--line-2);
}
.split2__mark--ai {
  background: var(--teal-tint);
  color: var(--teal-bright);
  border-color: rgba(95, 199, 184, 0.3);
}

/* ── Industries ─────────────────────────────────────────────────────────── */
/* flex (not grid) so the trailing row centres — 14 tiles read symmetric, not "2 stranded left" */
.industries {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}
.ind {
  flex: 0 1 calc((100% - 3 * 0.9rem) / 4);
}
.ind {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.3rem 1.3rem 1.5rem;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform 0.45s var(--e-out), border-color 0.4s, background 0.4s;
}
.ind::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  transition: transform 0.5s var(--e-out);
}
.ind:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--ink-4);
}
.ind:hover::after { transform: scaleX(1); }
.ind__ic {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--teal-tint);
  color: var(--teal-bright);
  margin-bottom: 0.8rem;
}
.ind__ic svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ind__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
  transition: color 0.3s;
}
.ind:hover .ind__name { color: var(--teal-bright); }
.ind__sub { font-size: 0.83rem; color: var(--muted); }

/* ── Stats ──────────────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 4vw, 3.2rem);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--bone);
}
.stat__lbl {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 24ch;
}

/* ── Steps ──────────────────────────────────────────────────────────────── */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.6rem);
}
.steps::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: 2.6rem;
  right: 2.6rem;
  height: 1px;
  background: var(--line);
}
.step {
  position: relative;
  padding-top: 3.6rem;
}
.step__no {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-bright);
  background: var(--ink-3);
  border: 1px solid var(--line-2);
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); max-width: 34ch; }

/* ── ROI ────────────────────────────────────────────────────────────────── */
.roi-wrap { max-width: 980px; }
.roi {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.6rem, 3vw, 3rem);
  align-items: center;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3vw, 2.6rem);
}
.roi__controls { display: grid; gap: 1.7rem; }
.roi__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.roi__label b {
  color: var(--bone);
  font-weight: 600;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
}
.roi input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) var(--fill, 50%), var(--ink-4) var(--fill, 50%));
  cursor: pointer;
}
.roi input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bone);
  border: 3px solid var(--teal-bright);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}
.roi input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.15); }
.roi input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bone);
  border: 3px solid var(--teal-bright);
}
.roi input[type="range"]::-moz-range-track { background: transparent; }
.roi__result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  padding: clamp(1.4rem, 2.5vw, 2.1rem);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--teal-tint), transparent);
  border: 1px solid rgba(95, 199, 184, 0.25);
}
.roi__result-lbl { font-size: 0.9rem; color: var(--muted); }
.roi__out {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 3.7rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--teal-bright);
}
.roi__sub { font-size: 0.85rem; color: var(--muted); max-width: 30ch; margin-bottom: 0.7rem; }

/* ── Pricing extras ─────────────────────────────────────────────────────── */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.8vw, 1.5rem);
  align-items: stretch;
}
.price__who {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.4rem 0 0.2rem;
}

/* ── End CTA ────────────────────────────────────────────────────────────── */
.endcta {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.endcta__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(50% 62% at 50% 42%, rgba(62, 160, 148, 0.2), transparent 70%);
}
.endcta__inner {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin-inline: auto;
}
.endcta__title { margin-bottom: 1.4rem; }
.endcta .lead { margin-inline: auto; }
.endcta__actions { justify-content: center; margin-top: 2rem; }
.endcta__inner .hero__fine { text-align: center; }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — section components
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1040px) {
  .hero { min-height: 78vh; }
  .ind { flex-basis: calc((100% - 2 * 0.9rem) / 3); }
}
@media (max-width: 640px) {
  .hero__bg img,
  .hero__bg video { object-position: 76% 50%; }
  .hero__scrim {
    background:
      linear-gradient(0deg, var(--ink) 8%, rgba(10, 15, 14, 0.6) 45%, rgba(10, 15, 14, 0.35) 100%),
      linear-gradient(90deg, rgba(10, 15, 14, 0.6), rgba(10, 15, 14, 0.3));
  }
}
@media (max-width: 900px) {
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    position: fixed;
    inset: 0;
    padding: 6rem var(--gut) 2.5rem;
    background: rgba(10, 15, 14, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    overflow-y: auto;
  }
  .nav__links.is-open .nav__link { font-size: 1.35rem; padding: 0.6rem 0; }
  .nav__links.is-open .nav__item { width: 100%; }
  .nav__links.is-open .nav__panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: 100%;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0.2rem 0 0.6rem 1rem;
  }
  .nav__links.is-open .nav__panel-grid { grid-template-columns: 1fr; }
  .nav__links.is-open .nav__panel-link { font-size: 1rem; }
  .nav__menu-cta { display: inline-flex !important; margin-top: 0.5rem; }
  .nav__links.is-open .btn.nav__menu-cta { width: 100%; }
  .lang { grid-template-columns: 1fr; }
  .cap { grid-template-columns: auto 1fr; }
  .cap__link { grid-column: 1 / -1; padding-left: calc(1rem + 1ch); }
}
@media (max-width: 760px) {
  .split2 { grid-template-columns: 1fr; }
  .split2__line { display: none; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .steps::before { display: none; }
  .roi { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .ind { flex-basis: calc((100% - 0.9rem) / 2); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .ind { flex-basis: calc((100% - 0.9rem) / 2); }
  .cap { grid-template-columns: 1fr; }
  .cap__no { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   SUBPAGES (branże, cennik, o-nas, rodo, legal, generator)
   ════════════════════════════════════════════════════════════════════════════ */

/* page hero (shorter than the homepage hero) */
.pagehero {
  position: relative;
  padding-top: clamp(7.5rem, 14vh, 10.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(10, 15, 14, 0.5) 0%, rgba(10, 15, 14, 0.8) 70%, var(--ink) 100%),
    url("gfx/atm-2.jpg");
  background-size: cover;
  background-position: center top;
}
.pagehero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(55% 60% at 80% 8%, rgba(62, 160, 148, 0.16), transparent 66%);
}
.pagehero .container { position: relative; z-index: 1; }
.pagehero h1 { margin: 0.35em 0 0.45em; max-width: 18ch; }
.pagehero .lead { max-width: 56ch; }
/* per-industry colour art behind the branża page-hero */
.pagehero .container { position: relative; z-index: 2; }
.pagehero__glow { z-index: 1; }
.pagehero__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.pagehero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.pagehero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 14, 0.5) 0%, rgba(10, 15, 14, 0.78) 72%, var(--ink) 100%);
}
.pagehero__ic {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--teal-tint);
  color: var(--teal-bright);
  margin-bottom: 1.2rem;
}
.pagehero__ic svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pagehero__pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.pagehero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.8rem; }

/* breadcrumb (rendered inside .pagehero, above h1) */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-bottom: 1.4rem;
}
.crumb a { color: var(--muted); transition: color 0.25s; }
.crumb a:hover { color: var(--bone); }
.crumb [aria-current] { color: var(--bone); }
.crumb__sep { color: var(--muted-2); }

/* generic card grid */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
.cardgrid .card h3 { margin-bottom: 0.55rem; }
.cardgrid .card p { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 820px) { .cardgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cardgrid { grid-template-columns: 1fr; } }

/* long-form prose (legal pages, generated documents) */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 {
  margin-top: 2.6rem;
  margin-bottom: 0.2rem;
  font-size: clamp(1.4rem, 2.2vw, 1.95rem);
}
.prose h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.1rem;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}
.prose p,
.prose li {
  color: var(--bone-dim);
  line-height: 1.72;
}
.prose ul,
.prose ol { padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 1.3rem; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.7rem;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}
.prose ol { list-style: decimal; }
.prose a {
  color: var(--teal-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose strong { color: var(--bone); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.94rem;
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th { color: var(--muted); font-weight: 600; }
.prose td { color: var(--bone-dim); }

/* ════════════════════════════════════════════════════════════════════════════
   SECTION ATMOSPHERES — generated backdrops (subtle, parallaxed). Layer order:
   section bg-colour → .section__bg image → .container content.
   ════════════════════════════════════════════════════════════════════════════ */
.section {
  isolation: isolate;
}
.section > .container {
  position: relative;
  z-index: 1;
}
.section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.section__bg::after {
  /* strong vertical fade to ink at top & bottom = invisible seams; gentle radial keeps text legible */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--ink) 0%, transparent 16%, transparent 84%, var(--ink) 100%),
    radial-gradient(130% 100% at 50% 42%, transparent 30%, rgba(10, 15, 14, 0.5) 100%);
}
.section__bg img,
.section__bg video {
  position: absolute;
  left: 0;
  top: -14%;
  width: 100%;
  height: 128%;
  object-fit: cover;
  opacity: 0.5;
  will-change: transform;
}
.section__bg--soft img,
.section__bg--soft video {
  opacity: 0.4;
}
.section__bg--right img {
  object-position: 100% 50%;
}
.section__bg--left img {
  object-position: 0% 50%;
}
@media (prefers-reduced-motion: reduce) {
  .section__bg img {
    top: 0;
    height: 100%;
  }
}

/* ── Full-bleed ad banner (cinematic "how it works" film) ───────────────── */
.adband {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  line-height: 0;
  overflow: hidden;
}
.adband__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.adband__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 15, 14, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  color: var(--bone);
  cursor: pointer;
  transition: opacity 0.45s var(--e-out), transform 0.3s var(--e-out), background 0.3s;
}
.adband__play svg {
  width: 34px;
  height: 34px;
  margin-left: 5px;
}
.adband__play:hover {
  transform: scale(1.08);
  background: rgba(62, 160, 148, 0.4);
}
.adband.is-playing .adband__play {
  opacity: 0;
  pointer-events: none;
}
/* Mobile: dedicated vertical 4:5 cut with large readable captions */
@media (max-width: 760px) {
  .adband {
    aspect-ratio: 4 / 5;
  }
}
