/* ==========================================================================
   TwojeDobreStrony — system stylów
   Ciemna baza + złoty akcent (znak Welesa jako motyw przewodni).
   Fonty self-hostowane (RODO), zero zależności zewnętrznych.
   ========================================================================== */

@import url("../fonts/fonts.css");

:root {
  /* Kolory */
  --bg: #07070a;
  --bg-soft: #0c0c11;
  --bg-elev: #121218;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4f5;
  --muted: #9d9da8;
  --muted-2: #6f6f7a;
  --gold: #e8b349;
  --gold-soft: #f5d27a;
  --gold-deep: #a97c22;
  --grad-gold: linear-gradient(120deg, #f5d27a 0%, #e8b349 45%, #b8862a 100%);

  /* Typografia */
  --f-sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* Rytm */
  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 56px);
  --sec-y: clamp(72px, 11vw, 160px);
  --r-s: 10px;
  --r-m: 18px;
  --r-l: 28px;
  --ease: cubic-bezier(0.16, 0.84, 0.28, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: var(--gold); color: #0a0a0a; }

/* Subtelna, STATYCZNA faktura ziarna (bez migotania — lekcja z montażu filmu) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.05;
  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.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
section { position: relative; padding-block: var(--sec-y); }
.tight { padding-block: clamp(40px, 6vw, 72px); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

h1, h2, h3, h4 { font-weight: 600; line-height: 1.06; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.4vw, 5.2rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 600; }
p { margin: 0 0 1.1em; color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.35rem); color: #d7d7dd; max-width: 62ch; }
.serif { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.01em; }
.gold { color: var(--gold); }
.mono { font-family: var(--f-mono); font-size: 0.82em; letter-spacing: 0.02em; }

/* --------------------------------------------------------------- nagłówek */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: var(--grad-gold); transform-origin: 0 50%; transform: scaleX(0);
  z-index: 60;
}

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding: 18px 0;
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease), padding 0.4s var(--ease);
}
.site-header.is-stuck {
  background: rgba(7, 7, 10, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 13px; }
.brand svg { width: 30px; height: 38px; color: var(--gold); flex: 0 0 auto; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; font-size: 1.02rem; line-height: 1.1; }
.brand-sub { display: block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted-2); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 0.93rem; color: #d5d5dc; position: relative; padding-block: 4px; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: #fff; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: transparent; border-radius: 999px; position: relative; }
.burger span { position: absolute; left: 13px; width: 18px; height: 1.6px; background: #fff;
  transition: transform 0.4s var(--ease), opacity 0.3s; }
.burger span:nth-child(1) { top: 19px; }
.burger span:nth-child(2) { top: 25px; }
.burger.is-open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* ------------------------------------------------------------------ guziki */
.btn {
  --pad: 15px 26px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: var(--pad); border-radius: 999px; border: 1px solid transparent;
  background: transparent; -webkit-appearance: none; appearance: none;
  font-weight: 500; font-size: 0.95rem; letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), box-shadow 0.45s var(--ease),
              background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s;
  will-change: transform;
}
.btn-gold { background: var(--grad-gold); color: #14100a; box-shadow: 0 10px 34px -14px rgba(232, 179, 73, 0.75); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 46px -14px rgba(232, 179, 73, 0.85); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-sm { --pad: 10px 18px; font-size: 0.87rem; }

/* -------------------------------------------------------------------- hero */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 120px; overflow: hidden; }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero .wrap { position: relative; z-index: 2; }
.hero-mark {
  position: absolute; right: -4vw; top: 50%; transform: translateY(-50%);
  width: min(46vw, 560px); color: #fff; opacity: 0.045; z-index: 1; pointer-events: none;
}
.hero h1 { max-width: 22ch; }
.hero h1 em { font-style: normal; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 62px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-meta div { min-width: 132px; }
.hero-meta b { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.hero-meta span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }

.scroll-hint { position: absolute; left: var(--gut); bottom: 34px; z-index: 2;
  display: flex; align-items: center; gap: 10px; font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); }
.scroll-hint i { width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); animation: drop 2.4s var(--ease) infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* --------------------------------------------------------------- marquee */
.marquee { border-block: 1px solid var(--line); padding-block: 22px; overflow: hidden; background: var(--bg-soft); }
.marquee-track { display: flex; gap: 44px; width: max-content; animation: slide 32s linear infinite; }
.marquee span { font-family: var(--f-serif); font-size: clamp(1.4rem, 3.2vw, 2.4rem); color: #2c2c34; white-space: nowrap; }
.marquee span:nth-child(even) { color: var(--gold-deep); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------- sekcja tytuł */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 56px; }
.sec-head p { max-width: 46ch; margin: 0; }

/* ------------------------------------------------------------------ kafle */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 30px); }
@media (max-width: 680px) { .tiles { grid-template-columns: 1fr; } }
@media (min-width: 681px) { .tiles { align-items: start; } .tile:nth-child(even) { margin-top: 38px; } }
.tile {
  position: relative; overflow: hidden; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--bg-elev);
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(20px, 2.2vw, 34px);
  transition: transform 0.7s var(--ease), border-color 0.5s;
}
.tile:hover { transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--acc, var(--gold)) 55%, var(--line-strong)); }
.tile-media { position: absolute; inset: 0; z-index: 0; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center;
  opacity: 0.58; filter: saturate(0.9);
  transition: transform 1.2s var(--ease), opacity 0.6s, filter 0.6s; }
.tile:hover .tile-media img { transform: scale(1.07); opacity: 0.82; filter: saturate(1.14); }
.tile-media::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(7,7,10,0.97) 15%, rgba(7,7,10,0.74) 44%, rgba(7,7,10,0.1) 80%),
    linear-gradient(158deg, color-mix(in srgb, var(--acc, #e8b349) 20%, transparent), transparent 60%); }
.tile-num { position: absolute; top: clamp(16px, 1.6vw, 26px); right: clamp(18px, 1.6vw, 28px);
  z-index: 1; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em;
  color: rgba(244, 241, 234, 0.45); }
.tile-body { position: relative; z-index: 1; }
.tile-tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--acc, var(--gold)); display: block; margin-bottom: 12px; }
.tile h3 { margin-bottom: 8px; font-size: clamp(1.35rem, 2.1vw, 1.9rem); }
.tile p { margin: 0 0 16px; font-size: 0.92rem; color: var(--muted); }
.tile-cta { display: inline-flex; align-items: center; gap: 10px; width: 100%;
  padding-top: 13px; border-top: 1px solid color-mix(in srgb, var(--acc, var(--gold)) 42%, transparent);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg); }
.tile-cta i { font-style: normal; color: var(--acc, var(--gold)); transition: transform 0.5s var(--ease); }
.tile:hover .tile-cta i { transform: translateX(7px); }

/* ------------------------------------------------------------ wartości */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.value { background: var(--bg); padding: clamp(26px, 3vw, 38px); transition: background 0.5s var(--ease); }
.value:hover { background: var(--bg-elev); }
.value i { font-family: var(--f-mono); font-size: 11px; color: var(--gold); letter-spacing: 0.2em; }
.value h3 { margin: 16px 0 10px; font-size: 1.22rem; }
.value p { margin: 0; font-size: 0.94rem; }

/* ------------------------------------------------------------- proces */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step {
  display: grid; grid-template-columns: 92px 1fr; gap: clamp(18px, 3vw, 40px);
  padding-block: 32px; border-top: 1px solid var(--line); align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step b { font-family: var(--f-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.2em; padding-top: 6px; }
.step h3 { margin-bottom: 10px; }
.step p { margin: 0; max-width: 70ch; }

/* ------------------------------------------------------------ cytaty/karty */
.note { border-left: 2px solid var(--gold); padding: 4px 0 4px 22px; color: #d9d9e0; }
.card { border: 1px solid var(--line); border-radius: var(--r-m); padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0)); }
.card h3 { margin-bottom: 12px; }

/* ------------------------------------------------------------- kontakt */
.contact-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.channels { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.channels a, .channels div {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: var(--r-m); transition: border-color 0.4s, transform 0.4s var(--ease), background 0.4s;
}
.channels a:hover { border-color: var(--gold); transform: translateX(4px); background: rgba(232,179,73,0.05); }
.channels svg { width: 20px; height: 20px; color: var(--gold); flex: 0 0 auto; }
.channels b { display: block; font-weight: 500; font-size: 1.02rem; }
.channels span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }

form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; font-size: 0.85rem; color: var(--muted); }
input, textarea, select {
  width: 100%; padding: 15px 17px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-s); color: var(--text); font: inherit; font-size: 0.97rem;
  transition: border-color 0.35s, background 0.35s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); background: #15151c; }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: 0.82rem; color: var(--muted-2); margin: 0; }
.form-status { font-size: 0.9rem; min-height: 1.4em; }
.form-status.ok { color: #7bd88f; }
.form-status.err { color: #ff8a8a; }

/* ----------------------------------------------------------------- stopka */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(46px, 7vw, 80px) 34px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.footer-grid h4 { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; font-weight: 400; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.93rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 0.82rem; color: var(--muted-2); }

/* ------------------------------------------------------------ podstrony */
.page-head { padding-top: clamp(130px, 17vw, 210px); padding-bottom: clamp(30px, 5vw, 60px); }
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.7em; margin-bottom: 0.5em; }
.prose ul, .prose ol { color: var(--muted); padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1.5em 0; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.prose th { color: var(--text); font-weight: 500; font-size: 0.85rem; }
.prose code { font-family: var(--f-mono); font-size: 0.86em; color: var(--gold-soft); }

/* -------------------------------------------------------------- preloader */
#preload {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; transition: opacity 0.7s var(--ease), visibility 0.7s;
}
#preload svg { width: 74px; height: 94px; color: var(--gold); }
#preload path { stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1.5s var(--ease) forwards; }
#preload path:first-child { fill: transparent; animation: fill 1s var(--ease) 0.9s forwards; }
#preload.done { opacity: 0; visibility: hidden; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { fill: currentColor; } }

/* ---------------------------------------------------------- kursor własny */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  border-radius: 999px; will-change: transform; }
.cursor { width: 34px; height: 34px; border: 1px solid rgba(232,179,73,0.75);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s, border-color 0.3s; }
.cursor-dot { width: 5px; height: 5px; background: var(--gold); }
body.cursor-hot .cursor { width: 62px; height: 62px; background: rgba(232,179,73,0.14); }
@media (hover: none), (max-width: 860px) { .cursor, .cursor-dot { display: none; } }

/* ------------------------------------------------------------- animacje we */
[data-rise] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft); }
[data-rise].in { opacity: 1; transform: none; }
[data-rise][data-delay="1"] { transition-delay: 0.1s; }
[data-rise][data-delay="2"] { transition-delay: 0.2s; }
[data-rise][data-delay="3"] { transition-delay: 0.3s; }
[data-rise][data-delay="4"] { transition-delay: 0.42s; }

/* --------------------------------------------------------------- cookies */
.cookies { position: fixed; inset: auto 20px 20px; z-index: 80; max-width: 520px;
  background: rgba(13,13,18,0.94); backdrop-filter: blur(16px); border: 1px solid var(--line-strong);
  border-radius: var(--r-m); padding: 22px 24px; box-shadow: 0 30px 70px -30px #000;
  transform: translateY(140%); transition: transform 0.7s var(--ease); }
.cookies.show { transform: none; }
.cookies p { margin: 0 0 16px; font-size: 0.93rem; color: #d9d9e0; }
.cookies-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------ responsywność */
@media (max-width: 1080px) {
  .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .tile, .tile:nth-child(1), .tile:nth-child(6) { grid-column: span 6; }
}
@media (max-width: 860px) {
  .nav { position: fixed; inset: 0; background: rgba(7,7,10,0.97); backdrop-filter: blur(18px);
    flex-direction: column; justify-content: center; gap: 26px; transform: translateY(-102%);
    transition: transform 0.6s var(--ease); z-index: 49; }
  .nav.open { transform: none; }
  .nav a { font-size: 1.6rem; }
  .burger { display: block; z-index: 51; }
  .header-cta .btn { display: none; }
  .hero { min-height: auto; padding-block: 150px 90px; }
  .hero-mark { width: 78vw; right: -24vw; opacity: 0.03; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .tile, .tile:nth-child(1), .tile:nth-child(6) { grid-column: span 12; min-height: 260px; }
  .hero-meta { gap: 22px; }
}

/* Ograniczenie ruchu respektujemy, ale pokazujemy treść w całości (nic nie zostaje
   przycięte w połowie ruchu), a odwiedzający może włączyć animacje przełącznikiem. */
@media (prefers-reduced-motion: reduce) {
  html:not(.anim-on) *, html:not(.anim-on) *::before, html:not(.anim-on) *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  html:not(.anim-on) [data-rise] { opacity: 1; transform: none; }
  html:not(.anim-on) #fx { display: none; }
  /* pasek przewijany: bez ruchu, wyśrodkowany i w całości — bez uciętego napisu */
  html:not(.anim-on) .marquee { padding-block: 20px; }
  html:not(.anim-on) .marquee-track { animation: none; transform: none; width: 100%;
    flex-wrap: wrap; justify-content: center; gap: 6px 24px; }
  html:not(.anim-on) .marquee-track > :nth-child(n+13) { display: none; }
  html:not(.anim-on) .marquee span { font-size: clamp(0.95rem, 2vw, 1.35rem); line-height: 1.5; }
  html:not(.anim-on) .scroll-hint i { animation: none; background: var(--line-strong); }
}

/* Przełącznik animacji — pojawia się tylko wtedy, gdy system zgłasza ograniczenie ruchu */
.anim-toggle { position: fixed; right: 20px; bottom: 20px; z-index: 95;
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 17px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(7, 7, 10, 0.88); backdrop-filter: blur(10px);
  color: var(--text); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease); }
.anim-toggle span { color: var(--gold); font-size: 13px; line-height: 1; }
.anim-toggle:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
@media (max-width: 560px) { .anim-toggle { right: 12px; bottom: 12px; padding: 10px 14px; font-size: 9.5px; } }
