/* Marzanna — Leśny rytuał. Tokeny wg Marzanna_AI_Brand_Guide.md */
:root {
  --linen: #F3EEE5;
  --linen-deep: #EAE3D6;
  --white: #FFFFFF;
  --forest: #243E36;
  --forest-deep: #1C322B;
  --charcoal: #293230;
  --muted: #55605C;
  --oak: #715440;
  --clay: #A8694E;
  --sage: #98A18F;
  --steel: #B9C3C4;
  --line: rgba(41, 50, 48, .14);
  --line-light: rgba(243, 238, 229, .2);

  --serif: "Lora", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;

  --wrap: 1200px;
  --pad: 40px;
  --section: 104px;
  --r-btn: 6px;
  --r-card: 8px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --fast: 220ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--charcoal);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
h1, h2 { font-family: var(--serif); letter-spacing: -.01em; }
h1 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.08; }
h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; }
h3 { font: 600 18px/1.35 var(--sans); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--section) 0; }
.section__head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 56px; }
.section__head p:not(.eyebrow) { color: var(--muted); }
.eyebrow {
  font: 600 13px/1.4 var(--sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--oak);
}
.eyebrow--clay { color: #8E5640; } /* ciemniejsza glina dla kontrastu małego tekstu */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--forest); color: var(--linen); padding: 10px 16px; border-radius: var(--r-btn); }
.skip:focus { left: 8px; }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-btn); border: 1px solid transparent;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--forest); color: var(--linen); }
.btn--primary:hover { background: var(--forest-deep); }
.btn--secondary { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn--secondary:hover { background: rgba(36, 62, 54, .06); }
.btn--light { background: var(--linen); color: var(--forest); }
.btn--light:hover { background: var(--white); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }

/* Nawigacja */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(243, 238, 229, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color var(--fast) var(--ease); }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; font: 600 15px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; text-decoration: none; }
.nav__mark { width: 29px; height: 40px; flex: none; transition: width 320ms var(--ease), margin 320ms var(--ease), opacity 320ms var(--ease), transform 320ms var(--ease); }
/* Desktop: emblemat w menu pojawia się dopiero, gdy logo z hero zniknie z ekranu */
@media (min-width: 700px) {
  .nav:not(.show-mark) .nav__mark { width: 0; margin-right: -12px; opacity: 0; transform: scale(.6); }
}
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--muted); padding: 10px 0; transition: color var(--fast) var(--ease); }
.nav__links a:hover { color: var(--charcoal); }
.lang { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-btn); }
.lang__btn {
  min-width: 40px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 4px;
  background: transparent; color: var(--muted); font: 600 13px/1 var(--sans); letter-spacing: .08em; cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.lang__btn:hover { color: var(--charcoal); }
.lang__btn[aria-pressed="true"] { background: var(--forest); color: var(--linen); }

/* 1. Hero */
.hero { padding: 48px 0 0; }
.hero__text { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: end; margin-bottom: 40px; }
.hero__text .eyebrow { margin-bottom: 18px; }
.hero__logo { width: 160px; height: auto; justify-self: end; }
.hero__lead { display: grid; justify-items: center; gap: 24px; max-width: 680px; margin: 40px auto 0; text-align: center; color: var(--muted); font-size: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero__media {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--r-card);
  aspect-ratio: 16 / 8.2; max-height: 78vh; width: 100%;
  background: var(--linen-deep);
}
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }

/* 2+3. Zapis */
.signup__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.signup__intro { display: grid; gap: 18px; position: sticky; top: 108px; }
.signup__intro > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.ticks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 14px; height: 7px; border-left: 1.6px solid var(--forest); border-bottom: 1.6px solid var(--forest); transform: rotate(-45deg) translateY(-50%); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); }
.form { padding: 32px; display: grid; gap: 22px; }
.variant { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.variant legend { font-weight: 600; margin-bottom: 12px; padding: 0; }
.variant__opt { position: relative; cursor: pointer; }
.variant__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.variant__card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--linen);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.variant__card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(.75); transition: filter var(--fast) var(--ease), transform 600ms var(--ease); }
.variant__body { display: grid; gap: 4px; padding: 14px 14px 16px 44px; position: relative; font-size: 15px; line-height: 1.45; color: var(--muted); }
.variant__body strong { color: var(--charcoal); font-size: 16px; }
.variant__body::before { /* znacznik radia */
  content: ""; position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.6px solid var(--muted); background: var(--white); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.variant__opt:hover .variant__card img { transform: scale(1.03); }
.variant__opt input:checked + .variant__card { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.variant__opt input:checked + .variant__card img { filter: none; }
.variant__opt input:checked + .variant__card .variant__body::before { border-color: var(--forest); box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 9px var(--forest); }
.variant__opt--warm input:checked + .variant__card { border-color: var(--clay); box-shadow: 0 0 0 1px var(--clay); }
.variant__opt--warm input:checked + .variant__card .variant__body::before { border-color: var(--clay); box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 9px var(--clay); }
.variant__opt input:focus-visible + .variant__card { outline: 2px solid var(--forest); outline-offset: 3px; }

.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 15px; }
.field input {
  min-height: 52px; padding: 0 16px; width: 100%;
  font: 400 17px var(--sans); color: var(--charcoal);
  border: 1px solid rgba(41, 50, 48, .35); border-radius: var(--r-btn); background: var(--white);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.field input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(36, 62, 54, .15); }
.field input[aria-invalid="true"] { border-color: #9B3B2A; }
.field__error { color: #9B3B2A; font-size: 14px; min-height: 0; }
.field__error:empty { display: none; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--forest); }
.form__note { font-size: 14px; color: var(--muted); text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form button[disabled] { opacity: .7; cursor: progress; }
.form-success { padding: 40px 32px; display: grid; gap: 12px; }
.form-success h3 { font: 500 32px/1.2 var(--serif); }
.form-success p:not(.eyebrow) { color: var(--muted); }

/* 4. Cechy — kafle ułożone falą */
.features { background: linear-gradient(var(--linen), var(--linen-deep) 60%, var(--linen)); overflow: hidden; }
.wave { list-style: none; margin: 0; padding: 0 0 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.tile { --y: 0px; transform: translateY(var(--y)); }
.tile:nth-child(3n+1) { --y: 0px; }
.tile:nth-child(3n+2) { --y: 72px; }
.tile:nth-child(3n+3) { --y: 24px; }
.tile figure { margin: 0; display: grid; gap: 16px; }
.tile__img { position: relative; overflow: hidden; border-radius: var(--r-card); aspect-ratio: 4 / 5; background: var(--steel); }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { display: grid; gap: 4px; padding: 0 4px; }
.tile figcaption p { color: var(--muted); font-size: 16px; }
.tile figcaption h3 { position: relative; padding-left: 22px; }
.tile figcaption h3::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 1.5px; background: var(--oak); transition: width var(--fast) var(--ease); }
.tile:hover figcaption h3::before { width: 16px; }

/* 5. Premiera */
.section--dark { background: var(--forest); color: var(--linen); }
.section--dark .eyebrow { color: var(--steel); }
.premiere__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; }
.premiere__media { margin: 0; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 5; }
.premiere__media img { width: 100%; height: 100%; object-fit: cover; }
.premiere__body { display: grid; gap: 20px; justify-items: start; }
.steps { list-style: none; margin: 16px 0 24px; padding: 0; display: grid; width: 100%; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line-light); }
.steps li:last-child { border-bottom: 1px solid var(--line-light); }
.steps__n { font: 400 28px/1 var(--serif); color: var(--steel); padding-top: 2px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: rgba(243, 238, 229, .82); }

/* 6. Film sterowany przewijaniem (sekwencja klatek, jak na apple.com) */
.scrolly { position: relative; height: 320vh; background: var(--charcoal); }
.scrolly__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scrolly__poster, .scrolly__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.scrolly__canvas { opacity: 0; transition: opacity 300ms var(--ease); }
.scrolly.is-live .scrolly__canvas { opacity: 1; }
.scrolly__shade { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(28, 50, 43, .72)); pointer-events: none; }
.scrolly__quote {
  position: absolute; left: 0; right: 0; bottom: 56px;
  padding: 0 max(var(--pad), calc((100% - var(--wrap)) / 2));
  font: 400 clamp(30px, 4.4vw, 56px)/1.15 var(--serif); color: var(--linen);
}
.scrolly__quote span { display: inline-block; opacity: .18; transform: translateY(10px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.scrolly__quote span.is-on { opacity: 1; transform: none; }
.scrolly__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(243, 238, 229, .15); }
.scrolly__progress span { display: block; height: 100%; width: 100%; background: var(--steel); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
/* Bez animacji: zwykły kadr z całym cytatem */
.scrolly.is-static { height: auto; }
.scrolly.is-static .scrolly__sticky { position: relative; height: min(86vh, 760px); min-height: 420px; }
.scrolly.is-static .scrolly__quote span { opacity: 1; transform: none; }
.scrolly.is-static .scrolly__progress { display: none; }

/* 7a. Rozmiary */
.sizes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.size { padding: 28px; display: grid; gap: 20px; align-content: start; }
.size__label { font: 500 28px/1.2 var(--serif); }
.size--info { background: transparent; }
.size--info .size__label { font-size: 22px; }
.size__note { color: var(--muted); font-size: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.spec { margin: 0; display: grid; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec div:last-child { border-bottom: 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.heater { margin-top: 24px; padding: 28px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; border-left: 3px solid var(--clay); }
.heater > div:first-child { display: grid; gap: 10px; }
.heater > div:first-child p:not(.eyebrow) { color: var(--muted); }
.heater h3 { font: 500 26px/1.25 var(--serif); }
.fineprint { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* 7b. FAQ */
.faq { border-top: 1px solid var(--line); }
.faq__grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; align-items: start; }
.faq .section__head { margin-bottom: 0; position: sticky; top: 108px; }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list details:first-child { border-top: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 48px 22px 0; font-weight: 600; font-size: 17px; min-height: 44px;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 1.6px solid var(--forest); border-bottom: 1.6px solid var(--forest);
  transform: rotate(45deg); transition: transform var(--fast) var(--ease);
}
.faq__list details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq__list details p { padding: 0 48px 24px 0; color: var(--muted); }

/* 8. Stopka */
.footer { background: var(--forest); color: var(--linen); padding: 96px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 240px 1fr 1.1fr; gap: 56px; align-items: start; }
.footer__logo { background: var(--white); border-radius: var(--r-card); padding: 28px; width: 240px; } /* logo zawsze na białym polu */
.footer__logo img { width: 100%; height: auto; }
.footer__story { display: grid; gap: 16px; justify-items: start; }
.footer__story h2 { font-size: 30px; }
.footer__story p { color: rgba(243, 238, 229, .82); max-width: 460px; }
.footer__cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
.footer__cols h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: 14px; }
.footer__cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__cols a { text-decoration: none; display: inline-block; padding: 6px 0; overflow-wrap: anywhere; }
.footer__cols a:hover { text-decoration: underline; }
.footer__ig {
  grid-column: 2 / -1; display: inline-flex; align-items: center; gap: 12px; justify-self: start;
  min-height: 48px; padding: 0 18px; border: 1px solid var(--line-light); border-radius: var(--r-btn);
  text-decoration: none; transition: background-color var(--fast) var(--ease);
}
.footer__ig:hover { background: rgba(243, 238, 229, .08); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line-light); font-size: 14px; color: rgba(243, 238, 229, .7); }

/* Wejście przy przewijaniu */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .tile.reveal { transform: translateY(calc(var(--y) + 32px)); }
.js .tile.reveal.is-in { transform: translateY(var(--y)); }

/* Responsywność */
@media (max-width: 1024px) {
  :root { --pad: 32px; --section: 88px; }
  .nav__links { display: none; }
  .lang { margin-left: auto; }
  .hero__text, .signup__grid, .premiere__grid, .faq__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__logo { order: -1; justify-self: start; width: 120px; }
  .signup__intro, .faq .section__head { position: static; }
  .wave { grid-template-columns: repeat(2, 1fr); gap: 24px; padding-bottom: 48px; }
  .tile:nth-child(odd) { --y: 0px; }
  .tile:nth-child(even) { --y: 48px; }
  .sizes__grid { grid-template-columns: 1fr 1fr; }
  .size--info { grid-column: 1 / -1; }
  .heater { grid-template-columns: 1fr; gap: 20px; }
  .premiere__media { aspect-ratio: 16 / 10; }
  .footer__grid { grid-template-columns: 200px 1fr; }
  .footer__logo { width: 200px; padding: 24px; }
  .footer__cols, .footer__ig { grid-column: 1 / -1; }
}
@media (max-width: 699px) {
  :root { --pad: 20px; --section: 56px; }
  body { font-size: 16px; }
  .nav__inner { gap: 10px; }
  .nav__brand { letter-spacing: .14em; font-size: 14px; gap: 8px; }
  .nav__mark { width: 25px; height: 34px; }
  .hero__logo { display: none; } /* na telefonie logo jest w menu */
  .nav .btn--sm { padding: 0 12px; }
  .hero { padding-top: 28px; }
  .hero__text { margin-bottom: 24px; gap: 20px; }
  .hero__lead { font-size: 17px; margin-top: 28px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__media { aspect-ratio: 4 / 5; max-height: 72vh; }
  .hero__photo { object-position: 50% 60%; } /* osobne, pionowe zdjęcie na telefon */
  .section__head { margin-bottom: 36px; }
  .form { padding: 20px; }
  .variant { gap: 10px; }
  .variant__body { padding: 12px 10px 14px 38px; font-size: 14px; }
  .variant__body::before { left: 10px; top: 14px; }
  .wave { grid-template-columns: 1fr; gap: 40px; padding-bottom: 0; }
  .tile, .tile:nth-child(n) { --y: 0px; }
  .tile__img { aspect-ratio: 4 / 3.6; }
  .sizes__grid { grid-template-columns: 1fr; }
  .scrolly { height: 240vh; }
  .scrolly__poster, .scrolly__canvas { object-position: 50% 50%; } /* pionowe ujęcie na telefon */
  .scrolly__quote { bottom: 40px; }
  .scrolly.is-static .scrolly__sticky { height: 70vh; min-height: 380px; }
  .footer { padding-top: 64px; }
  .footer__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__logo { width: 240px; padding: 28px; } /* logo ≥ 160 px szerokości */
  .footer__cols { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .js .reveal, .js .tile.reveal { opacity: 1; transform: translateY(var(--y, 0)); }
}
