/* PlatformyCyfrowe.pl - modern stylesheet
   Tech: @layer, native CSS nesting, oklch(), light-dark(), color-mix(),
   clamp() fluid type, container queries, @starting-style, scroll-driven animations,
   logical properties, dvh units, prefers-reduced-motion. */

@layer reset, base, layout, components, utilities;

/* ============================================================
   RESET
   ============================================================ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }

  html {
    -webkit-text-size-adjust: 100%;
    color-scheme: light dark;
    scroll-behavior: smooth;
    interpolate-size: allow-keywords;
  }

  body {
    margin: 0;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  img, picture, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
  }

  button {
    font: inherit;
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
  }

  input, textarea, select {
    font: inherit;
    color: inherit;
  }

  textarea { resize: vertical; }

  ul, ol { list-style: none; padding: 0; margin: 0; }

  a { color: inherit; text-decoration: none; }

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

  ::selection { background: var(--brand); color: white; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* ============================================================
   BASE - tokens & typography
   ============================================================ */
@layer base {
  :root {
    /* Brand - Cyfrowy Polsat orange */
    --brand: oklch(0.7 0.18 47);
    --brand-strong: oklch(0.62 0.21 42);
    --brand-soft: light-dark(oklch(0.96 0.04 60), oklch(0.32 0.08 45));
    --brand-text-on-soft: light-dark(oklch(0.45 0.18 42), oklch(0.85 0.12 55));

    /* Surfaces */
    --surface: light-dark(oklch(0.99 0.003 80), oklch(0.16 0.01 250));
    --surface-2: light-dark(oklch(0.97 0.005 80), oklch(0.2 0.012 250));
    --card: light-dark(oklch(1 0 0), oklch(0.22 0.014 250));
    --card-hover: light-dark(oklch(0.995 0.003 80), oklch(0.25 0.016 250));

    /* Ink */
    --ink: light-dark(oklch(0.18 0.02 250), oklch(0.96 0.005 80));
    --ink-2: light-dark(oklch(0.4 0.015 250), oklch(0.78 0.008 80));
    --ink-3: light-dark(oklch(0.55 0.01 250), oklch(0.62 0.008 80));

    /* Lines */
    --line: light-dark(oklch(0.92 0.005 80), oklch(0.3 0.012 250));
    --line-strong: light-dark(oklch(0.85 0.008 80), oklch(0.4 0.015 250));

    /* Decorative */
    --hero-grad-bg: light-dark(
      radial-gradient(ellipse at top right, oklch(0.95 0.07 50 / 0.6), transparent 60%),
      radial-gradient(ellipse at top right, oklch(0.4 0.15 45 / 0.25), transparent 60%)
    );
    --footer-bg: oklch(0.18 0.025 250);
    --footer-ink: oklch(0.78 0.01 80);
    --footer-ink-2: oklch(0.62 0.008 80);
    --footer-line: oklch(0.3 0.018 250);

    /* Shadows */
    --shadow-1: 0 1px 2px oklch(0 0 0 / 0.04), 0 2px 4px oklch(0 0 0 / 0.04);
    --shadow-2: 0 4px 12px oklch(0 0 0 / 0.06), 0 2px 4px oklch(0 0 0 / 0.04);
    --shadow-3: 0 16px 48px oklch(0 0 0 / 0.12), 0 4px 12px oklch(0 0 0 / 0.06);
    --shadow-brand: 0 8px 24px color-mix(in oklch, var(--brand) 35%, transparent);

    /* Type - fluid */
    --t--1: clamp(0.83rem, 0.79rem + 0.18vw, 0.95rem);
    --t-0: clamp(1rem, 0.94rem + 0.28vw, 1.13rem);
    --t-1: clamp(1.18rem, 1.08rem + 0.5vw, 1.45rem);
    --t-2: clamp(1.45rem, 1.27rem + 0.9vw, 1.95rem);
    --t-3: clamp(1.85rem, 1.5rem + 1.6vw, 2.85rem);
    --t-4: clamp(2.4rem, 1.85rem + 2.7vw, 4rem);
    --t-5: clamp(2.9rem, 2.1rem + 4vw, 5.5rem);

    /* Spacing */
    --gutter: clamp(1rem, 0.6rem + 1.8vw, 2.25rem);
    --section-y: clamp(3.5rem, 2rem + 5vw, 7rem);

    /* Radii */
    --r-sm: 0.5rem;
    --r: 1rem;
    --r-lg: 1.5rem;
    --r-xl: 2rem;
    --r-pill: 999px;

    --max: 1280px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
  }

  body {
    background: var(--surface);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: var(--t-0);
    line-height: 1.6;
    accent-color: var(--brand);
  }

  h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin: 0;
    color: var(--ink);
  }

  h1 { font-size: var(--t-5); letter-spacing: -0.035em; }
  h2 { font-size: var(--t-4); }
  h3 { font-size: var(--t-2); }
  h4 { font-size: var(--t-1); }

  p { margin: 0; text-wrap: pretty; }

  a {
    color: var(--brand);
    transition: color 0.2s var(--ease);
  }
  a:hover { color: var(--brand-strong); }

  strong { font-weight: 700; color: var(--ink); }
}

/* ============================================================
   LAYOUT primitives
   ============================================================ */
@layer layout {
  .container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .section { padding-block: var(--section-y); }

  .section-head {
    text-align: center;
    max-width: 60ch;
    margin-inline: auto;
    margin-bottom: clamp(2rem, 1rem + 3vw, 4rem);

    & .eyebrow { margin-bottom: 0.75rem; }
    & p {
      color: var(--ink-2);
      margin-top: 1rem;
      font-size: var(--t-1);
    }
  }

  .skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--brand);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: var(--r-sm);
    z-index: 100;
    font-weight: 600;
    transition: top 0.2s;

    &:focus { top: 1rem; }
  }
}

/* ============================================================
   COMPONENTS
   ============================================================ */
@layer components {

  /* ---- Header / Nav ---- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in oklch, var(--surface) 82%, transparent);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-block-end: 1px solid var(--line);
  }

  .nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.85rem;
    gap: 1rem;
  }

  .logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
    transition: opacity 0.2s var(--ease);

    &:hover { opacity: 0.8; }

    & .logo-mark {
      width: 42px;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      border-radius: 11px;
      background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
      color: white;
      font-weight: 800;
      letter-spacing: -0.05em;
      font-size: 1.05rem;
      box-shadow: 0 6px 16px color-mix(in oklch, var(--brand) 40%, transparent);
    }

    & .logo-text {
      display: flex;
      flex-direction: column;
      line-height: 1.15;

      & strong {
        font-weight: 700;
        font-size: var(--t-0);
        color: var(--ink);
      }
      & small {
        color: var(--ink-3);
        font-size: var(--t--1);
        font-weight: 500;
      }
    }
  }

  .primary-nav {
    & ul {
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    & a {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      color: var(--ink-2);
      padding: 0.55rem 0.95rem;
      border-radius: var(--r-pill);
      font-weight: 500;
      font-size: var(--t--1);
      transition: color 0.2s var(--ease), background 0.2s var(--ease);

      &:hover {
        color: var(--ink);
        background: var(--surface-2);
      }

      &[aria-current="page"] {
        color: var(--brand-text-on-soft);
        background: var(--brand-soft);
      }

      &.nav-cta {
        background: var(--brand);
        color: white;
        padding-inline: 1.1rem;
        margin-inline-start: 0.5rem;
        font-weight: 600;
        box-shadow: var(--shadow-brand);

        &:hover {
          background: var(--brand-strong);
          color: white;
          transform: translateY(-1px);
        }

        & svg { width: 1em; height: 1em; }
      }
    }
  }

  .nav-toggle {
    display: none;
    width: 44px;
    aspect-ratio: 1;
    border-radius: var(--r-sm);
    color: var(--ink);
    transition: background 0.2s;

    &:hover { background: var(--surface-2); }

    & svg path {
      transform-origin: center;
      transition: transform 0.3s var(--ease), opacity 0.2s;
    }

    &[aria-expanded="true"] {
      & .bar-top { transform: rotate(45deg) translate(3px, 3px); }
      & .bar-mid { opacity: 0; }
      & .bar-bot { transform: rotate(-45deg) translate(3px, -3px); }
    }
  }

  /* ---- Buttons ---- */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: var(--t-0);
    text-decoration: none;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
    cursor: pointer;
    border: 1.5px solid transparent;
    line-height: 1.2;
    white-space: nowrap;

    & svg {
      width: 1.1em;
      height: 1.1em;
      flex-shrink: 0;
    }

    &:active { transform: translateY(0); }
  }

  .btn-primary {
    background: var(--brand);
    color: white;
    box-shadow: var(--shadow-brand);

    &:hover {
      background: var(--brand-strong);
      color: white;
      transform: translateY(-1.5px);
      box-shadow: 0 12px 32px color-mix(in oklch, var(--brand) 45%, transparent);
    }
  }

  .btn-ghost {
    color: var(--ink);
    border-color: var(--line-strong);

    &:hover {
      background: var(--surface-2);
      border-color: var(--ink);
      color: var(--ink);
    }
  }

  .btn-secondary {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--line);

    &:hover {
      background: var(--card);
      color: var(--ink);
      border-color: var(--line-strong);
    }
  }

  .btn-on-dark {
    background: oklch(1 0 0 / 0.15);
    color: white;
    border-color: oklch(1 0 0 / 0.25);
    backdrop-filter: blur(8px);

    &:hover {
      background: oklch(1 0 0 / 0.25);
      color: white;
      border-color: oklch(1 0 0 / 0.4);
      transform: translateY(-1.5px);
    }
  }

  .btn-sm {
    padding: 0.55rem 1rem;
    font-size: var(--t--1);
  }

  /* ---- Eyebrow / Tag / Accent ---- */
  .eyebrow {
    display: inline-block;
    color: var(--brand-strong);
    font-size: var(--t--1);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .tag {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: var(--r-pill);
    background: var(--brand-soft);
    color: var(--brand-text-on-soft);
    font-size: var(--t--1);
    font-weight: 600;
    letter-spacing: 0.02em;
    width: fit-content;
  }

  .accent {
    background: linear-gradient(135deg, var(--brand) 0%, oklch(0.65 0.22 25) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline;
  }

  /* ---- HERO ---- */
  .hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3rem, 1rem + 6vw, 7rem);
    isolation: isolate;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--hero-grad-bg);
    overflow: hidden;

    & .blob {
      position: absolute;
      width: clamp(300px, 40vw, 600px);
      aspect-ratio: 1;
      border-radius: 50%;
      filter: blur(80px);
      opacity: 0.5;
    }

    & .blob-1 {
      top: -10%;
      right: -10%;
      background: oklch(0.85 0.15 50);
    }

    & .blob-2 {
      bottom: -20%;
      left: -10%;
      background: oklch(0.85 0.1 220);
      opacity: 0.3;
    }
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2rem, 1rem + 4vw, 5rem);
    align-items: center;

    @media (max-width: 880px) {
      grid-template-columns: 1fr;
    }
  }

  .hero-text {
    & .eyebrow { margin-bottom: 1.25rem; }

    & h1 {
      font-size: var(--t-5);
      margin-bottom: 1.5rem;
    }

    & .lead {
      font-size: var(--t-1);
      color: var(--ink-2);
      margin-bottom: 2rem;
      max-width: 50ch;
    }

    & .cta-row {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;
      margin-bottom: 2rem;
    }

    & .trust-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem 1.75rem;
      color: var(--ink-3);
      font-size: var(--t--1);
      font-weight: 500;

      & li {
        display: flex;
        align-items: center;
        gap: 0.5rem;

        &::before {
          content: "";
          width: 6px;
          aspect-ratio: 1;
          border-radius: 50%;
          background: var(--brand);
        }
      }
    }
  }

  .hero-visual {
    position: relative;
    aspect-ratio: 1 / 0.92;
    display: grid;
    place-items: center;

    @media (max-width: 880px) {
      aspect-ratio: 5 / 4;
      max-width: 480px;
      margin-inline: auto;
    }
  }

  .hero-illustration {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;

    & svg {
      width: 100%;
      height: auto;
      max-height: 100%;
      filter: drop-shadow(0 24px 48px oklch(0.18 0.02 250 / 0.18));
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-illustration svg {
      animation: float-soft 6s ease-in-out infinite;
    }

    @keyframes float-soft {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-8px); }
    }
  }

  /* ---- Cards grid (locations) ---- */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.5rem;
  }

  .card {
    background: var(--card);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    border: 1px solid var(--line);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
    container-type: inline-size;

    &:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-3);
      border-color: color-mix(in oklch, var(--brand) 30%, var(--line));
    }
  }

  .location-card {
    & .card-image {
      aspect-ratio: 16 / 10;
      overflow: hidden;
      background: var(--surface-2);

      & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s var(--ease);
      }
    }

    &:hover .card-image img {
      transform: scale(1.06);
    }

    & .card-body {
      padding: 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
    }

    & h3 {
      font-size: var(--t-2);
      letter-spacing: -0.02em;
    }

    & .card-where {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      color: var(--ink-3);
      font-size: var(--t--1);
      margin-top: -0.4rem;

      & svg { width: 1em; height: 1em; flex-shrink: 0; }
    }

    & .phone-big {
      display: inline-flex;
      align-items: center;
      gap: 0.65rem;
      padding: 0.85rem 1rem;
      background: var(--brand-soft);
      color: var(--brand-text-on-soft);
      border-radius: var(--r);
      font-weight: 700;
      font-size: var(--t-1);
      transition: background 0.2s var(--ease), color 0.2s var(--ease);
      align-self: stretch;
      justify-content: center;
      letter-spacing: 0.01em;

      &:hover {
        background: var(--brand);
        color: white;
      }

      & svg { width: 1.25em; height: 1.25em; }
    }

    & .map-link {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      color: var(--ink-2);
      font-size: var(--t--1);
      font-weight: 500;
      align-self: flex-start;
      transition: color 0.2s, gap 0.2s var(--ease);

      & svg { width: 0.9em; height: 0.9em; transition: transform 0.2s var(--ease); }

      &:hover {
        color: var(--brand);
        gap: 0.5rem;

        & svg { transform: translate(2px, -2px); }
      }
    }
  }

  /* ---- Hours ---- */
  .hours {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.3rem 1rem;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    border-radius: var(--r-sm);
    font-size: var(--t--1);
    margin: 0;

    & dt {
      color: var(--ink-3);
      font-weight: 500;
    }

    & dd {
      margin: 0;
      color: var(--ink);
      font-weight: 600;
      font-variant-numeric: tabular-nums;
    }
  }

  .hours-block {
    padding: 1rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: var(--t-0);
  }

  /* ---- About ---- */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: center;

    @media (max-width: 880px) {
      grid-template-columns: 1fr;
    }
  }

  .about-image {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    aspect-ratio: 4 / 5;

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    @media (max-width: 880px) {
      aspect-ratio: 16 / 10;
    }
  }

  .about-badge {
    position: absolute;
    inset-block-end: 1.25rem;
    inset-inline-start: 1.25rem;
    background: color-mix(in oklch, var(--card) 90%, transparent);
    backdrop-filter: blur(12px);
    border-radius: var(--r);
    padding: 0.85rem 1.1rem;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    line-height: 1.2;

    & strong {
      color: var(--brand-strong);
      font-size: var(--t-1);
      letter-spacing: -0.02em;
    }

    & span {
      color: var(--ink-2);
      font-size: var(--t--1);
    }
  }

  .about-text {
    & .eyebrow { margin-bottom: 0.75rem; }
    & h2 {
      margin-bottom: 1.5rem;
      font-size: var(--t-4);
    }
    & p {
      color: var(--ink-2);
      margin-bottom: 1rem;
      font-size: var(--t-1);
    }
    & strong { color: var(--ink); }
    & .btn { margin-top: 1rem; }
  }

  /* ---- Services ---- */
  .services { background: var(--surface-2); }

  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1rem;
  }

  .service {
    background: var(--card);
    border-radius: var(--r-lg);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-1);
    border: 1px solid var(--line);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);

    &:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow-2);
    }

    & .service-icon {
      width: 52px;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      background: var(--brand-soft);
      color: var(--brand-text-on-soft);
      border-radius: var(--r-sm);
      margin-bottom: 1.25rem;

      & svg { width: 26px; height: 26px; }
    }

    & h3 {
      font-size: var(--t-1);
      margin-bottom: 0.5rem;
    }

    & p {
      color: var(--ink-2);
      font-size: var(--t--1);
      line-height: 1.6;
    }
  }

  /* ---- CTA section ---- */
  .cta-section .cta-card {
    background: linear-gradient(135deg, oklch(0.25 0.04 250) 0%, oklch(0.18 0.06 260) 100%);
    color: white;
    border-radius: var(--r-xl);
    padding: clamp(2rem, 1.5rem + 2vw, 4rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--shadow-3);
    position: relative;
    overflow: hidden;

    &::before {
      content: "";
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse at top right, color-mix(in oklch, var(--brand) 35%, transparent), transparent 60%);
      pointer-events: none;
    }

    & > * { position: relative; }

    & h2 {
      font-size: var(--t-3);
      margin-bottom: 0.5rem;
      color: white;
    }

    & p {
      color: oklch(0.85 0.01 240);
      font-size: var(--t-1);
    }

    & .cta-actions {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;
    }
  }

  /* ---- Page hero (sub pages) ---- */
  .page-hero {
    background: var(--surface-2);
    padding-block: clamp(3rem, 2rem + 4vw, 6rem);
    border-block-end: 1px solid var(--line);
    text-align: center;

    & .container {
      max-width: 70ch;
    }

    & .eyebrow { margin-bottom: 0.75rem; }

    & h1 {
      font-size: var(--t-4);
      margin-block: 0.5rem 1rem;
    }

    & .lead {
      color: var(--ink-2);
      font-size: var(--t-1);
      max-width: 60ch;
      margin-inline: auto;
    }

    & .cta-row {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
      margin-top: 2rem;
      flex-wrap: wrap;
    }
  }

  .success-hero {
    background: linear-gradient(135deg, oklch(0.95 0.05 145), oklch(0.92 0.07 155));
    border-block-end: none;

    & .success-icon {
      width: 72px;
      aspect-ratio: 1;
      margin: 0 auto 1.5rem;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: oklch(0.65 0.18 145);
      color: white;
      box-shadow: 0 12px 32px oklch(0.65 0.18 145 / 0.35);
      animation: pop 0.5s var(--ease) both;

      & svg { width: 36px; height: 36px; }
    }
  }

  @keyframes pop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
  }

  /* ---- Contact ---- */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: start;

    @media (max-width: 880px) {
      grid-template-columns: 1fr;
    }
  }

  .contact-info {
    & h2 {
      font-size: var(--t-1);
      margin-block: 1.75rem 0.85rem;

      &:first-child { margin-top: 0; }
    }

    & .phone-list {
      display: flex;
      flex-direction: column;
      gap: 0.6rem;

      & a {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 1rem 1.2rem;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: var(--r);
        color: var(--ink);
        transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;

        & small {
          color: var(--ink-3);
          font-size: var(--t--1);
        }

        & strong {
          display: inline-flex;
          align-items: center;
          gap: 0.5rem;
          font-size: var(--t-1);
          color: var(--brand-strong);
          font-weight: 700;
          letter-spacing: 0.01em;

          & svg { width: 1em; height: 1em; }
        }

        &:hover {
          border-color: var(--brand);
          transform: translateX(3px);
          background: var(--card-hover);
        }
      }
    }
  }

  /* ---- Form ---- */
  .contact-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(1.5rem, 1rem + 1vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-1);

    & .form-head {
      margin-bottom: 0.5rem;

      & h2 {
        font-size: var(--t-2);
        margin-bottom: 0.4rem;
      }

      & p {
        color: var(--ink-2);
        font-size: var(--t--1);
      }
    }
  }

  .field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;

    @media (max-width: 580px) {
      grid-template-columns: 1fr;
    }
  }

  .field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;

    & label {
      font-size: var(--t--1);
      font-weight: 600;
      color: var(--ink-2);
    }

    & input,
    & textarea {
      width: 100%;
      padding: 0.8rem 1rem;
      background: var(--surface);
      border: 1.5px solid var(--line);
      border-radius: var(--r);
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
      font: inherit;
      color: var(--ink);

      &::placeholder { color: var(--ink-3); }

      &:hover { border-color: var(--line-strong); }

      &:focus {
        outline: none;
        border-color: var(--brand);
        background: var(--card);
        box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand) 18%, transparent);
      }

      &:user-invalid {
        border-color: oklch(0.65 0.2 25);
      }
    }

    & textarea {
      min-height: 140px;
      line-height: 1.5;
    }
  }

  .hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .alert {
    padding: 1rem 1.25rem;
    border-radius: var(--r);
    font-size: var(--t--1);
    border: 1px solid transparent;

    &.alert-error {
      background: light-dark(oklch(0.96 0.04 25), oklch(0.3 0.08 25));
      color: light-dark(oklch(0.4 0.18 25), oklch(0.85 0.12 25));
      border-color: light-dark(oklch(0.85 0.1 25), oklch(0.4 0.12 25));
    }

    &.alert-success {
      background: light-dark(oklch(0.96 0.04 145), oklch(0.3 0.08 145));
      color: light-dark(oklch(0.35 0.14 145), oklch(0.85 0.12 145));
      border-color: light-dark(oklch(0.85 0.1 145), oklch(0.4 0.12 145));
    }
  }

  /* ---- Prose (polityka) ---- */
  .prose {
    max-width: 70ch;
    margin-inline: auto;
    font-size: var(--t-0);

    & p {
      color: var(--ink-2);
      margin-block: 1rem;
      line-height: 1.75;
    }

    & strong { color: var(--ink); }

    & h2 {
      font-size: var(--t-2);
      margin-block: 2.5rem 1rem;
      padding-block-start: 2rem;
      border-block-start: 1px solid var(--line);

      &:first-of-type {
        border: none;
        padding-block-start: 0;
        margin-block-start: 1.5rem;
      }
    }

    & .prose-list {
      list-style: decimal;
      padding-inline-start: 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      color: var(--ink-2);
      line-height: 1.7;

      & li::marker {
        color: var(--brand-strong);
        font-weight: 700;
      }
    }

    & .prose-sublist {
      list-style: disc;
      padding-inline-start: 1.5rem;
      margin-block: 0.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
  }

  /* ---- Footer ---- */
  .site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding-top: clamp(3rem, 2rem + 3vw, 5rem);
    margin-top: var(--section-y);
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
      gap: 2.5rem;
    }

    & h4 {
      color: white;
      font-size: var(--t--1);
      margin-bottom: 1.1rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-weight: 700;
    }

    & ul {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
    }

    & a {
      color: var(--footer-ink);
      transition: color 0.2s;
      font-size: var(--t--1);

      &:hover { color: var(--brand); }
    }

    & p {
      color: var(--footer-ink-2);
      font-size: var(--t--1);
      line-height: 1.7;
      margin-top: 1rem;
    }
  }

  .footer-brand .logo {
    color: white;

    & .logo-text {
      & strong { color: white; }
      & small { color: var(--footer-ink-2); }
    }
  }

  .footer-bottom {
    border-block-start: 1px solid var(--footer-line);
    padding-block: 1.5rem;

    & p {
      color: var(--footer-ink-2);
      font-size: var(--t--1);
      margin: 0;
    }
  }

  /* ---- Cookie banner ---- */
  .cookie-banner {
    position: fixed;
    inset-block-end: 1rem;
    inset-inline: 1rem;
    margin-inline: auto;
    max-width: 720px;
    z-index: 99;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-3);
    padding: 1rem 1.25rem;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);

    @starting-style {
      opacity: 0;
      transform: translateY(20px);
    }

    &[hidden] { display: none; }

    & .cookie-inner {
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;

      & .cookie-icon {
        font-size: 1.5rem;
        line-height: 1;
      }

      & p {
        flex: 1;
        margin: 0;
        font-size: var(--t--1);
        color: var(--ink-2);
        min-width: min(100%, 260px);
      }
    }
  }

  /* ---- Mobile nav ---- */
  @media (max-width: 880px) {
    .nav-toggle { display: grid; place-items: center; }

    .primary-nav ul {
      position: absolute;
      inset-block-start: 100%;
      inset-inline: 0;
      background: color-mix(in oklch, var(--surface) 95%, transparent);
      backdrop-filter: blur(20px);
      border-block-end: 1px solid var(--line);
      flex-direction: column;
      align-items: stretch;
      padding: 1rem var(--gutter) 1.5rem;
      gap: 0.25rem;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
      padding-block: 0;
    }

    .primary-nav ul.is-open {
      max-height: 80vh;
      padding-block: 1rem 1.5rem;
    }

    .primary-nav a {
      padding: 0.85rem 1rem;
      border-radius: var(--r-sm);
      font-size: var(--t-0);
    }

    .primary-nav a.nav-cta {
      margin-block-start: 0.5rem;
      margin-inline-start: 0;
      justify-content: center;
    }
  }

}

/* ============================================================
   UTILITIES
   ============================================================ */
@layer utilities {
  [hidden] { display: none !important; }
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
