/* Outstanding Studios — prototype */
:root {
  /* Brand (z os_basic.pdf) */
  --brand-navy: #223e63;
  --brand-blue: #3b6699;
  --bg: #eef2f9;
  --bg-elevated: #e2e8f4;
  --surface: #ffffff;
  --border: rgba(34, 62, 99, 0.14);
  --text: #1a2332;
  --muted: #5a6578;
  --accent: #1e6aad;
  --accent-warm: #b07d12;
  --accent-dim: rgba(30, 106, 173, 0.12);
  --accent-dim-warm: rgba(176, 125, 18, 0.12);
  --accent-2: #2a8bc8;
  --accent-3: #5b7eb8;
  --glow: rgba(30, 106, 173, 0.2);
  --radius: 16px;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --max: 1180px;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 255, 255, 0.9), transparent 45%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(186, 210, 255, 0.35), transparent 50%),
    radial-gradient(ellipse 80% 55% at 0% 80%, rgba(255, 235, 200, 0.25), transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 35%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #155a94;
}

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

.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;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2500;
  height: var(--header-h);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  display: flex;
  align-items: center;
  background: linear-gradient(
    to bottom,
    rgba(248, 250, 252, 0.94) 0%,
    rgba(248, 250, 252, 0.78) 55%,
    transparent 100%
  );
  backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
  overflow: visible;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(34, 62, 99, 0.08);
}

@media (max-width: 879px) {
  .site-header,
  .site-header.is-scrolled {
    /* Mobile Safari compatibility: avoid clipping fixed descendants */
    backdrop-filter: none;
    background: rgba(248, 250, 252, 0.97);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo-img {
  width: auto;
  height: clamp(26px, 5.5vw, 34px);
  max-width: min(220px, 62vw);
  flex-shrink: 0;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 1px 2px rgba(34, 62, 99, 0.12));
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 880px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-desktop a:hover {
  color: var(--text);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.lang-switch a {
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
}

.lang-switch a[aria-current="page"] {
  color: var(--text);
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-dim-warm));
}

.cta-header {
  display: none;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-navy) 0%, #2d5a8c 100%);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(34, 62, 99, 0.22);
}

.cta-header:hover {
  color: #fff;
  filter: brightness(1.06);
}

@media (min-width: 880px) {
  .cta-header {
    display: inline-flex;
  }
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  position: relative;
  z-index: 2501;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--brand-navy);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-toggle[aria-expanded="true"] {
  border-color: rgba(30, 106, 173, 0.45);
  background: rgba(255, 255, 255, 0.94);
}

@media (min-width: 880px) {
  .menu-toggle {
    display: none;
  }
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2400;
  padding: 1rem 1.1rem max(1.75rem, env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(30, 106, 173, 0.12), transparent 55%),
    radial-gradient(90% 70% at 0% 20%, rgba(176, 125, 18, 0.1), transparent 50%),
    linear-gradient(180deg, #eef2f9 0%, #ffffff 52%, #f8fafc 100%);
  flex-direction: column;
  gap: 0.65rem;
  border-top: 1px solid rgba(34, 62, 99, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(34, 62, 99, 0.55);
}

.nav-mobile a {
  display: block;
  padding: 1rem 1.05rem;
  color: var(--brand-navy);
  border: 1px solid rgba(34, 62, 99, 0.12);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 30px rgba(34, 62, 99, 0.08);
}

.nav-mobile a:hover {
  background: #fff;
  border-color: rgba(30, 106, 173, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .nav-mobile.is-open a {
    animation: navMobileIn 0.38s ease backwards;
  }

  .nav-mobile.is-open a:nth-of-type(1) {
    animation-delay: 0.04s;
  }

  .nav-mobile.is-open a:nth-of-type(2) {
    animation-delay: 0.08s;
  }

  .nav-mobile.is-open a:nth-of-type(3) {
    animation-delay: 0.12s;
  }

  .nav-mobile.is-open a:nth-of-type(4) {
    animation-delay: 0.16s;
  }

  .nav-mobile.is-open a:nth-of-type(5) {
    animation-delay: 0.2s;
  }

  .nav-mobile.is-open a:nth-of-type(6) {
    animation-delay: 0.24s;
  }
}

@keyframes navMobileIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.menu-open {
  overflow: hidden;
}

body.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  top: var(--header-h);
  z-index: 2350;
  background: rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 920px);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 255, 255, 0.95), transparent 52%),
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(186, 210, 255, 0.45), transparent 55%),
    radial-gradient(ellipse 65% 48% at 15% 60%, rgba(255, 228, 190, 0.35), transparent 52%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 45%, var(--bg) 100%);
}

/* Bardzo subtelna tekstura (bez siatki — żeby hero było czystsze) */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.08;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: end;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  padding-top: calc(var(--header-h) + 2rem);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: end;
    gap: 2.5rem 3rem;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-showreel {
  position: relative;
  z-index: 1;
}

.showreel-shell {
  border-radius: calc(var(--radius) + 6px);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(100, 160, 220, 0.45),
    rgba(230, 200, 140, 0.3),
    rgba(160, 175, 220, 0.35)
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 12px 40px rgba(34, 62, 99, 0.1),
    0 0 60px rgba(100, 150, 210, 0.12);
}

.showreel-frame {
  position: relative;
  border-radius: calc(var(--radius) + 5px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.showreel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.showreel-hint {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 42ch;
}

.showreel-hint a {
  color: var(--accent);
  font-weight: 500;
}

.showreel-hint a:hover {
  color: #8a6410;
}

/* Hero — rotacja klipów */
.hero-reel-ui {
  margin-top: 0.85rem;
}

.hero-reel-caption {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.hero-reel-caption__label {
  font-weight: 600;
  color: var(--brand-navy);
  margin-right: 0.35rem;
}

.hero-reel-caption__title {
  font-weight: 500;
  color: var(--text);
}

.hero-reel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hero-reel-btn {
  min-width: 44px;
  min-height: 44px;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-navy);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.hero-reel-btn:focus-visible {
  outline: 2px solid rgba(30, 106, 173, 0.45);
  outline-offset: 2px;
}

.hero-reel-btn:hover {
  background: #fff;
  border-color: rgba(30, 106, 173, 0.35);
}

.hero-reel-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.25rem;
}

/* Kropki: duży obszar dotyku (min. ~44px), wizualnie mała kropka */
.hero-reel-dot {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-reel-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(34, 62, 99, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-reel-dot:hover::before,
.hero-reel-dot:focus-visible::before {
  background: rgba(34, 62, 99, 0.48);
}

.hero-reel-dot[aria-current="true"]::before {
  background: var(--brand-navy);
  transform: scale(1.35);
}

.hero-reel-dot:focus-visible {
  outline: 2px solid rgba(30, 106, 173, 0.4);
  outline-offset: 0;
}

/* Portfolio — siatka z miniaturami Vimeo */
.portfolio-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 560px) {
  .portfolio-mosaic {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .portfolio-mosaic {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }
}

.portfolio-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(34, 62, 99, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  isolation: isolate;
}

.portfolio-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 44px rgba(34, 62, 99, 0.14);
}

.portfolio-tile:focus-visible {
  outline: 3px solid rgba(30, 106, 173, 0.45);
  outline-offset: 3px;
}

.portfolio-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

.portfolio-tile:hover img {
  transform: scale(1.06);
}

.portfolio-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 35, 50, 0.92) 0%,
    rgba(26, 35, 50, 0.35) 42%,
    transparent 72%
  );
  z-index: 1;
  pointer-events: none;
}

.portfolio-tile__body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1rem 1.15rem 1.1rem;
  gap: 0.5rem;
}

.portfolio-tile__play {
  display: flex;
  width: 3rem;
  height: 3rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: transform 0.25s ease;
}

.portfolio-tile:hover .portfolio-tile__play {
  transform: scale(1.06);
}

.portfolio-tile__play svg {
  width: 100%;
  height: 100%;
}

.portfolio-tile__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f8fafc;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  max-width: 100%;
}

.portfolio-embed-details {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.portfolio-embed-summary {
  list-style: none;
  cursor: pointer;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.65rem 1rem;
  margin: 0 auto 1rem;
  max-width: 28rem;
  border-radius: 999px;
  border: 1px dashed rgba(30, 106, 173, 0.35);
  background: rgba(255, 255, 255, 0.7);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.portfolio-embed-summary:hover {
  background: #fff;
  border-color: rgba(30, 106, 173, 0.5);
}

.portfolio-embed-summary::-webkit-details-marker {
  display: none;
}

.portfolio-embed-details[open] .portfolio-embed-summary {
  margin-bottom: 1.25rem;
  color: var(--brand-navy);
  border-style: solid;
}

.vimeo-showcase-block--embedded {
  margin-top: 0;
}

/* Vimeo showcase (playlist) */
.vimeo-showcase-block {
  margin-top: 0.5rem;
}

.showcase-shell {
  max-width: 100%;
}

/* Vimeo responsive embed (16:9) — jak w kodzie „Copy embed” */
.vimeo-embed-wrap {
  position: relative;
  padding: 56.25% 0 0 0;
  border-radius: calc(var(--radius) + 5px);
  overflow: hidden;
  background: #e8ecf4;
}

.vimeo-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.showcase-foot {
  margin: 1rem 0 0;
  text-align: center;
}

.showcase-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.showcase-link:hover {
  color: #8a6410;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 1rem;
}

.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent));
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
  color: var(--brand-navy);
  text-shadow: none;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.85rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, filter 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-navy) 0%, #2d5a8c 100%);
  color: #fff;
  box-shadow: 0 6px 24px rgba(34, 62, 99, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.06);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: rgba(30, 106, 173, 0.35);
  background: #fff;
  color: var(--text);
}

.hero-meta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.hero-meta dd {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}

/* Sections */
section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin: 0 0 0.6rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
  color: var(--brand-navy);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-head p a {
  font-weight: 600;
}

.bg-alt {
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    rgba(226, 232, 244, 0.95) 48%,
    rgba(226, 232, 244, 0.98) 52%,
    var(--bg) 100%
  );
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.service-card {
  padding: 1.35rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 1px 3px rgba(34, 62, 99, 0.06);
}

.service-card:hover {
  border-color: rgba(30, 106, 173, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(34, 62, 99, 0.1);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--brand-navy);
}

.service-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.service-card p a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.service-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
  opacity: 0.95;
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  position: relative;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  box-shadow: 0 8px 28px rgba(34, 62, 99, 0.1);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover {
  box-shadow: 0 14px 40px rgba(34, 62, 99, 0.14);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 18, 26, 0.88) 0%, transparent 58%);
  z-index: 1;
}

.project-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.thumb-p1 {
  background: linear-gradient(135deg, #243a52 0%, #3d2d48 42%, #1e3a52 100%);
}

.thumb-p2 {
  background: linear-gradient(135deg, #1a3550 0%, #2a5070 48%, #142a40 100%);
}

.thumb-p3 {
  background: linear-gradient(135deg, #4a3020 0%, #6b4830 45%, #352818 100%);
}

.thumb-p4 {
  background: linear-gradient(135deg, #1e3550 0%, #2a5080 50%, #182840 100%);
}

.thumb-p5 {
  background: linear-gradient(135deg, #283045 0%, #3a4860 100%);
}

.project-card:hover .project-thumb {
  transform: scale(1.04);
}

.project-body {
  position: relative;
  z-index: 2;
  padding: 1.25rem 1.35rem;
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: #f8fafc;
}

.project-body p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.88);
}

.project-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f5e6b8;
  margin-bottom: 0.4rem;
}

/* Process */
.process-steps {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process-step {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 3px rgba(34, 62, 99, 0.05);
}

.process-step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--brand-navy);
}

.process-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.process-step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Testimonials */
.testimonials {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .testimonials {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quote-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
  box-shadow: 0 2px 12px rgba(34, 62, 99, 0.06);
}

.quote-card p {
  margin: 0 0 1rem;
}

.quote-card cite {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

/* Contact */
.contact-block {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .contact-block {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-card {
  padding: 2rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 24px rgba(34, 62, 99, 0.07);
}

.contact-card h2 {
  color: var(--brand-navy);
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: var(--brand-navy);
}

.contact-card > p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.contact-list li {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-list a {
  color: var(--text);
  font-weight: 500;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social-row a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.social-row a:hover {
  color: var(--text);
  border-color: rgba(30, 106, 173, 0.35);
  background: var(--accent-dim);
}

.contact-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Form */
form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

form input,
form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fbfcfe;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: rgba(30, 106, 173, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

.form-footnote {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-honeypot input {
  margin-bottom: 0;
}

.form-status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  padding: max(0.85rem, env(safe-area-inset-top, 0px)) 1.25rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 24px rgba(34, 62, 99, 0.12);
}

.form-status--success {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border-bottom: 1px solid rgba(6, 95, 70, 0.2);
}

.form-status--error {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  border-bottom: 1px solid rgba(153, 27, 27, 0.2);
}

/* Cookie banner (RODO / zgoda) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2100;
  padding: max(0.75rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  background: rgba(248, 250, 252, 0.97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(34, 62, 99, 0.12);
  backdrop-filter: blur(12px);
}

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 720px) {
  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52rem;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  flex-shrink: 0;
}

.cookie-banner__link {
  font-size: 0.88rem;
  font-weight: 600;
  margin-right: 0.25rem;
}

.cookie-banner__btn {
  min-height: 44px;
}

/* Strony prawne (polityka) */
.legal-page {
  padding: 3.5rem 0 4.5rem;
}

.legal-content h1 {
  font-family: var(--font-display);
  color: var(--brand-navy);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.legal-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2rem 0 0.65rem;
  color: var(--brand-navy);
}

.legal-content p,
.legal-content ul {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-content ul {
  padding-left: 1.25rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content a {
  font-weight: 500;
}

.legal-meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 2rem !important;
}

.legal-back {
  margin-top: 2.5rem !important;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.footer-sep {
  opacity: 0.45;
  user-select: none;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Mobile: węższe marginesy, krótszy hero, brak „przyklejonego” hover na touch */
@media (max-width: 639px) {
  .wrap,
  .header-inner {
    width: min(100% - 1.25rem, var(--max));
  }

  .header-inner {
    gap: 0.65rem;
  }

  .hero {
    min-height: min(85dvh, 720px);
  }

  .hero-grid {
    padding-top: calc(var(--header-h) + 1.25rem);
    padding-bottom: clamp(2rem, 6vw, 4rem);
  }

  .hero h1 {
    max-width: none;
  }

  .hero-lead {
    max-width: none;
    font-size: 1.05rem;
  }

  .site-footer {
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: clamp(1.65rem, 9vw, 2.45rem);
    letter-spacing: -0.025em;
  }

  .portfolio-tile__title {
    font-size: 0.92rem;
  }
}

@media (hover: none) {
  .portfolio-tile:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(34, 62, 99, 0.08);
  }

  .portfolio-tile:hover img {
    transform: scale(1.02);
  }

  .portfolio-tile:active {
    transform: scale(0.99);
  }
}

/* Motion */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .project-card:hover .project-thumb {
    transform: none;
  }
}
