/* ══════════════════════════════════════════════════════
   FRONTEND-DESIGN ENHANCEMENT LAYER
   Nakładka na styles.css — upgrade typografii, motion, głębi.
   Brand palette: Slate + Warm Copper (Paleta A).
   ══════════════════════════════════════════════════════ */

/* ── FONTS ──
   Replace system Aptos with distinctive web fonts:
   Satoshi (geometric grotesk, sharp personality) for body
   Newsreader (editorial optical-size serif) for display
   ─────────────────────────────────────────────── */
/* Satoshi loaded via <link> in HTML head, not @import (blocks render) */

:root {
  --font-body: 'Satoshi', 'Aptos', sans-serif;
  --font-display: 'Newsreader', 'Georgia', serif;
  --warm: #c89060;
  --warm-soft: #f5ece2;
  --warm-hover: #b07a4a;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

/* ── NOISE TEXTURE (subtle grain for depth) ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── ENHANCED HEADER ── */
.site-header {
  background: rgba(248, 246, 242, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(216, 212, 206, 0.45);
  box-shadow: 0 1px 24px rgba(26, 31, 46, 0.04);
  transition: background 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

/* ── HERO ENHANCEMENTS ── */
.hero {
  padding: 96px 0 48px;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero-line {
  display: block;
  animation: slideUp 0.7s var(--ease-out) both;
}
.hero-line:nth-child(2) { animation-delay: 0.1s; }
.hero-line:nth-child(3) { animation-delay: 0.2s; }

/* ── ENHANCED BUTTONS ── */
.button.primary {
  transition: all 0.3s var(--ease-smooth);
  box-shadow: 0 4px 16px rgba(26, 31, 46, 0.2);
}
.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26, 31, 46, 0.3);
}

/* ── WARM ACCENT UPGRADE ──
   Terracotta used for: highlighted CTAs, badges, selected states
   ─────────────────────────────────────────────── */
.button.warm,
.idx-offer-card.featured .idx-offer-badge,
.kw-cta-primary {
  background: var(--warm);
  border-color: var(--warm);
  color: #fff;
}
.button.warm:hover {
  background: var(--warm-hover);
  border-color: var(--warm-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 144, 96, 0.3);
}

/* ── SECTION ENHANCEMENTS ── */
.section {
  position: relative;
}

.section-header h2 {
  font-family: var(--font-display);
}

/* ── CARD ENHANCEMENTS ── */
.legal-card,
.idx-offer-card,
.idx-persona-tile,
.kw-why-col {
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

/* ── SCROLL REVEAL SYSTEM ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.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; }

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── PORTRAIT CARD GLOW ── */
.portrait-card {
  position: relative;
}
.portrait-card::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, rgba(200, 144, 96, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s var(--ease-smooth);
}
.portrait-card:hover::after {
  opacity: 1;
}

/* ── EYEBROW UPGRADE ── */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid rgba(200, 144, 96, 0.15);
}

/* ── FAQ ACCORDION SMOOTH ── */
.faq-item {
  transition: box-shadow 0.3s var(--ease-smooth);
}
.faq-item:hover {
  box-shadow: 0 8px 24px rgba(26, 31, 46, 0.06);
}

/* ── ENHANCED FOOTER ── */
.footer {
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 212, 206, 0.4), transparent);
}

/* ── DARK SECTION ATMOSPHERE ── */
.section-dark {
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200, 144, 96, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── SMOOTH LINK HOVER ── */
a {
  transition: color 0.2s var(--ease-smooth);
}

/* ── ANIMATIONS ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── SELECTION COLOR ── */
::selection {
  background: rgba(200, 144, 96, 0.15);
  color: var(--brand-dark);
}

/* ── SCROLLBAR STYLING ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-strong);
}

/* ── FOCUS VISIBLE ── */
*:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stagger-children > *,
  .hero-line {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* === HERO SIZE OVERRIDES (2026-04-19) === */
/* Skala h1 dla blog posts i starter-kit - bez tego dziedziczy globalne h1 (4.4rem max), co daje "ogromne hero" */
.article-body h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.starter-shell h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
