/* =============================================================
   POLIVOX LANDING — styles.css
   Hand-written CSS. No framework. No build step.
   Design tokens are direct hex equivalents of app/src/index.css
   HSL variables. Do not introduce new colors.
   ============================================================= */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  /* Colors — hex equivalents of the app's HSL custom properties */
  --color-bg:          #F9F8F5;  /* hsl(40 20% 97%)   page background    */
  --color-bg-muted:    #F0ECE5;  /* hsl(40 12% 95%)   section bands      */
  --color-text:        #0D1829;  /* hsl(221 52% 11%)  primary text       */
  --color-text-muted:  #6B7280;  /* hsl(220 9% 46%)   secondary text     */
  --color-accent:      #C8102E;  /* Polish red — primary brand           */
  --color-accent-dark: #A30D24;  /* hover state                          */
  --color-border:      #DDDAD3;  /* hsl(40 14% 87%)   rule lines         */
  --color-btn-text:    #FAFAFA;  /* label on red button — 5.35:1 ratio   */

  /* Typography — exact app font stack */
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', 'Consolas', 'Courier New', monospace;

  /* Layout */
  --header-h:      64px;
  --section-py:    96px;
  --section-py-sm: 64px;
  --w-narrow:      780px;
  --w-editorial:   680px;
  --w-wide:        1100px;
  --gutter:        24px;
  --radius:        4px;
}

/* Offset anchor scroll below sticky header */
html {
  scroll-padding-top: calc(var(--header-h) + 24px);
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

/* ── Minimal reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body, h1, h2, h3, p, ul, li, figure, figcaption { margin: 0; padding: 0; }

ul  { list-style: none; }
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size:   1rem;
  line-height: 1.7;
  color:            var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Focus ──────────────────────────────────────────────────── */
:focus-visible {
  outline:        3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius:  2px;
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position:      absolute;
  left:          var(--gutter);
  top:           -200%;
  padding:       8px 16px;
  min-height:    44px;
  display:       inline-flex;
  align-items:   center;
  background:    var(--color-accent);
  color:         var(--color-btn-text);
  font-family:   var(--font-sans);
  font-size:     0.875rem;
  font-weight:   500;
  border-radius: var(--radius);
  z-index:       1000;
  transition:    top 0.1s;
}

.skip-link:focus { top: 16px; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position:         sticky;
  top:              0;
  z-index:          100;
  height:           var(--header-h);
  background-color: var(--color-bg);
  border-bottom:    1px solid transparent;
  transition:       border-color 200ms ease, box-shadow 200ms ease;
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow:          0 1px 4px rgba(13, 24, 41, 0.06);
}

.header-inner {
  max-width:       var(--w-wide);
  margin-inline:   auto;
  padding-inline:  var(--gutter);
  height:          100%;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             16px;
}

.wordmark {
  font-family:    var(--font-serif);
  font-size:      1.375rem;
  font-weight:    400;
  letter-spacing: -0.01em;
  color:          var(--color-text);
  flex-shrink:    0;
  transition:     color 150ms;
}

.wordmark:hover { color: var(--color-accent); }

.header-nav {
  display:     flex;
  align-items: center;
  gap:         28px;
}

.header-nav a {
  font-size:   0.9375rem;
  font-weight: 500;
  color:       var(--color-text);
  min-height:  44px;
  display:     inline-flex;
  align-items: center;
  white-space: nowrap;
  transition:  color 150ms;
}

.header-nav a:hover      { color: var(--color-accent); }
.nav-login               { color: var(--color-accent) !important; }
.nav-login:hover         { color: var(--color-accent-dark) !important; }

/* ── Container helpers ──────────────────────────────────────── */
.container-narrow {
  max-width:      var(--w-narrow);
  margin-inline:  auto;
  padding-inline: var(--gutter);
}

.container-editorial {
  max-width:      var(--w-editorial);
  margin-inline:  auto;
  padding-inline: var(--gutter);
}

.container-wide {
  max-width:      var(--w-wide);
  margin-inline:  auto;
  padding-inline: var(--gutter);
}

/* ── Section chrome ─────────────────────────────────────────── */
.section-hero,
.section-features,
.section-why,
.section-screenshot,
.section-audience,
.section-methodology {
  padding-block: var(--section-py);
}

.section-features,
.section-why,
.section-audience,
.section-methodology {
  border-top: 1px solid var(--color-border);
}

.section-heading {
  font-family:    var(--font-serif);
  font-size:      clamp(1.5rem, 3vw, 2rem);
  font-weight:    400;
  color:          var(--color-text);
  line-height:    1.2;
  letter-spacing: -0.01em;
  margin-bottom:  48px;
}

/* ── Hero ───────────────────────────────────────────────────── */
.section-hero {
  border-bottom: 1px solid var(--color-border);
}

.section-hero h1 {
  font-family:    var(--font-serif);
  font-size:      clamp(1.875rem, 5vw, 3.25rem);
  font-weight:    400;
  color:          var(--color-text);
  line-height:    1.15;
  letter-spacing: -0.02em;
  margin-bottom:  24px;
}

.hero-sub {
  font-size:     1.0625rem;
  color:         var(--color-text-muted);
  line-height:   1.75;
  max-width:     60ch;
  margin-bottom: 40px;
}

.hero-ctas {
  display:     flex;
  flex-wrap:   wrap;
  align-items: center;
  gap:         24px;
}

/* ── Primary CTA button ─────────────────────────────────────── */
.btn-primary {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  padding:          12px 24px;
  min-height:       44px;
  background-color: var(--color-accent);
  color:            var(--color-btn-text);
  font-family:      var(--font-sans);
  font-size:        0.9375rem;
  font-weight:      500;
  letter-spacing:   0.02em;
  border-radius:    var(--radius);
  white-space:      nowrap;
  cursor:           pointer;
  transition:       background-color 200ms ease;
}

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

/* ── Secondary link ─────────────────────────────────────────── */
.link-secondary {
  display:                  inline-flex;
  align-items:              center;
  min-height:               44px;
  font-size:                0.9375rem;
  font-weight:              500;
  color:                    var(--color-text);
  text-decoration:          underline;
  text-underline-offset:    3px;
  text-decoration-color:    var(--color-border);
  transition:               color 150ms, text-decoration-color 150ms;
}

.link-secondary:hover {
  color:                 var(--color-accent);
  text-decoration-color: var(--color-accent);
}

/* ── Features (Co robimy) ───────────────────────────────────── */
.features-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   48px;
  align-items:           start;
}

.feature-col {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            12px;
}

.feature-icon {
  color:       var(--color-accent);
  flex-shrink: 0;
  margin-bottom: 4px;
}

.feature-col h3 {
  font-family:  var(--font-serif);
  font-size:    1.1875rem;
  font-weight:  400;
  color:        var(--color-text);
  line-height:  1.3;
}

.feature-col p {
  font-size:  0.9375rem;
  color:      var(--color-text-muted);
  line-height: 1.75;
}

/* ── Editorial prose (Dlaczego) ─────────────────────────────── */
.editorial-block {
  display:        flex;
  flex-direction: column;
  gap:            20px;
}

.editorial-block p {
  font-size:   1.0625rem;
  line-height: 1.8;
  color:       var(--color-text);
  max-width:   65ch;
}

/* ── Screenshot ─────────────────────────────────────────────── */
.section-screenshot {
  background-color: var(--color-bg-muted);
  border-top:       1px solid var(--color-border);
  border-bottom:    1px solid var(--color-border);
}

.screenshot-figure {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            16px;
}

/* Placeholder: reserves exact 16:9 space so layout is stable
   when the real <img> is swapped in. */
.screenshot-placeholder {
  width:            100%;
  max-width:        960px;
  aspect-ratio:     960 / 540;
  background-color: #E5E2DB;
  border:           1px solid var(--color-border);
  border-radius:    var(--radius);
}

/* Real image — same constraints as placeholder */
.screenshot-figure img {
  display:       block;
  width:         100%;
  max-width:     960px;
  height:        auto;
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
}

.screenshot-figure figcaption {
  font-size:   0.875rem;
  /* --color-text-muted (#6B7280) gives 4.1:1 on muted bg — fails AA.
     Using --color-text here: figcaption is body-level context, not decorative. */
  color:       var(--color-text);
  line-height: 1.6;
  max-width:   72ch;
}

/* ── Bill detail card mockup ────────────────────────────────── */

.bill-mockup {
  width:            100%;
  max-width:        960px;
  background-color: #ffffff;
  border:           1px solid var(--color-border);
  border-radius:    4px;
  box-shadow:       0 1px 4px  rgba(13,24,41,0.04),
                    0 4px 12px rgba(13,24,41,0.04);
  overflow:         hidden;
}

.bm-header {
  padding:       16px 24px 18px;
  border-bottom: 1px solid var(--color-border);
}

.bm-meta {
  font-size:      0.6875rem;
  color:          #555B68;          /* 6.0:1 on white — WCAG AA */
  margin-bottom:  6px;
  letter-spacing: 0.01em;
}

.bm-title-row {
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
  gap:             16px;
}

.bm-title {
  font-family: var(--font-serif);
  font-size:   1rem;
  font-weight: 400;
  color:       var(--color-text);
  line-height: 1.4;
  flex:        1;
}

.bm-badge {
  flex-shrink:      0;
  display:          inline-flex;
  align-items:      center;
  padding:          3px 10px;
  font-size:        0.6875rem;
  font-weight:      600;
  letter-spacing:   0.02em;
  color:            var(--color-accent);
  background-color: rgba(200,16,46,0.08);
  border-radius:    999px;
  white-space:      nowrap;
  margin-top:       2px;
}

/* Body: summary (flexible) + timeline (fixed 188px) */
.bm-body {
  display:               grid;
  grid-template-columns: 1fr 188px;
  min-height:            420px;
  align-items:           start;
}

.bm-summary-col {
  padding:      20px 24px;
  border-right: 1px solid var(--color-border);
}

.bm-timeline-col {
  padding: 20px 18px;
}

/* Section label — used in both columns */
.bm-section-label {
  display:        block;
  font-size:      0.6875rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color:          #555B68;
  margin-bottom:  14px;
}

.bm-ai-note {
  display:        block;
  font-size:      0.625rem;
  font-weight:    400;
  text-transform: none;
  letter-spacing: 0;
  color:          #555B68;
  margin-top:     2px;
}

/* Q&A blocks */
.bm-qa            { margin-bottom: 16px; }
.bm-qa:last-child { margin-bottom: 0; }

.bm-q-head {
  font-size:     0.75rem;
  font-weight:   600;
  color:         var(--color-text);
  line-height:   1.3;
  margin-bottom: 4px;
}

.bm-q-body {
  font-size:   0.8125rem;
  color:       #555B68;             /* 6.0:1 on white */
  line-height: 1.65;
}

/* Timeline */
.bm-tl {
  list-style: none;
  padding:    0;
  margin:     0;
}

.bm-tl-item {
  display:               grid;
  grid-template-columns: 10px 1fr;
  column-gap:            8px;
  position:              relative;
  padding-bottom:        18px;
}

.bm-tl-item:last-child { padding-bottom: 0; }

/* Vertical connector line between dots */
.bm-tl-item:not(:last-child)::after {
  content:          '';
  position:         absolute;
  left:             4px;            /* centre of 10px dot */
  top:              10px;           /* just below dot */
  bottom:           0;
  width:            1px;
  background-color: var(--color-border);
}

.bm-tl-dot {
  width:            10px;
  height:           10px;
  border-radius:    50%;
  border:           1.5px solid var(--color-border);
  background-color: #ffffff;
  position:         relative;
  z-index:          1;
  margin-top:       1px;
}

.bm-tl-done .bm-tl-dot {
  background-color: #555B68;
  border-color:     #555B68;
}

.bm-tl-active .bm-tl-dot {
  background-color: var(--color-accent);
  border-color:     var(--color-accent);
  box-shadow:       0 0 0 3px rgba(200,16,46,0.12);
}

.bm-tl-text {
  display:        flex;
  flex-direction: column;
  gap:            1px;
}

.bm-tl-stage {
  font-size:   0.75rem;
  font-weight: 500;
  color:       var(--color-text);
  line-height: 1.3;
}

.bm-tl-active .bm-tl-stage {
  color:       var(--color-accent);
  font-weight: 600;
}

.bm-tl-date {
  font-size:   0.625rem;
  color:       #555B68;
  line-height: 1.2;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .bm-body {
    grid-template-columns: 1fr;
    min-height:            unset;
  }
  .bm-summary-col {
    border-right:  none;
    border-bottom: 1px solid var(--color-border);
  }
  .bm-timeline-col { padding: 16px 24px; }
}

/* ── Audience (Dla kogo) ────────────────────────────────────── */
.audience-grid {
  display:               grid;
  grid-template-columns: 1fr auto 1fr;
  gap:                   0 48px;
  max-width:             860px;
  align-items:           start;
}

.audience-divider {
  width:            1px;
  background-color: var(--color-border);
  align-self:       stretch;
}

.audience-col h3 {
  font-family:   var(--font-serif);
  font-size:     1.1875rem;
  font-weight:   400;
  color:         var(--color-text);
  line-height:   1.3;
  margin-bottom: 20px;
}

.audience-col ul {
  display:        flex;
  flex-direction: column;
  gap:            10px;
  margin-bottom:  24px;
}

.audience-col li {
  position:    relative;
  padding-left: 18px;
  font-size:   0.9375rem;
  color:       var(--color-text);
  line-height: 1.55;
}

.audience-col li::before {
  content:     '—';
  position:    absolute;
  left:        0;
  color:       var(--color-accent);
  font-size:   0.875rem;
  line-height: 1.55;
}

.audience-closing {
  font-size:   0.9375rem;
  font-weight: 500;
  color:       var(--color-text);
}

.audience-closing a {
  color:                 var(--color-accent);
  text-decoration:       underline;
  text-underline-offset: 2px;
  transition:            color 150ms;
}

.audience-closing a:hover { color: var(--color-accent-dark); }

.tag-soon {
  display:         inline-block;
  margin-left:     4px;
  padding:         1px 6px;
  font-size:       0.6875rem;
  font-family:     var(--font-sans);
  font-weight:     500;
  letter-spacing:  0.04em;
  text-transform:  uppercase;
  /* #555B68 = 5.17:1 on --color-bg-muted (#F0ECE5). Darker than --color-text-muted
     but still clearly secondary — does not compete with list item text. */
  color:           #555B68;
  background-color: var(--color-bg-muted);
  border:          1px solid var(--color-border);
  border-radius:   3px;
  vertical-align:  middle;
  white-space:     nowrap;
}

/* ── Methodology ────────────────────────────────────────────── */
.methodology-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   48px;
  align-items:           start;
}

.method-col h3 {
  font-family:   var(--font-sans);
  font-size:     0.9375rem;
  font-weight:   600;
  color:         var(--color-text);
  line-height:   1.45;
  margin-bottom: 12px;
}

.method-col p {
  font-size:   0.9375rem;
  color:       var(--color-text-muted);
  line-height: 1.75;
}

.method-col a {
  color:                 var(--color-accent);
  text-decoration:       underline;
  text-underline-offset: 2px;
  transition:            color 150ms;
}

.method-col a:hover { color: var(--color-accent-dark); }

/* Inline code (API hostname in methodology) */
code {
  font-family:      var(--font-mono);
  font-size:        0.8125rem;
  background-color: var(--color-bg-muted);
  border:           1px solid var(--color-border);
  padding:          1px 5px;
  border-radius:    3px;
  color:            var(--color-text);
  white-space:      nowrap;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background-color: var(--color-bg-muted);
  border-top:       1px solid var(--color-border);
  padding-block:    32px;
}

.footer-inner {
  max-width:      var(--w-wide);
  margin-inline:  auto;
  padding-inline: var(--gutter);
  display:        flex;
  flex-direction: column;
  gap:            8px;
}

.footer-inner > p:first-child {
  font-size: 0.875rem;
  color:     var(--color-text);
}

.footer-links {
  font-size:   0.875rem;
  /* --color-text-muted (#6B7280) is 4.1:1 on footer's --color-bg-muted — fails AA.
     Using --color-text for the separator spans; links override below. */
  color:       var(--color-text);
  display:     flex;
  flex-wrap:   wrap;
  align-items: center;
  gap:         4px 8px;
}

.footer-links a {
  /* Inherits --color-text from parent; underline distinguishes links from separators. */
  color:                 var(--color-text);
  text-decoration:       underline;
  text-underline-offset: 2px;
  min-height:            44px;
  display:               inline-flex;
  align-items:           center;
  transition:            color 150ms, opacity 150ms;
}

.footer-links a:hover { opacity: 0.65; }

/* ── Responsive — single breakpoint at 768px ────────────────── */
@media (max-width: 768px) {

  .section-hero,
  .section-features,
  .section-why,
  .section-screenshot,
  .section-audience,
  .section-methodology {
    padding-block: var(--section-py-sm);
  }

  .section-heading {
    margin-bottom: 32px;
  }

  /* 3-col → 1-col */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* 2-col + divider → 1-col + horizontal rule */
  .audience-grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 100%;
  }

  .audience-divider {
    width:      auto;
    height:     1px;
    margin-block: 40px;
    align-self: auto;
  }

  /* 3-col → 1-col */
  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .header-nav {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  /* At very small widths, hide the "O projekcie" link to prevent
     header overflow — the Login link is more important above the fold. */
  .header-nav a:not(.nav-login) {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
    align-items:    flex-start;
  }
}
