/* ==========================================================================
   HEIC -> JPG Converter - strona produktu
   Kolory sa te same, co w programie (heic2jpg/theme.py), zeby strona i
   aplikacja wygladaly jak jedna rzecz.

   Wszystko w jednym pliku, bez zewnetrznych bibliotek i czcionek z sieci:
   strona dziala tez bez internetu i nikogo nie sledzi.
   ========================================================================== */

:root {
  /* Paleta programu */
  --bg: #0f131b;
  --surface: #171d29;
  --surface-alt: #1f2735;
  --surface-high: #28313f;
  --border: #2c3646;

  --text: #e8edf5;
  --text-muted: #93a1b5;
  --text-faint: #5d6b80;

  --accent: #4f8cff;
  --accent-hover: #6ba0ff;
  --accent-soft: #1b2b46;

  --success: #35c48a;
  --warning: #f0b34a;
  --danger: #ff5f5f;

  /* Uklad */
  --radius: 12px;
  --radius-small: 8px;
  --wrap: 1120px;
  --pad: 22px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* --------------------------------------------------------------------------
   Naglowek
   -------------------------------------------------------------------------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 19, 27, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 64px; flex-wrap: wrap;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700;
        color: var(--text); font-size: 17px; }
.logo:hover { text-decoration: none; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }

nav { display: flex; gap: 20px; margin-left: auto; align-items: center;
      flex-wrap: wrap; }
nav a { color: var(--text-muted); font-size: 15px; }
nav a:hover { color: var(--text); text-decoration: none; }

/* --------------------------------------------------------------------------
   Przyciski
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: var(--radius-small); border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn-big { padding: 17px 34px; font-size: 17px; }
.btn small { font-weight: 400; opacity: .85; }

/* --------------------------------------------------------------------------
   Sekcja powitalna
   -------------------------------------------------------------------------- */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); }

.hero .wrap {
  display: grid; grid-template-columns: 1fr; gap: 46px; align-items: center;
}
@media (min-width: 940px) {
  .hero .wrap { grid-template-columns: 0.85fr 1.15fr; }
}

.hero h1 {
  font-size: clamp(31px, 5vw, 47px); line-height: 1.12; margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero p.lead {
  font-size: clamp(17px, 2vw, 19px); color: var(--text-muted);
  margin: 0 0 28px; max-width: 52ch;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-note { margin-top: 20px; color: var(--text-faint); font-size: 14px; }

.hero-shot img {
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

/* --------------------------------------------------------------------------
   Sekcje
   -------------------------------------------------------------------------- */
section { padding: 72px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h2 {
  font-size: clamp(24px, 3vw, 31px); margin: 0 0 12px; letter-spacing: -0.01em;
}
.section-lead {
  color: var(--text-muted); max-width: 68ch; margin: 0 0 40px; font-size: 17px;
}

/* --------------------------------------------------------------------------
   Mozliwosci
   -------------------------------------------------------------------------- */
.features {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}

.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 15px; }
.feature .mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 15px; color: var(--accent); font-size: 18px;
}

/* --------------------------------------------------------------------------
   Kroki
   -------------------------------------------------------------------------- */
.steps { display: grid; gap: 18px;
         grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.step { background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius); padding: 24px; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 999px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* --------------------------------------------------------------------------
   Galeria zrzutow
   -------------------------------------------------------------------------- */
.gallery { display: grid; gap: 22px;
           grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.shot { background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius); overflow: hidden; }
.shot img { border-bottom: 1px solid var(--border); }
.shot figcaption { padding: 15px 18px; color: var(--text-muted); font-size: 14px; }
.shot figcaption strong { display: block; color: var(--text); font-size: 15px;
                          margin-bottom: 3px; }

/* --------------------------------------------------------------------------
   Wymagania i tabela informacyjna
   -------------------------------------------------------------------------- */
.info { display: grid; gap: 18px;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.info-card h3 { margin: 0 0 12px; font-size: 16px; }
.info-card ul { margin: 0; padding-left: 20px; color: var(--text-muted); font-size: 15px; }
.info-card li { margin-bottom: 6px; }
.info-card li:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Pobieranie
   -------------------------------------------------------------------------- */
.download {
  background: linear-gradient(160deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px 32px; text-align: center;
}
.download h2 { margin-bottom: 10px; }
/* Tylko akapity bedace BEZPOSREDNIA trescia tej sekcji. Bez ">" regula
   obejmowala takze akapity wewnatrz ostrzezenia ponizej i zwężala je
   do 62ch, przez co byly wysrodkowane zamiast rownac sie do lewej. */
.download > p { color: var(--text-muted); max-width: 62ch; margin: 0 auto 26px; }
.download .meta { margin-top: 18px; color: var(--text-faint); font-size: 14px; }

/* --------------------------------------------------------------------------
   Uwaga o ostrzezeniu Windows
   -------------------------------------------------------------------------- */
.notice {
  border-left: 3px solid var(--warning); background: var(--surface);
  border-radius: var(--radius-small); padding: 18px 22px; margin: 26px 0 0;
  text-align: left;
}
.notice h3 { margin: 0 0 8px; font-size: 16px; color: var(--warning); }
.notice p { margin: 0 0 8px; color: var(--text-muted); font-size: 15px; }
.notice p:last-child { margin-bottom: 0; }
.notice ol { margin: 8px 0 0; padding-left: 22px; color: var(--text-muted);
             font-size: 15px; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-small); margin-bottom: 12px; padding: 0 22px;
}
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px;
                      line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; color: var(--text-muted); font-size: 15px; }

/* --------------------------------------------------------------------------
   Stopka
   -------------------------------------------------------------------------- */
footer { padding: 52px 0 40px; color: var(--text-faint); font-size: 14px; }
footer .wrap { display: grid; gap: 26px;
               grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
footer h4 { margin: 0 0 10px; color: var(--text); font-size: 14px;
            text-transform: uppercase; letter-spacing: .05em; }
footer a { color: var(--text-muted); }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 7px; }
footer .credit { grid-column: 1 / -1; border-top: 1px solid var(--border);
                 padding-top: 22px; color: var(--text-faint); }

/* --------------------------------------------------------------------------
   Pomocnicze
   -------------------------------------------------------------------------- */
.center { text-align: center; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); font-size: 14px; }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Powiększanie zrzutów (nakładka, bez bibliotek)
   -------------------------------------------------------------------------- */
.shot-link { display: block; cursor: zoom-in; }
.shot-link img { transition: opacity .15s; }
.shot-link:hover img { opacity: .85; }
.shot-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  background: rgba(8, 11, 17, .95);
}
/* Atrybut hidden musi wygrać z display:flex powyżej. */
.lightbox[hidden] { display: none; }

.lightbox-figure {
  margin: 0; display: flex; flex-direction: column; gap: 14px;
  align-items: center;
}
.lightbox-figure img {
  max-width: 96vw; max-height: 82vh; width: auto; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox-figure figcaption {
  color: var(--text-muted); font-size: 15px; text-align: center;
  min-height: 1.2em;
}

.lightbox-btn {
  position: absolute; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text);
  border: 1px solid var(--border);
  transition: background .15s, color .15s, border-color .15s;
}
.lightbox-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.lightbox-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lightbox-btn[hidden] { display: none; }

.lightbox-close { top: 20px; right: 22px; }
.lightbox-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 22px; top: 50%; transform: translateY(-50%); }

@media (max-width: 620px) {
  .lightbox { padding: 12px; }
  .lightbox-figure img { max-height: 72vh; }
  .lightbox-btn { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
