/*
 * Byznys Parťák — Design System
 * Audience: malí podnikatelé, terapeuti, kouči, lektoři, tvůrci
 * Tonalita: lidská, podporující, teplá, profesionální
 */

/* ═══════════════════════════════════════════════════════════════
   1. DESIGN TOKENS (CSS Variables)
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Colors — Brand */
  --bp-primary: #1a2332;
  --bp-primary-light: #2d3a52;
  --bp-accent: #d4763d;
  --bp-accent-hover: #b85f29;

  /* Colors — Product accents */
  --bp-akademie: #4a8b5e;        /* green — zdarma, růst */
  --bp-akcelerator: #c05848;     /* red-orange — víkend, intenzita */
  --bp-partak: #5a4a8e;          /* purple — mentoring, premium */

  /* Colors — Backgrounds */
  --bp-bg: #faf8f5;              /* creamy white */
  --bp-bg-alt: #f0ece5;          /* warm sand */
  --bp-bg-dark: #1a2332;         /* navy dark */
  --bp-bg-darker: #0f1620;

  /* Colors — Text */
  --bp-text: #1f2937;
  --bp-text-light: #4b5563;
  --bp-text-muted: #6b7280;
  --bp-text-on-dark: #f8fafc;
  --bp-text-on-dark-muted: #cbd5e1;

  /* Colors — Lines */
  --bp-border: rgba(31, 41, 55, 0.12);
  --bp-border-strong: rgba(31, 41, 55, 0.24);
  --bp-border-on-dark: rgba(248, 250, 252, 0.16);

  /* Typography */
  --bp-font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --bp-font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --bp-text-xs: 13px;
  --bp-text-sm: 15px;
  --bp-text-base: 17px;
  --bp-text-lg: 20px;
  --bp-text-xl: 24px;
  --bp-text-2xl: 32px;
  --bp-text-3xl: 44px;
  --bp-text-4xl: 56px;
  --bp-text-5xl: 72px;

  /* Spacing */
  --bp-space-xs: 8px;
  --bp-space-sm: 16px;
  --bp-space-md: 32px;
  --bp-space-lg: 64px;
  --bp-space-xl: 96px;
  --bp-space-2xl: 128px;

  /* Container */
  --bp-container-max: 1200px;
  --bp-container-narrow: 800px;
  --bp-container-wide: 1440px;

  /* Radii */
  --bp-radius-sm: 6px;
  --bp-radius-md: 12px;
  --bp-radius-lg: 20px;
  --bp-radius-xl: 32px;
  --bp-radius-pill: 999px;

  /* Shadows */
  --bp-shadow-sm: 0 1px 3px rgba(15, 22, 32, 0.06);
  --bp-shadow-md: 0 4px 12px rgba(15, 22, 32, 0.08);
  --bp-shadow-lg: 0 12px 32px rgba(15, 22, 32, 0.12);
  --bp-shadow-xl: 0 24px 64px rgba(15, 22, 32, 0.18);

  /* Transitions */
  --bp-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --bp-transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════
   2. RESET + BASE
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--bp-font-body);
  font-size: var(--bp-text-base);
  line-height: 1.65;
  color: var(--bp-text);
  background: var(--bp-bg);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6,
.brxe-heading {
  font-family: var(--bp-font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--bp-primary);
  margin: 0 0 var(--bp-space-sm) 0;
}

h1, .bp-h1 { font-size: clamp(36px, 5vw, var(--bp-text-4xl)); }
h2, .bp-h2 { font-size: clamp(28px, 4vw, var(--bp-text-3xl)); }
h3, .bp-h3 { font-size: clamp(22px, 3vw, var(--bp-text-2xl)); }
h4, .bp-h4 { font-size: var(--bp-text-xl); }

p { margin: 0 0 var(--bp-space-sm) 0; max-width: 70ch; }

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

/* ═══════════════════════════════════════════════════════════════
   3. LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.bp-container {
  max-width: var(--bp-container-max);
  margin: 0 auto;
  padding-left: var(--bp-space-md);
  padding-right: var(--bp-space-md);
}

.bp-container--narrow { max-width: var(--bp-container-narrow); }
.bp-container--wide   { max-width: var(--bp-container-wide); }

/* Section — sane vertical rhythm */
.bp-section {
  padding-top: clamp(var(--bp-space-lg), 8vw, var(--bp-space-xl));
  padding-bottom: clamp(var(--bp-space-lg), 8vw, var(--bp-space-xl));
}
.bp-section--alt { background: var(--bp-bg-alt); }
.bp-section--dark {
  background: var(--bp-bg-dark);
  color: var(--bp-text-on-dark);
}
.bp-section--dark h1,
.bp-section--dark h2,
.bp-section--dark h3,
.bp-section--dark h4,
.bp-section--dark h5,
.bp-section--dark h6,
.bp-section--dark .brxe-heading { color: var(--bp-text-on-dark) !important; }

.bp-section--dark p,
.bp-section--dark .brxe-text-basic,
.bp-section--dark .brxe-text { color: var(--bp-text-on-dark-muted) !important; }

.bp-section--tight {
  padding-top: var(--bp-space-md);
  padding-bottom: var(--bp-space-md);
}

/* Grid */
.bp-grid {
  display: grid !important;
  gap: var(--bp-space-md);
}
.bp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bp-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .bp-grid--3, .bp-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .bp-grid--2, .bp-grid--3, .bp-grid--4 { grid-template-columns: 1fr; }
}

/* Flex helpers */
.bp-row { display: flex !important; gap: var(--bp-space-sm); align-items: center; }
.bp-col { display: flex !important; flex-direction: column; gap: var(--bp-space-sm); }
.bp-center { display: flex !important; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════
   4. COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* Eyebrow — small caps label */
.bp-eyebrow {
  display: inline-block;
  font-family: var(--bp-font-body);
  font-size: var(--bp-text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bp-accent);
  margin-bottom: var(--bp-space-xs);
}

.bp-section--dark .bp-eyebrow { color: var(--bp-accent); }

/* Buttons */
.bp-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--bp-font-body);
  font-size: var(--bp-text-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--bp-radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--bp-transition);
  text-decoration: none !important;
  white-space: nowrap;
}

.bp-btn--primary {
  background: var(--bp-accent) !important;
  color: #fff !important;
  border-color: var(--bp-accent);
}
.bp-btn--primary:hover {
  background: var(--bp-accent-hover) !important;
  border-color: var(--bp-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--bp-shadow-md);
}

.bp-btn--ghost {
  background: transparent !important;
  color: var(--bp-primary) !important;
  border-color: var(--bp-border-strong);
}
.bp-btn--ghost:hover {
  background: var(--bp-primary) !important;
  color: #fff !important;
  border-color: var(--bp-primary);
}

.bp-section--dark .bp-btn--ghost {
  color: var(--bp-text-on-dark) !important;
  border-color: var(--bp-border-on-dark);
}
.bp-section--dark .bp-btn--ghost:hover {
  background: var(--bp-text-on-dark) !important;
  color: var(--bp-primary) !important;
}

/* Card */
.bp-card {
  background: #fff;
  border-radius: var(--bp-radius-lg);
  padding: var(--bp-space-md);
  box-shadow: var(--bp-shadow-md);
  transition: transform var(--bp-transition), box-shadow var(--bp-transition);
}
.bp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bp-shadow-lg);
}

/* Segment card — "Chci podnikat" / "Jsem na začátku" / "Potřebuji to rozjet" */
.bp-segment {
  background: #fff;
  border-radius: var(--bp-radius-lg);
  padding: var(--bp-space-md);
  border-top: 4px solid var(--bp-accent);
  box-shadow: var(--bp-shadow-sm);
  display: flex !important;
  flex-direction: column;
  gap: var(--bp-space-sm);
}
.bp-segment--start  { border-top-color: var(--bp-akademie); }
.bp-segment--mid    { border-top-color: var(--bp-akcelerator); }
.bp-segment--grow   { border-top-color: var(--bp-partak); }

.bp-segment h3 {
  font-size: var(--bp-text-xl);
  margin-bottom: 4px;
}
.bp-segment ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bp-segment li {
  position: relative;
  padding-left: 28px;
  font-size: var(--bp-text-sm);
  line-height: 1.5;
  color: var(--bp-text-light);
}
.bp-segment li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 2px;
  background: currentColor;
  opacity: 0.4;
}

/* Product card — Akademie / Akcelerátor / Byznys parťák */
.bp-product {
  background: #fff;
  border-radius: var(--bp-radius-lg);
  padding: var(--bp-space-md) var(--bp-space-md) calc(var(--bp-space-md) + 8px);
  border: 1px solid var(--bp-border);
  display: flex !important;
  flex-direction: column;
  gap: var(--bp-space-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--bp-transition);
}
.bp-product::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--bp-product-color, var(--bp-accent));
}
.bp-product:hover {
  transform: translateY(-4px);
  box-shadow: var(--bp-shadow-lg);
  border-color: transparent;
}
.bp-product--akademie    { --bp-product-color: var(--bp-akademie); }
.bp-product--akcelerator { --bp-product-color: var(--bp-akcelerator); }
.bp-product--partak      { --bp-product-color: var(--bp-partak); }

.bp-product__eyebrow {
  font-family: var(--bp-font-display);
  font-size: var(--bp-text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bp-product-color, var(--bp-accent));
  margin-bottom: 4px;
}
.bp-product__price {
  font-family: var(--bp-font-display);
  font-size: var(--bp-text-3xl);
  font-weight: 700;
  color: var(--bp-primary);
  line-height: 1;
}
.bp-product__desc {
  flex: 1;
  color: var(--bp-text-light);
  font-size: var(--bp-text-base);
}

/* Hero */
.bp-hero {
  padding-top: clamp(80px, 14vw, 160px);
  padding-bottom: clamp(80px, 14vw, 160px);
  text-align: center;
}
.bp-hero h1 {
  font-size: clamp(40px, 7vw, var(--bp-text-5xl));
  max-width: 16ch;
  margin: 0 auto var(--bp-space-md) auto;
}
.bp-hero p {
  font-size: var(--bp-text-lg);
  max-width: 60ch;
  margin: 0 auto var(--bp-space-md) auto;
  color: var(--bp-text-light);
}
.bp-section--dark.bp-hero p { color: var(--bp-text-on-dark-muted); }

/* CTA Actions row */
.bp-cta-actions {
  display: flex !important;
  gap: var(--bp-space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--bp-space-md);
}

/* Section header (centered) */
.bp-section-header {
  text-align: center;
  max-width: var(--bp-container-narrow);
  margin: 0 auto var(--bp-space-lg) auto;
}

/* Stats / Numbers */
.bp-stat {
  text-align: center;
}
.bp-stat__value {
  font-family: var(--bp-font-display);
  font-size: var(--bp-text-4xl);
  font-weight: 800;
  color: var(--bp-accent);
  line-height: 1;
}
.bp-stat__label {
  font-size: var(--bp-text-sm);
  color: var(--bp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
}

/* FAQ — accordion */
.bp-faq__item {
  border-bottom: 1px solid var(--bp-border);
  padding: var(--bp-space-sm) 0;
}
.bp-faq__q {
  font-family: var(--bp-font-display);
  font-weight: 600;
  font-size: var(--bp-text-lg);
  color: var(--bp-primary);
  cursor: pointer;
}
.bp-faq__a {
  margin-top: var(--bp-space-xs);
  color: var(--bp-text-light);
}

/* ═══════════════════════════════════════════════════════════════
   5. NAV / HEADER
   ═══════════════════════════════════════════════════════════════ */

.bp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--bp-border);
}
.bp-header__inner {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: var(--bp-space-sm) var(--bp-space-md);
  max-width: var(--bp-container-wide);
  margin: 0 auto;
}
.bp-logo {
  font-family: var(--bp-font-display);
  font-weight: 800;
  font-size: var(--bp-text-xl);
  color: var(--bp-primary) !important;
  text-decoration: none;
}
.bp-logo span { color: var(--bp-accent); }

.bp-nav {
  display: flex !important;
  align-items: center;
  gap: var(--bp-space-md);
}
.bp-nav a {
  font-family: var(--bp-font-body);
  font-weight: 500;
  font-size: var(--bp-text-sm);
  color: var(--bp-text) !important;
  text-decoration: none;
  position: relative;
}
.bp-nav a:hover { color: var(--bp-accent) !important; }
.bp-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--bp-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--bp-transition);
}
.bp-nav a:hover::after { transform: scaleX(1); }

@media (max-width: 800px) {
  .bp-nav { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   6. FOOTER
   ═══════════════════════════════════════════════════════════════ */

.bp-footer {
  background: var(--bp-bg-darker);
  color: var(--bp-text-on-dark-muted);
  padding: var(--bp-space-xl) 0 var(--bp-space-lg) 0;
  margin-top: var(--bp-space-xl);
}
.bp-footer h4 {
  color: var(--bp-text-on-dark) !important;
  font-size: var(--bp-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--bp-space-sm);
}
.bp-footer a {
  color: var(--bp-text-on-dark-muted) !important;
  text-decoration: none;
  display: block;
  padding: 4px 0;
  font-size: var(--bp-text-sm);
}
.bp-footer a:hover { color: var(--bp-text-on-dark) !important; }
.bp-footer__bottom {
  border-top: 1px solid var(--bp-border-on-dark);
  margin-top: var(--bp-space-lg);
  padding-top: var(--bp-space-md);
  text-align: center;
  font-size: var(--bp-text-xs);
  color: var(--bp-text-on-dark-muted);
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════
   7. BRICKS-SPECIFIC OVERRIDES (gotchas z docs/BRICKS_PATTERNS.md)
   ═══════════════════════════════════════════════════════════════ */

/* Bricks default section padding override */
.brxe-section.bp-section { max-width: 100%; }

/* Lazy-load fix for backgrounds — apply background even when bricks-lazy-hidden */
.bp-section--dark.bricks-lazy-hidden { background: var(--bp-bg-dark) !important; }
.bp-section--alt.bricks-lazy-hidden  { background: var(--bp-bg-alt) !important; }

/* Image sane defaults */
.brxe-image img { object-fit: cover; }
