/* BBMG Shared CSS — design tokens + base styles */
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/CormorantGaramond-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/CormorantGaramond-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('fonts/Outfit-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --deep-teal:   #0E534A;
  --amber:       #FFB037;
  --amber-hover: #F5A620;
  --cream:       #FAF5EF;
  --cream-warm:  #F5F0E8;
  --dark-teal:   #07302A;
  --ink:         #1A1A18;
  --ink-60:      rgba(26,26,24,0.60);
  --ink-40:      rgba(26,26,24,0.40);
  --teal-soft:   #D8E5E2;
  --cream-60:    rgba(245,240,232,0.60);
  --cream-40:    rgba(245,240,232,0.40);

  --font-logo:    'EB Garamond', serif;
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-pill: 999px;

  --shadow-card:     0 1px 2px rgba(7,48,42,0.04), 0 8px 24px rgba(7,48,42,0.06);
  --shadow-elevated: 0 2px 4px rgba(7,48,42,0.06), 0 16px 48px rgba(7,48,42,0.08);
  --shadow-focus:    0 0 0 3px rgba(255,176,55,0.30);

  --nav-height: 72px;
  --section-py: 128px;
  --section-py-sm: 64px;
  --container-max: 1200px;
  --container-px: 48px;
  --reading: 1040px;   /* szerokość prozy/tekstu (czytelność); kontener = --container-max */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
/* mobile: scroll natychmiastowy — smooth bywa anulowany przez reflow (chowający się pasek adresu vs 100dvh) */
@media (max-width: 860px) { html { scroll-behavior: auto; } }
body {
  background: var(--cream);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip to content */
.skip-link {
  position: absolute; top: -40px; left: 16px; z-index: 9999;
  background: var(--amber); color: var(--ink); padding: 8px 16px;
  border-radius: var(--radius-md); font: 600 13px var(--font-body);
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Container */
.container {
  width: 100%; max-width: var(--container-max);
  margin: 0 auto; padding: 0 var(--container-px);
}

/* Section */
.section { padding: var(--section-py) 0; }
.section--dark { background: var(--dark-teal); }
.section--teal { background: var(--deep-teal); }
.section--cream { background: var(--cream); }

/* Section heading */
.section-caption {
  font-family: var(--font-body); font-weight: 700; font-size: 11px;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--amber);
  margin-bottom: 14px; display: block;
}
.section-caption--ink { color: var(--ink-40); }
.section-caption--teal { color: var(--deep-teal); }

.section-heading {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 4.3vw, 50px); line-height: 1.10;
  color: var(--ink); margin: 0;
}
.section-heading--cream { color: var(--cream-warm); }
.section-heading em { font-style: italic; }

/* Hero eyebrow + rule (kanon hero — wszystkie strony) */
.hero-eyebrow{ font:700 11px/1 var(--font-body); letter-spacing:0.22em; text-transform:uppercase;
  color:rgba(245,240,232,0.45); margin:0; }
.hero-rule{ width:56px; height:2px; background:var(--amber); margin:18px 0 0; }

/* Hero — ikona kolumny (dolny rząd hero, wszystkie podstrony) */
.hero-ic{ display:flex; align-items:center; justify-content:center; height:48px; margin-bottom:14px; color:var(--amber); }
.hero-ic svg{ width:40px; height:40px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em; padding: 14px 28px;
  border-radius: var(--radius-md); border: none; cursor: pointer;
  transition: all 0.2s ease-out; text-decoration: none; white-space: nowrap;
  line-height: 1;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn-accent {
  background: var(--amber); color: var(--ink);
}
.btn-accent:hover { background: var(--amber-hover); transform: translateY(-1px); }
.btn-primary {
  background: var(--deep-teal); color: var(--cream-warm);
}
.btn-primary:hover { background: var(--dark-teal); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--deep-teal);
  border: 1.5px solid var(--deep-teal);
}
.btn-ghost:hover { background: var(--deep-teal); color: var(--cream-warm); }
.btn-ghost-light {
  background: transparent; color: var(--cream-warm);
  border: 1.5px solid rgba(245,240,232,0.35);
}
.btn-ghost-light:hover { border-color: var(--cream-warm); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* Cards */
.card {
  background: var(--cream); border: 1.5px solid rgba(26,26,24,0.10);
  border-radius: var(--radius-lg); padding: 36px 32px;
  transition: border-color 0.25s ease-out, box-shadow 0.25s ease-out, transform 0.25s ease-out;
}
.card:hover { border-color: var(--deep-teal); box-shadow: var(--shadow-card); }
.card--dark {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(245,240,232,0.10);
  color: var(--cream-warm);
}
.card--dark:hover { border-color: var(--amber); }
.card--teal { background: var(--deep-teal); border: none; color: var(--cream-warm); }

/* Tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  font: 700 10px/1 var(--font-body); letter-spacing: 0.10em; text-transform: uppercase;
  background: rgba(14,83,74,0.08); color: var(--deep-teal);
}
.tag--amber {
  background: rgba(255,176,55,0.15); color: #A0620E;
}
.tag--light {
  background: rgba(245,240,232,0.12); color: rgba(245,240,232,0.65);
}

/* Amber divider */
.amber-line { width: 40px; height: 2px; background: var(--amber); display: block; }

/* Navbar */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--container-px);
  transition: background 300ms ease, border-color 300ms ease, backdrop-filter 300ms ease;
}
.nav--transparent {
  background: transparent; border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(7,48,42,0.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245,240,232,0.08);
}
.nav--cream-scrolled {
  background: rgba(250,245,239,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--teal-soft);
}
.nav-logo {
  font-family: var(--font-logo); font-weight: 800; font-size: 26px;
  letter-spacing: -0.02em; color: var(--cream-warm); line-height: 1;
  text-decoration: none; cursor: pointer;
}
.nav-logo--ink { color: var(--ink); }
.nav-logo .dot { color: var(--amber); }

/* Nav links — kanoniczne, chameleon-aware (sterowane przez interactions.js) */
.nav-link {
  font: 500 15px/1 var(--font-body); letter-spacing: 0.01em;
  color: rgba(245,240,232,0.78); background: none; border: none; cursor: pointer;
  padding: 4px 0; text-decoration: none; transition: color 150ms ease; position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--cream-warm); }
.nav-link.active { font-weight: 600; }
.nav-link.active::after { content: ''; position: absolute; bottom: -3px; left: 0; right: 0; height: 1px; background: var(--amber); }
/* Chameleon — sekcje jasne: ciemny tekst/logo */
.nav--light { border-bottom: 1px solid rgba(26,26,24,0.07); }
.nav--light .nav-logo { color: var(--deep-teal); }
.nav--light .nav-link { color: rgba(26,26,24,0.62); }
.nav--light .nav-link:hover, .nav--light .nav-link.active { color: var(--deep-teal); }
.nav--light .nav-mobile-btn span { background: var(--ink); }
.nav--solid { box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 6px 22px rgba(0,0,0,0.07); }

/* Dot-nav (boczna nawigacja sekcji) */
.dotnav { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 80; display: flex; flex-direction: column; gap: 15px; }
/* Dot-nav kameleon: domyślnie (ciemne sekcje) kremowy; na jasnych sekcjach zielono-teal (jak duotone na zdjęciach). active = amber. */
.dotnav a { position: relative; width: 11px; height: 11px; border-radius: 50%; background: rgba(245,240,232,0.40); transition: background .25s ease, transform .25s ease; }
.dotnav a:hover { background: rgba(245,240,232,0.78); }
.dotnav a.active { background: var(--amber); transform: scale(1.35); }
.dotnav--on-light a { background: rgba(14,83,74,0.32); }
.dotnav--on-light a:hover { background: rgba(14,83,74,0.62); }
.dotnav--on-light a.active { background: var(--amber); }
.dotnav a .dot-label { position: absolute; right: 24px; top: 50%; transform: translateY(-50%) translateX(6px); white-space: nowrap; background: var(--dark-teal); color: var(--cream-warm); font: 600 11px/1 var(--font-body); letter-spacing: 0.02em; padding: 7px 11px; border-radius: 7px; box-shadow: var(--shadow-elevated); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.dotnav a:hover .dot-label { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 900px) { .dotnav { display: none; } }

/* Section snap — delikatny (mobile = CSS proximity, desktop = JS-assist) */
[data-dot] { scroll-snap-align: start; }
@media (max-width: 860px) { html { scroll-snap-type: y proximity; } }

/* Fade in animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both; }
.fade-up-1 { animation-delay: 0.10s; }
.fade-up-2 { animation-delay: 0.22s; }
.fade-up-3 { animation-delay: 0.34s; }
.fade-up-4 { animation-delay: 0.46s; }

/* Scroll-triggered reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Amber pulse on logo dot */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.logo-dot-pulse { animation: pulse 4s ease-in-out infinite; }

/* Footer */
.footer { background: var(--dark-teal); padding: 64px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 44px;
  margin-bottom: 48px; align-items: start;
}
.footer-logo {
  font-family: var(--font-logo); font-weight: 800; font-size: 38px; line-height: 1;
  letter-spacing: -0.025em; color: var(--cream-warm); text-decoration: none; display: inline-block;
}
.footer-logo .dot { color: var(--amber); }
.footer-pos { font: 400 13px/1.7 var(--font-body); color: rgba(245,240,232,0.45); margin-top: 6px; white-space: nowrap; }
.footer-rule { width: 48px; height: 3px; background: var(--amber); margin-top: 22px; border-radius: 2px; }
.footer-tagline {
  font: 500 13px/1.7 var(--font-body);
  color: rgba(245,240,232,0.60); margin-top: 12px;
}
.footer-heading {
  font: 700 10px/1 var(--font-body); letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245,240,232,0.40); margin-bottom: 18px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font: 400 13px var(--font-body); color: rgba(245,240,232,0.65); text-decoration: none;
  transition: color 150ms ease;
}
.footer-links a:hover { color: var(--cream-warm); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,176,55,0.28);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-id { font: 700 10px/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(245,240,232,0.20); }
.footer-legal {
  font: 400 11px var(--font-body); color: rgba(245,240,232,0.35); line-height: 1.70;
}
.footer-legal a { color: rgba(245,240,232,0.50); text-decoration: none; }
.footer-legal a:hover { color: var(--cream-warm); }

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

/* Responsive */
@media (max-width: 900px) {
  :root {
    --section-py: 80px;
    --container-px: 24px;
    --nav-height: 60px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav { padding: 0 24px; }
}
@media (max-width: 640px) {
  :root { --section-py: 64px; --container-px: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { padding: 0 20px; }
}

/* ============================================================
   POLISH LAYER — współdzielone mikro-interakcje i tło
   (propaguje się na wszystkie strony używające shared.css)
   ============================================================ */

/* Subtelne ziarno tła (grain) — atmosfera bez krzykliwości */
body {
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
}

/* Karty nowego systemu — płaskie, bez hovera (de-karting iter. 2) */

/* Scroll-reveal — bloki pojawiają się przy wejściu w widok */
body.reveal-on .block { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
body.reveal-on .block.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  body.reveal-on .block { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Przycisk „do góry" */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--amber); color: var(--dark-teal);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-elevated);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s ease, color .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--deep-teal); color: var(--amber); }
.to-top:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (max-width: 640px) { .to-top { right: 16px; bottom: 16px; } }

/* Cookies / consent — baner generowany przez consent.js (site-wide) */
.cookies-banner {
  position: fixed; bottom: 24px; left: 24px; z-index: 200;
  background: var(--dark-teal); border: 1px solid rgba(245,240,232,0.12);
  border-radius: 14px; padding: 20px 24px; max-width: 360px;
  box-shadow: var(--shadow-elevated);
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: opacity .4s cubic-bezier(.22,1,.36,1), transform .4s cubic-bezier(.22,1,.36,1);
}
.cookies-banner.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookies-p { font: 400 12px/1.65 var(--font-body); color: rgba(245,240,232,0.74); margin-bottom: 14px; }
.cookies-p a { color: var(--amber); text-decoration: none; }
.cookies-p a:hover { text-decoration: underline; }
.cookies-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 860px) {
  /* miejsce na strzałkę „do góry" (bottom-right) */
  .cookies-banner { left: 16px; right: 76px; bottom: 16px; max-width: none; }
}

/* Placeholder zgody dla osadzonych treści (Google Maps) — iframe ładuje się po zgodzie */
.consent-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; width: 100%; height: 100%; min-height: 340px;
  padding: 28px; background: #EAF2EF; color: var(--ink-60);
}
.consent-ph p { font: 400 13px/1.6 var(--font-body); color: var(--ink-60); max-width: 320px; margin: 0; }
.consent-ph strong { color: var(--ink); font-weight: 600; }
