/* Pondside Games: shared styles for every page.
   url() paths are relative to this file (assets/). */
:root {
  --bg: #F3F0E1;
  --surface: #FBF8EE;
  --ink: #24311F;
  --ink-soft: #5D6852;
  --line: #DDD6BE;
  --moss: #4F8F4A;
  --moss-deep: #3A6D37;
  --water: #4FA8A0;
  --water-deep: #2A7470;
  --water-glint: #E9F7F1;
  --pool-bottom: #1D5753;
  --pool-ink: #F1FAF6;
  --pool-soft: #BEDFD7;
  --pool-card: rgba(255, 255, 255, .08);
  --pool-line: rgba(255, 255, 255, .16);
  --pad: #6FAE5A;
  --pad-deep: #4E8A3F;
  --pad-light: #9CCB7E;
  --sun: #EE7A36;
  --on-sun: #2B170A;
  --wood: #94603A;
  --wood-dark: #6E4427;
  --on-wood: #FCEBD3;
  --sky-top: #CFE6E3;
  --firefly: #F7E58A;
  --paper-white: #FFFDF6;
  --polaroid-ink: #3B3328;
  --tape: rgba(240, 222, 170, .75);
  --note-bg: #FFF3B8;
  --note-ink: #4A3D10;
  --shadow: 0 1px 0 rgba(60, 45, 20, .06), 0 12px 30px -12px rgba(80, 60, 25, .28);
  --night-bg: #0B1D20;
  --night-ink: #DCE8DC;
  --night-soft: #93AA9C;
  --paint-blue: #2D7FE0;
  --paint-yellow: #F6B526;
  --paint-red: #E0483A;
  --paint-green: #7CC444;
  --paint-white: #EEF3F6;

  --font-display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F2427; --surface: #153236; --ink: #EAF0E2; --ink-soft: #A9BBAC; --line: #24474B;
    --moss: #82C477; --moss-deep: #9BD48F; --water: #22605F; --water-deep: #133F42; --water-glint: #9FD6CF;
    --pool-bottom: #0C2B2E; --pool-ink: #EAF4EF; --pool-soft: #9FC4BA;
    --pad: #3F7A3C; --pad-deep: #2E5E2D; --pad-light: #5C9653;
    --sun: #F49A5C; --wood: #8A5B37; --wood-dark: #5E3C22;
    --sky-top: #07171A; --paper-white: #EFE9D8; --tape: rgba(220, 200, 150, .55);
    --note-bg: #3D3A1E; --note-ink: #F3E9B5;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F2427; --surface: #153236; --ink: #EAF0E2; --ink-soft: #A9BBAC; --line: #24474B;
  --moss: #82C477; --moss-deep: #9BD48F; --water: #22605F; --water-deep: #133F42; --water-glint: #9FD6CF;
  --pool-bottom: #0C2B2E; --pool-ink: #EAF4EF; --pool-soft: #9FC4BA;
  --pad: #3F7A3C; --pad-deep: #2E5E2D; --pad-light: #5C9653;
  --sun: #F49A5C; --wood: #8A5B37; --wood-dark: #5E3C22;
  --sky-top: #07171A; --paper-white: #EFE9D8; --tape: rgba(220, 200, 150, .55);
  --note-bg: #3D3A1E; --note-ink: #F3E9B5;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- baza ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  overflow-x: hidden; transition: background-color .4s ease, color .4s ease;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.08; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1160px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--moss-deep);
}
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--moss); }

/* ---------- skip link ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--sun); color: var(--on-sun); font-weight: 800; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- nav ---------- */
.nav { position: relative; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.logo {
  display: block; width: clamp(160px, 18vw, 220px); aspect-ratio: 822 / 196; background: var(--ink);
  -webkit-mask: url(../img/logo.webp) center / contain no-repeat; mask: url(../img/logo.webp) center / contain no-repeat;
}
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 4px 0 0; padding: 0; align-items: center; }
.nav a.link { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; transition: background-color .2s; }
.nav a.link:hover { background: color-mix(in srgb, var(--moss) 14%, transparent); }
.nav a.link.flag { color: var(--sun); }
.icon-btn {
  height: 42px; min-width: 42px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: inherit; font-weight: 800; font-size: 13.5px;
  padding: 0 10px; transition: transform .3s, border-color .2s;
}
.icon-btn:hover { border-color: var(--moss); }
.icon-btn svg { width: 20px; height: 20px; flex: none; }
.theme-btn { padding: 0; width: 42px; }
.theme-btn:hover { transform: rotate(-15deg); }
.lang { position: relative; }
.lang-menu, .mobile-menu {
  position: absolute; z-index: 80; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 6px;
}
.lang-menu { right: 0; top: calc(100% + 8px); min-width: 150px; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: color-mix(in srgb, var(--moss) 14%, transparent); }
.menu-btn { display: none; padding: 0; width: 42px; }
.mobile-menu { left: 0; right: 0; top: calc(100% - 8px); display: grid; padding: 8px; }
.mobile-menu a { padding: 12px 14px; border-radius: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.mobile-menu a:hover { background: color-mix(in srgb, var(--moss) 14%, transparent); }
.mobile-menu a.flag { color: var(--sun); }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (min-width: 821px) { .mobile-menu { display: none !important; } }
.theme-btn svg { display: none; }
.theme-btn[data-mode="auto"] .auto, .theme-btn[data-mode="light"] .sun, .theme-btn[data-mode="dark"] .moon { display: block; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; padding: 14px 26px; border-radius: 999px;
  border: 2px solid transparent; background: none; color: inherit;
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .25s, background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-3px); }
.btn svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.btn-sun { background: var(--sun); color: var(--on-sun); box-shadow: 0 6px 0 -1px color-mix(in srgb, var(--sun) 55%, var(--wood-dark)); }
.btn-sun:hover { box-shadow: 0 9px 0 -1px color-mix(in srgb, var(--sun) 55%, var(--wood-dark)); }
.btn small { display: block; font-family: var(--font-body); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .75; line-height: 1; }
.btn span { line-height: 1.1; }
.btn-ghost { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--moss); }
.btn-sm { font-size: 15px; padding: 9px 16px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- polaroid, kamyki ---------- */
.polaroid { position: relative; background: var(--paper-white); padding: 12px 12px 0; border-radius: 3px; box-shadow: var(--shadow); max-width: 100%; margin: 0; }
.polaroid::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 86px; height: 24px; margin-left: -43px;
  background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 1px; }
.polaroid figcaption { font-family: var(--font-hand); font-size: 22px; color: var(--polaroid-ink); text-align: center; padding: 5px 4px 9px; line-height: 1.15; }
.pebbles { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.pebbles li {
  font-size: 13.5px; font-weight: 800; padding: 5px 14px;
  background: color-mix(in srgb, var(--moss) 13%, var(--surface)); color: var(--moss-deep);
  border-radius: 58% 42% 55% 45% / 55% 48% 52% 45%;
}
.pebbles li:nth-child(2n) { border-radius: 45% 55% 40% 60% / 50% 55% 45% 50%; }

/* ---------- staw (canvas) ---------- */
.pond-scene { position: relative; isolation: isolate; overflow: hidden; }
.pond-scene > canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }

/* ---------- stopka: staw nocą ---------- */
.night-wave { display: block; width: 100%; height: 46px; background: var(--bg); }
.night-wave path { fill: var(--night-bg); }
.night { position: relative; background: var(--night-bg); color: var(--night-ink); overflow: hidden; padding-block: 64px 32px; }
.night a { text-decoration: none; }
.night a:hover { color: var(--firefly); }
.night-row { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.night-row nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }
.night-brand { display: flex; align-items: center; gap: 14px; }
.night-brand .frog {
  width: 46px; height: 46px; background: #5E9A58; flex: none;
  -webkit-mask: url(../img/frog.svg) center / contain no-repeat; mask: url(../img/frog.svg) center / contain no-repeat;
}
.night-brand b { font-family: var(--font-display); font-weight: 600; font-size: 22px; display: block; line-height: 1.1; }
.night-brand span { color: var(--night-soft); font-size: 14px; }
.legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(220,232,220,.12); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 14px; color: var(--night-soft); position: relative; z-index: 1; }
.flies { position: absolute; inset: 0; pointer-events: none; }
.flies i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--firefly);
  box-shadow: 0 0 10px 3px color-mix(in srgb, var(--firefly) 60%, transparent);
  animation: fly 9s ease-in-out infinite, blink 2.8s ease-in-out infinite;
}
@keyframes fly { 0%,100% { transform: translate(0,0); } 33% { transform: translate(24px,-18px); } 66% { transform: translate(-16px,12px); } }
@keyframes blink { 0%,100% { opacity: .15; } 50% { opacity: 1; } }

/* ---------- powiększanie screenów ---------- */
.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: 1fr auto; place-items: center;
  background: rgba(8, 22, 24, .92);
  padding: calc(56px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 150px); object-fit: contain; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.lightbox p { color: #DCE8DC; font-family: var(--font-hand); font-size: 24px; margin-top: 12px; text-align: center; }
.lightbox p a { font-family: var(--font-body); font-size: 15px; font-weight: 700; margin-left: 12px; color: var(--firefly); }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; transition: background-color .2s; }
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(16px, env(safe-area-inset-left, 0px)); top: 50%; margin-top: -24px; }
.lb-next { right: max(16px, env(safe-area-inset-right, 0px)); top: 50%; margin-top: -24px; }

@media (max-width: 640px) {
  .logo { width: 150px; }
  .lb-prev, .lb-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
