/* Napisownia — wspólne style strony wstępnej i dokumentów (motyw „Arktyka”, jak w aplikacji). */
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(czcionki/instrument-serif-italic.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url(czcionki/caveat-700.woff2) format("woff2"); }
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url(czcionki/bebas-neue.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --ground: #eef3f9;
  --surface: #ffffff;
  --row: #f5f8fc;
  --ink: #0a1a33;
  --ink-2: #26364f;
  --muted: #5d6b82;
  --line: #e2e9f2;
  --line-strong: #c9d5e4;
  --accent: #1f5bff;
  --accent-2: #36c5f0;
  --accent-soft: #e9f0ff;
  --night: #050d22;
  --night-2: #0b1a3a;
  --warm: #ff7a3d;
  --ok: #12a26b;
  --danger: #e5484d;
  --grad: linear-gradient(135deg, #1f5bff 0%, #3a8cff 55%, #36c5f0 100%);
  --grad-x: linear-gradient(90deg, #1f5bff, #36c5f0);
  --glow: 0 18px 34px -16px rgba(31, 91, 255, .8);
  --card-shadow: 0 1px 2px rgba(10, 26, 51, .04), 0 24px 48px -34px rgba(10, 26, 51, .28);
  --sans: "Geist", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.2, .9, .3, 1.35);
  --r: 22px;
  --gutter: 20px;
}
@media (max-width: 560px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font: 400 16px/1.6 var(--sans); color: var(--ink); background: var(--ground);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(31, 91, 255, .18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.hand { font-family: var(--hand); font-weight: 700; }
.mono { font-family: var(--mono); }

/* ---------- Logo (jak w aplikacji) ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; font: 700 21px/1 var(--sans); letter-spacing: -.045em; color: var(--ink); text-decoration: none; }
.brand mark { color: var(--accent); background: none; padding: 0; }
.brand-mark {
  flex: none; width: 30px; height: 30px; border-radius: 10px; position: relative;
  background: var(--grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 16px -8px rgba(31, 91, 255, .8);
  transition: transform .35s var(--spring);
}
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; left: 50%; height: 3.5px; border-radius: 3px; transform: translateX(-50%); background: #fff; }
.brand-mark::before { top: 10px; width: 10px; opacity: .6; }
.brand-mark::after { top: 17px; width: 15px; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

/* ---------- Przyciski ---------- */
.btn {
  --h: 46px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--h); padding: 0 20px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 600 15px/1 var(--sans); letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--spring), box-shadow .25s var(--ease), border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
.btn svg { flex: none; width: 18px; height: 18px; }
.btn-primary { border: 0; color: #fff; background: var(--grad); box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover { box-shadow: 0 22px 40px -16px rgba(31, 91, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .35); }
/* Błysk przesuwający się po przycisku */
.btn-primary::after {
  content: ''; position: absolute; inset: -2px auto -2px -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-18deg); animation: shine 4.8s var(--ease) infinite 1.4s;
}
@keyframes shine { 0%, 62% { left: -60%; } 100% { left: 130%; } }
.btn-primary .arrow { transition: transform .3s var(--spring); }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-lg { --h: 58px; padding: 0 28px; border-radius: 17px; font-size: 17px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(10, 26, 51, .05); border-color: transparent; }
.btn-light { background: #fff; border: 0; color: var(--ink); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); }
.btn-outline-light { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .12); }

.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 54px;
  border: 1px solid #dadce0; border-radius: 14px; background: #fff; color: #1f1f1f;
  font: 600 16px/1 var(--sans); cursor: pointer; text-decoration: none;
  transition: box-shadow .2s, transform .2s var(--spring), background .2s;
}
.google-btn svg { width: 20px; height: 20px; flex: none; }
.google-btn:hover { background: #f8faff; transform: translateY(-1px); box-shadow: 0 12px 26px -16px rgba(10, 26, 51, .55); }

/* ---------- Pasek nawigacji ---------- */
.top { position: fixed; z-index: 50; top: 12px; left: 0; right: 0; pointer-events: none; }
.top .wrap { pointer-events: auto; }
.top-bar {
  display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 10px 0 16px;
  border: 1px solid rgba(201, 213, 228, .7); border-radius: 20px;
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 30px -22px rgba(10, 26, 51, .35);
  transition: box-shadow .3s, background .3s, transform .45s var(--ease);
}
.top.scrolled .top-bar { background: rgba(255, 255, 255, .86); box-shadow: 0 18px 40px -26px rgba(10, 26, 51, .5); }
.top.hide .top-bar { transform: translateY(-120%); }
.top-links { display: flex; gap: 2px; margin: 0 auto; }
.top-links a { padding: 8px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background .2s, color .2s; }
.top-links a:hover { background: rgba(31, 91, 255, .07); color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.top-actions .btn { --h: 42px; padding: 0 16px; font-size: 14.5px; border-radius: 12px; }
.menu-btn { display: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.menu-btn span { display: block; width: 18px; height: 2px; margin: 4px auto; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.top.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.top.open .menu-btn span:nth-child(2) { opacity: 0; }
.top.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu {
  display: none; margin-top: 8px; padding: 10px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -30px rgba(10, 26, 51, .45);
}
.mobile-menu a:not(.btn) { display: block; padding: 13px 14px; border-radius: 12px; font-size: 17px; font-weight: 600; text-decoration: none; }
.mobile-menu a:not(.btn):active { background: var(--accent-soft); }
.mobile-menu .btn { width: 100%; margin-top: 8px; }
@media (max-width: 920px) {
  .top-links, .top-actions .login-link { display: none; }
  .top-actions { margin-left: auto; }
  .menu-btn { display: block; }
  .top.open .mobile-menu { display: block; animation: drop .35s var(--ease); }
}
@media (max-width: 420px) { .top-actions .btn-primary { padding: 0 12px; font-size: 13.5px; } .brand { font-size: 19px; } }
@media (max-width: 560px) { .hide-sm { display: none !important; } }
.doc-page .top-actions { margin-left: auto; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* ---------- Stopka ---------- */
.foot { position: relative; padding: 64px 0 36px; background: var(--night); color: #b9c6dc; font-size: 14.5px; }
.foot .brand { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.foot h3 { margin: 4px 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7f93b5; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot a, .foot .link-btn { color: #dbe5f5; text-decoration: none; transition: color .2s; }
.foot a:hover, .foot .link-btn:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.link-btn { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; text-align: left; }
.foot-note { margin: 14px 0 0; max-width: 34ch; line-height: 1.55; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); color: #7f93b5; font-size: 13px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* Miejsca do uzupełnienia przed publikacją (dane firmy itp.) */
.todo { padding: 0 4px; border-radius: 4px; background: #fff3b0; color: #6b4e00; box-shadow: inset 0 -1px 0 #f0d45a; font-style: normal; }
.foot .todo { background: rgba(255, 214, 10, .16); color: #ffe27a; box-shadow: none; }

/* ---------- Okna (logowanie, ustawienia cookies) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 13, 34, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade .25s var(--ease);
}
.modal[hidden] { display: none; }
.sheet {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto;
  padding: 30px 28px 26px; border-radius: 28px; background: var(--surface);
  box-shadow: 0 40px 90px -30px rgba(5, 13, 34, .7); animation: pop .45s var(--spring);
}
.sheet-x {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 12px;
  background: var(--row); cursor: pointer; font-size: 22px; line-height: 1; color: var(--muted);
}
.sheet-x:hover { background: var(--accent-soft); color: var(--ink); }
.sheet h2 { margin: 18px 0 8px; font-size: 28px; line-height: 1.12; letter-spacing: -.04em; }
.sheet p { margin: 0 0 14px; color: var(--muted); }
.sheet .fine { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.sheet .fine a { color: var(--ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }

/* ---------- Baner i ustawienia cookies ---------- */
.cookie {
  position: fixed; z-index: 80; left: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px));
  padding: 20px 20px 18px; border-radius: 22px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px -28px rgba(5, 13, 34, .55);
  animation: rise .6s var(--spring);
}
.cookie[hidden] { display: none; }
.cookie h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-size: 16.5px; letter-spacing: -.02em; }
.cookie p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.cookie p a { color: var(--accent); }
.cookie-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cookie-row .btn { --h: 44px; padding: 0 12px; font-size: 14.5px; width: 100%; }
.cookie-more { display: block; margin: 10px auto 0; padding: 4px 8px; border: 0; background: none; color: var(--muted); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-more:hover { color: var(--ink); }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
@media (max-width: 560px) { .cookie { left: 10px; right: 10px; bottom: 10px; width: auto; } }

.consent-sheet { max-width: 560px; }
.consent-list { display: grid; gap: 10px; margin: 16px 0 18px; }
.consent-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--row); }
.consent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consent-head b { font-size: 15px; }
.consent-item p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; }
.consent-item .tools { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #c9d5e4; transition: background .25s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(10, 26, 51, .25); transition: transform .3s var(--spring); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { background: #8fb0ff; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent-actions .btn { width: 100%; --h: 46px; padding: 0 10px; font-size: 14.5px; }
.consent-actions .btn:last-child { grid-column: 1 / -1; }

/* ---------- Dokumenty (regulamin, prywatność, cookies) ---------- */
.doc-page { background: radial-gradient(1100px 520px at 50% -220px, #d7e5ff, transparent 70%), var(--ground); }
.doc { max-width: 820px; margin: 0 auto; padding: 120px var(--gutter) 80px; }
.doc-head { margin-bottom: 30px; }
.doc-head .kicker { display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.doc h1 { margin: 0 0 12px; font-size: clamp(34px, 6vw, 52px); line-height: 1.04; letter-spacing: -.045em; }
.doc .meta { color: var(--muted); font-size: 14.5px; }
.doc-draft { margin: 22px 0 0; padding: 14px 16px; border-radius: 14px; border: 1px solid #f0d45a; background: #fffbe6; color: #5c4400; font-size: 14px; line-height: 1.55; }
.doc-card { padding: 34px clamp(20px, 5vw, 46px); border-radius: 26px; background: var(--surface); box-shadow: var(--card-shadow); border: 1px solid var(--line); }
.doc-card h2 { margin: 40px 0 12px; font-size: 23px; line-height: 1.2; letter-spacing: -.03em; scroll-margin-top: 100px; }
.doc-card h2:first-child { margin-top: 0; }
.doc-card h3 { margin: 24px 0 8px; font-size: 17px; letter-spacing: -.01em; }
.doc-card p, .doc-card li { color: var(--ink-2); }
.doc-card ol, .doc-card ul { padding-left: 22px; }
.doc-card li { margin: 5px 0; }
.doc-card a { color: var(--accent); }
.doc-toc { margin: 0 0 26px; padding: 18px 22px; border-radius: 18px; background: var(--row); border: 1px solid var(--line); }
.doc-toc b { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc-toc ol { margin: 0; columns: 2; column-gap: 28px; font-size: 14.5px; }
.doc-toc a { color: var(--ink); text-decoration: none; }
.doc-toc a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) { .doc-toc ol { columns: 1; } }
.tldr { display: grid; gap: 10px; margin: 0 0 28px; padding: 20px 22px; border-radius: 18px; background: linear-gradient(135deg, #eef4ff, #e9fbff); border: 1px solid #d3e2ff; }
.tldr b { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tldr ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tldr li { position: relative; padding-left: 28px; margin: 0; }
.tldr li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L20.1 8.4 18.7 7z'/%3E%3C/svg%3E") center / 14px no-repeat, var(--grad); }
.table-scroll { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; }
.table-scroll table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.table-scroll th, .table-scroll td { padding: 11px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-scroll th { background: var(--row); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll code { font: 500 12.5px var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }
.doc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.doc-links a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: #fff; font-size: 14px; text-decoration: none; }
.doc-links a:hover { border-color: var(--accent); color: var(--accent); }
.form-box { margin: 14px 0; padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--row); font-size: 14.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
