/* =========================================================
   TEKSTURY — język tenisa zamiast szkła
   linie kortu (kreda) + raster kropek z karuzel + ziarno filmowe
   Bez backdrop-blur na przewijanych elementach (wydajność).
   ========================================================= */
.tex { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

/* Linie kortu: rzut z góry, wycięty fragment wychodzący poza krawędź sekcji */
.tex__court {
  position: absolute; width: 520px; aspect-ratio: 374 / 800; right: -140px; top: -120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 374 800' fill='none' stroke='%23F6F8EC' stroke-width='2'%3E%3Crect x='0' y='0' width='366' height='792'/%3E%3Cpath d='M45 0V792M321 0V792M45 185H321M45 607H321M183 185V607M0 396H366M183 0V12M183 792V780'/%3E%3C/svg%3E") no-repeat center / contain; opacity: .07; transform: rotate(-24deg);
}
.tex__court--left { right: auto; left: -200px; top: auto; bottom: -260px; transform: rotate(18deg); }
.section--light .tex__court { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 374 800' fill='none' stroke='%232F8F3A' stroke-width='2'%3E%3Crect x='0' y='0' width='366' height='792'/%3E%3Cpath d='M45 0V792M321 0V792M45 185H321M45 607H321M183 185V607M0 396H366M183 0V12M183 792V780'/%3E%3C/svg%3E"); opacity: .09; }

/* Hero: kort „w perspektywie” jak podłoga pod tekstem, w kolorze piłki */
.tex__floor {
  position: absolute; left: 50%; bottom: -6%; width: 110vw; max-width: 1600px; aspect-ratio: 374 / 800;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 374 800' fill='none' stroke='%23D4ED3D' stroke-width='2.5'%3E%3Crect x='0' y='0' width='366' height='792'/%3E%3Cpath d='M45 0V792M321 0V792M45 185H321M45 607H321M183 185V607M0 396H366M183 0V12M183 792V780'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: translateX(-50%) perspective(900px) rotateX(68deg); transform-origin: 50% 100%;
  opacity: .32;
  mask-image: linear-gradient(0deg, transparent 0%, #000 30%, #000 60%, transparent 100%);
}

/* Raster kropek (jak na slajdzie „Rodzicu z Radomia”) */
.tex__dots {
  position: absolute; width: 360px; height: 260px; top: 72px; right: 5%;
  background: radial-gradient(circle, rgba(246,248,236,.5) 1.4px, transparent 1.9px) 0 0 / 16px 16px;
  mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); opacity: .5;
}
.section--light .tex__dots { background-image: radial-gradient(circle, rgba(28,29,69,.45) 1.4px, transparent 1.9px); opacity: .35; }
.tex__dots--low { top: auto; bottom: 60px; right: auto; left: 4%; }

/* Cień filmu w hero: czytelny tekst, mączka zostaje w naturalnym kolorze */
.tex__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(28,29,69,.88) 0%, rgba(28,29,69,.55) 38%, rgba(28,29,69,.05) 68%),
    linear-gradient(0deg, rgba(28,29,69,1) 0%, rgba(28,29,69,.6) 22%, rgba(28,29,69,0) 50%),
    linear-gradient(180deg, rgba(28,29,69,.55) 0%, rgba(28,29,69,0) 18%);
}

/* Ziarno filmowe: jedna stała warstwa na całą stronę */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Podwójna ramka (zewnętrzna obudowa + wnętrze) zamiast szkła */
.bezel { padding: 6px; border-radius: calc(var(--radius-lg) + 6px); background: rgba(255,255,255,.04); box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.bezel > .bezel__core { border-radius: var(--radius-lg); background: var(--navy-800); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }

.tex-section { position: relative; isolation: isolate; }
.tex-section > *:not(.tex):not(.ghost-word) { position: relative; z-index: 1; }
