/* ==========================================================================
   OptoGabinet - arkusz stylow.
   Estetyka: profesjonalna, medyczno-optyczna. Jasna kremowa baza + butelkowa
   zielen marki + bursztynowy akcent (z teczowki w logo). Wysoki kontrast.
   Mobile-first. Bez zewnetrznych frameworkow CSS.
   ========================================================================== */

/* ----- Tokeny ----- */
:root {
  /* Kolory marki */
  --green-900: #0f3324;
  --green-800: #143f2c;
  --green-700: #1c5540;
  --green-600: #237350;
  --green-500: #2e8a63;
  --green-050: #eaf2ed;

  --amber-700: #8a5316;  /* akcent - ciemny, do tekstu na jasnym (kontrast AA) */
  --amber-500: #b5741f;  /* akcent - dekoracyjny */

  /* Neutralne */
  --bg: #f7f8f5;         /* kremowa baza */
  --surface: #ffffff;
  --surface-2: #f1f4f0;
  --ink: #14211b;        /* prawie czarny, zielono podbity */
  --ink-2: #3a4a42;
  --muted: #5c6b63;
  --line: #dfe5e0;
  --line-strong: #c7d0c9;

  /* System */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 30, .06), 0 1px 3px rgba(16, 40, 30, .05);
  --shadow-md: 0 4px 14px rgba(16, 40, 30, .08);
  --shadow-lg: 0 18px 40px rgba(16, 40, 30, .12);

  --maxw: 1120px;
  --gutter: 20px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(.82rem, .8rem + .1vw, .9rem);
  --step-0: 1rem;
  --step-1: clamp(1.1rem, 1.04rem + .3vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.2rem + .7vw, 1.7rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.4vw, 2.4rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.25rem);
}

/* ----- Reset / baza ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-800); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: var(--step-4); font-weight: 700; margin: 0 0 .5em; }
h2 { font-size: var(--step-3); font-weight: 700; margin: 0 0 .6em; }
h3 { font-size: var(--step-1); font-weight: 600; margin: 0 0 .4em; }
p { margin: 0 0 1rem; }

/* Dostepnosc: widoczny focus */
:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
  border-radius: 4px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--green-800); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ----- Layout ----- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--tint { background: var(--surface-2); }
.section--green {
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  color: #eef4f0;
}
.section--green h2, .section--green h3 { color: #fff; }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: var(--step--1); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green-600); margin-bottom: .6rem;
}
.section--green .eyebrow { color: #8fd3ae; }
.lead { font-size: var(--step-1); color: var(--ink-2); }
.section--green .lead { color: #cfe3d7; }

/* ----- Przyciski ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; line-height: 1; cursor: pointer;
  padding: .85rem 1.4rem; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  text-decoration: none; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-800); color: #fff; box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--surface); color: var(--green-800); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--green-050); color: var(--green-900); border-color: var(--green-600); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-lg { padding: 1rem 1.7rem; font-size: var(--step-1); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ----- Naglowek / nawigacja ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 245, .85); backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.brand-name { font-size: 1.15rem; letter-spacing: -.02em; }
.nav-links { display: none; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .96rem; }
.nav-links a:hover { color: var(--green-800); }
.nav-cta { display: none; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 10px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--surface); }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: .5rem var(--gutter) 1rem; }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu a { display: block; padding: .9rem .2rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.mobile-menu .btn { margin-top: 1rem; width: 100%; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ----- Hero ----- */
.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.2rem; }
.badge {
  display: inline-flex; align-items: center; gap: .4rem; font-size: var(--step--1); font-weight: 600;
  color: var(--green-800); background: var(--green-050); border: 1px solid #cfe0d6;
  padding: .35rem .7rem; border-radius: 999px;
}
.badge svg { width: 15px; height: 15px; }
.hero h1 { margin-bottom: .5em; }
.hero .lead { margin-bottom: 1.6rem; max-width: 34rem; }
.hero-note { font-size: var(--step--1); color: var(--muted); margin-top: 1rem; }
.hero-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; display: grid; place-items: center; color: #cfe3d7;
  padding: 1.5rem; text-align: center;
}
.hero-visual .placeholder-label { font-size: var(--step--1); opacity: .85; max-width: 20rem; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual--image { padding: 0; }

/* ----- Zrzuty ekranu ----- */
.shots { display: grid; gap: 1.2rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 960px) { .shots { grid-template-columns: repeat(4, 1fr); } }
.shots figure { margin: 0; }
.shots a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); background: var(--surface); }
.shots img { display: block; width: 100%; height: auto; }
.shots figcaption { margin-top: .6rem; text-align: center; font-size: var(--step--1); color: var(--muted); font-weight: 500; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 3.5rem; }
}

/* ----- Karty / siatki ----- */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: .2rem; }
.card p { color: var(--ink-2); margin-bottom: 0; }
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-050); color: var(--green-700); border: 1px solid #d3e2d9; margin-bottom: 1rem;
}
.icon-badge svg { width: 24px; height: 24px; }
/* Sekcja "Funkcje" - ikona wysrodkowana wzgledem szerokosci kafelka */
.features .icon-badge { margin-inline: auto; }

/* Problem -> rozwiazanie */
.compare { display: grid; gap: 1.2rem; }
@media (min-width: 820px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .card h3 { display: flex; align-items: center; gap: .5rem; }
.compare .bad { border-left: 4px solid #c26a4a; }
.compare .good { border-left: 4px solid var(--green-600); }
.list-check { list-style: none; margin: 0; padding: 0; }
.list-check li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; color: var(--ink-2); }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--green-600); border-bottom: 2.5px solid var(--green-600);
  transform: rotate(-45deg);
}
.list-x li::before {
  content: ""; left: .15rem; top: .35em; width: 11px; height: 11px; transform: none;
  border: 0; background:
    linear-gradient(45deg, transparent 45%, #c26a4a 45%, #c26a4a 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, #c26a4a 45%, #c26a4a 55%, transparent 55%);
}

/* Wyroznienie: dostosowanie do badan */
.feature-highlight {
  display: grid; gap: 2rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 3vw, 3rem); box-shadow: var(--shadow-md);
}
@media (min-width: 900px) { .feature-highlight { grid-template-columns: 1.1fr .9fr; } }
.feature-highlight .list-check li { font-size: 1.02rem; }
.mini-panel {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem;
}
.mini-panel .row {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .2rem;
  border-bottom: 1px dashed var(--line-strong); color: var(--ink-2); font-size: .95rem;
}
.mini-panel .row:last-child { border-bottom: 0; }
.mini-panel .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-600); flex: none; }

/* ----- Sekcja wideo ----- */
.video-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
.video-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.video-facade {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  display: grid; place-items: center; overflow: hidden;
}
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-facade .play {
  position: relative; z-index: 2; width: 66px; height: 66px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow-md);
  transition: transform .12s ease, background .12s ease;
}
.video-facade .play svg { width: 26px; height: 26px; color: var(--green-800); margin-left: 3px; }
.video-facade:hover .play { transform: scale(1.06); background: #fff; }
.video-facade::after {
  content: ""; position: absolute; inset: 0; background: rgba(15, 51, 36, .18); z-index: 1;
}
.video-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.video-title { padding: .9rem 1.1rem; font-weight: 600; color: var(--ink); }
.video-empty {
  border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 2.5rem 1.5rem;
  text-align: center; color: var(--muted); background: var(--surface);
}

/* ----- Cennik ----- */
.pricing { display: grid; place-items: center; }
.price-card {
  width: 100%; max-width: 30rem; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.price-head { background: linear-gradient(160deg, var(--green-700), var(--green-900)); color: #fff; padding: 1.6rem 1.8rem; }
.price-head .tag { font-size: var(--step--1); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9fd9ba; }
.price-amount { display: flex; align-items: baseline; gap: .5rem; margin-top: .3rem; }
.price-amount .value { font-size: clamp(2.4rem, 2rem + 2vw, 3rem); font-weight: 700; letter-spacing: -.02em; }
.price-amount .cur { font-size: 1.2rem; font-weight: 600; }
.price-sub { color: #cfe3d7; font-size: .95rem; margin-top: .2rem; }
.price-body { padding: 1.6rem 1.8rem; }
.price-body .list-check li { margin-bottom: .7rem; }
.price-body .btn { width: 100%; margin-top: .5rem; }
.price-fine { font-size: var(--step--1); color: var(--muted); margin-top: 1rem; text-align: center; }

/* ----- Zaufanie / RODO ----- */
.trust-grid { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item .icon-badge { background: rgba(255,255,255,.1); color: #bfe6cf; border-color: rgba(255,255,255,.2); }
.trust-item p { color: #cfe3d7; }

/* ----- FAQ ----- */
.faq { max-width: 48rem; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit;
  font-weight: 600; color: var(--ink); padding: 1.15rem .2rem; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem;
}
.faq-q:hover { color: var(--green-800); }
.faq-q .chev { flex: none; width: 20px; height: 20px; transition: transform .2s ease; color: var(--green-600); }
.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .25s ease; }
.faq-a-inner { padding: 0 .2rem 1.2rem; color: var(--ink-2); }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* ----- CTA band ----- */
.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; }

/* ----- Stopka ----- */
.site-footer { background: var(--green-900); color: #c7d8cd; padding-block: 3rem 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.site-footer a { color: #d7e6dc; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; margin-bottom: .8rem; }
.footer-brand img { width: 34px; height: 34px; border-radius: 8px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin: 0 0 .8rem; letter-spacing: .02em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .5rem; }
.footer-legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12);
  font-size: var(--step--1); color: #9fb6a8; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* ----- Baner cookies ----- */
.cookie-banner {
  position: fixed; inset: auto 1rem 1rem 1rem; z-index: 80; max-width: 40rem; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 1.2rem; display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: .92rem; color: var(--ink-2); margin-bottom: 1rem; }
.cookie-banner .btn-row { justify-content: flex-end; }
.cookie-banner .btn { padding: .6rem 1.1rem; }

/* ----- Strony tresci (prawne / pobieranie) ----- */
.prose { max-width: 52rem; margin-inline: auto; }
.prose h1 { margin-bottom: .3em; }
.prose h2 { font-size: var(--step-2); margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; }
.prose ul, .prose ol { padding-left: 1.3rem; color: var(--ink-2); }
.prose li { margin-bottom: .4rem; }
.prose .todo {
  background: #fff6e6; border: 1px solid #f0d9a8; color: #7a5310; border-radius: 8px;
  padding: .2rem .5rem; font-size: .9rem; font-weight: 600;
}
.doc-meta { color: var(--muted); font-size: var(--step--1); margin-bottom: 2rem; }
.callout {
  background: var(--green-050); border: 1px solid #cfe0d6; border-left: 4px solid var(--green-600);
  border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.download-panel {
  display: grid; gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 1rem + 3vw, 2.5rem); box-shadow: var(--shadow-md); margin-block: 2rem;
}
@media (min-width: 760px) { .download-panel { grid-template-columns: 1fr auto; } }
.file-meta { color: var(--muted); font-size: .95rem; }
.req-grid { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .req-grid { grid-template-columns: 1fr 1fr; } }
