/* =============================================================================
   BASE — reset, typografia globalna, elementy pomocnicze, utilities
   ============================================================================= */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto; /* smooth-scroll obsługuje JS (Lenis/RAF) */
  overflow-x: hidden;    /* przycina off-canvas drawer, brak poziomego scrolla */
  -webkit-text-size-adjust: 100%; /* iOS: nie powiększaj tekstu w poziomie */
  text-size-adjust: 100%;
}

/* Gdy JS włączy własny smooth scroll, blokujemy natywny scroll na body */
html.has-smooth, html.has-smooth body { height: auto; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  position: relative;
  cursor: auto;
  -webkit-tap-highlight-color: transparent; /* brak szarego błysku na tap (Android/iOS) */
}
/* Font displayowy — włącz optyczne skalowanie Fraunces/Quablo */
.display, .h2, .h3, .hero__title, .apt__title, .pkg__title,
.bento__title, .energy__name, .attr__name, .hero__now-name,
.booking__box-title, .footer__brand-txt, .footer h4, .review-card__text {
  font-optical-sizing: auto;
}

/* Ukryj natywny kursor tylko gdy custom cursor aktywny (desktop) */
body.has-cursor { cursor: none; }
body.has-cursor a,
body.has-cursor button { cursor: none; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease); }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--gold); color: #fff; }

/* --- Typografia globalna --- */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.28;
  letter-spacing: -0.005em;
  color: var(--text-strong);
}
em, .em { font-style: normal; color: var(--gold); font-weight: 500; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--text);
  font-weight: 300;
}
.body-text {
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-weight: 300;
}
.body-text strong { font-weight: 600; color: var(--text-strong); }

/* --- Eyebrow (nadtytuł) --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}
.eyebrow::before {
  content: '';
  width: 38px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow.is-center::after {
  content: '';
  width: 38px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.eyebrow.is-light { color: var(--gold-lite); }

/* --- Utilities --- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.wrap--narrow { max-width: var(--wrap-narrow); }
.center { text-align: center; }
.mt-xl { margin-top: clamp(32px, 5vw, 56px); }
.mt-l  { margin-top: clamp(24px, 4vw, 40px); }
.stack > * + * { margin-top: 1.1rem; }
.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;
}

/* Ziarno / grain — nakładka premium na całą stronę */
.grain {
  position: fixed; inset: 0; z-index: 500;
  pointer-events: none; opacity: 0.04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Pasek postępu scrollowania */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-lite));
  z-index: var(--z-progress);
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--gold-glow);
}

/* Dostępność: redukcja ruchu */
@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;
  }
  .grain { display: none; }
}
