/* ==========================================================================
   KOMPAS — Křesťanský podnikatel · homepage wireframe
   Low-fidelity greyscale wireframe, implemented as a responsive page.
   Desktop layout is the base; reflows to the mobile spec below 768px.
   Colours/fonts/photos are deliberately placeholder — this is the
   structural (wireframe) phase, not visual design.
   ========================================================================== */

:root {
  --ink:        #3f3f46;
  --ink-soft:   #52525b;
  --muted:      #71717a;
  --muted-2:    #9a9aa2;
  --faint:      #a1a1aa;
  --faint-2:    #b1b1b8;

  --line:       #e4e4e7;
  --line-2:     #cfcfd4;
  --line-dash:  #d8d8dc;

  --card:       #fcfcfd;
  --card-2:     #fafafa;
  --input-bg:   #fafafa;
  --input-line: #c4c4c8;

  --dark:       #3f3f46;          /* dark contrast block (navy stand-in) */
  --accent:     #2f6db0;
  --accent-ink: #1f3a5f;
  --form-bg:    #eef3f9;
  --form-line:  #d3ddea;

  --stripe:      repeating-linear-gradient(45deg,#e7e7ea,#e7e7ea 14px,#f1f1f3 14px,#f1f1f3 28px);
  --stripe-fine: repeating-linear-gradient(45deg,#e7e7ea,#e7e7ea 12px,#f1f1f3 12px,#f1f1f3 24px);

  --maxw: 1180px;
  --pad:  clamp(16px, 4vw, 48px);
  --radius: 12px;

  /* Spacing system — one rhythm reused everywhere (A). */
  --section-y: clamp(40px, 7vw, 88px);  /* vertical breathing room per section */
  --gap:       24px;                    /* canonical grid/gutter gap            */
  --measure:   60ch;                    /* readable max line length for prose   */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  --mono: ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- Structural / a11y utilities ----------------------------------------- */
/* Keyboard focus ring — only shown for keyboard users, never on mouse click. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip link — first tab stop, lets keyboard users jump past the nav. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* Visually hidden but available to assistive tech (e.g. section headings). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

img { max-width: 100%; }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.btn--lg    { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 9px; }
.btn--sm    { height: 40px; padding: 0 18px; font-size: 13px; }
.btn--block { width: 100%; }

.btn--dark   { background: var(--dark); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; height: 56px; font-weight: 700; font-size: 17px; border-radius: 10px; }
.btn--light  { background: #fff; color: var(--ink); height: 46px; }
.btn--grey   { background: var(--ink-soft); color: #fff; height: 44px; padding: 0 18px; }
.btn--ghost  { background: transparent; color: var(--ink-soft); border-color: var(--faint); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); height: 46px; }

.btn:hover { filter: brightness(0.96); }
.btn--ghost:hover, .btn--light:hover { filter: none; background: rgba(0,0,0,.03); }

.link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* ---- Shared section / typography ----------------------------------------- */
/* Sections are segmented by whitespace, not rules. Separation appears only on
   blocks that carry their own surface (dark countdown, light form band, footer). */
.section { padding: var(--section-y) 0; }
.section__title { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 20px; }
.section__title--flush { margin: 0; }
/* Standard section opener: title + lead paragraph at a readable measure (C). */
.section__intro { max-width: var(--measure); font-size: 15px; color: var(--muted); line-height: 1.6; margin: -8px 0 28px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint-2);
  margin: 0 0 6px;
}
.eyebrow--light { color: #b9c4d4; font-size: 12px; letter-spacing: .12em; }

/* ---- Placeholders (low-fi imagery) --------------------------------------- */
.placeholder {
  background: var(--stripe);
  border: 1px dashed var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 13px;
  border-radius: var(--radius);
  padding: 16px;
}
.placeholder--photo { height: 140px; border: none; border-bottom: 1px dashed var(--line-2); border-radius: 0; font-size: 11px; }
.placeholder--map   { background: repeating-linear-gradient(45deg,#e9e9ec,#e9e9ec 16px,#f1f1f3 16px,#f1f1f3 32px); }
.placeholder--flat  { height: 120px; border: none; border-radius: 0; }

.icon-box {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--line);
  border: 1px solid #d4d4d8;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; color: var(--muted-2);
}
.icon-box--dashed { background: #e9e9ec; border: 1px dashed var(--line-2); }

/* Neutral layout wrapper — box styling (border/background) lives on .explore-box only. */
.card { border-radius: var(--radius); }

/* ==========================================================================
   §1 — Navigation (sticky)
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 68px;
}
.nav__logo { font-weight: 800; font-size: 20px; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.nav__menu { display: flex; align-items: center; gap: 26px; }
.nav__menu a { color: var(--muted); font-size: 14px; text-decoration: none; }
.nav__menu a:hover { color: var(--ink); }
.nav__cta { height: 42px; }

.nav__toggle {
  display: none;
  flex-direction: column; gap: 4px;
  background: none; border: none; padding: 8px; cursor: pointer;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--muted); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ==========================================================================
   §2 — Hero
   ========================================================================== */
.hero { padding: clamp(48px, 7vw, 84px) 0; }
.hero__inner { display: flex; gap: clamp(36px, 5vw, 64px); align-items: center; }
.hero__copy { flex: 1.1 1 0; display: flex; flex-direction: column; gap: 24px; }
.hero__title { font-size: 46px; font-weight: 700; line-height: 1.1; letter-spacing: -.015em; margin: 0; color: var(--ink); }
.hero__sub { font-size: 18px; color: var(--muted); line-height: 1.55; max-width: var(--measure); margin: 0; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.hero__media { flex: 0.9 1 0; min-height: 360px; align-self: stretch; }

/* ==========================================================================
   §3 — Action tiles (what you can do at KOMPAS)
   ========================================================================== */
.explore__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.explore-box {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 13px;
  text-decoration: none; color: inherit;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.explore-box h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.explore-box p { margin: 0; flex: 1; font-size: 14px; color: var(--muted); line-height: 1.55; }
.explore-box__cta { font-size: 13px; font-weight: 600; color: var(--accent); }
.explore-box:hover { box-shadow: 0 6px 18px rgba(0,0,0,.09); transform: translateY(-2px); }
/* "Připojit se" tile carries the same gentle accent as the primary form (§9). */
.explore-box--accent { border-color: var(--form-line); background: var(--form-bg); }
.explore-box--accent h3 { color: var(--accent-ink); }

/* ==========================================================================
   §4 — Countdown (dark contrast block)
   ========================================================================== */
.countdown {
  background: var(--dark);
  border-radius: 14px;
  padding: 40px 44px;
  color: #fff;
  display: flex; gap: 40px; align-items: center; flex-wrap: wrap;
}
.countdown__lead { flex: 1 1 380px; }
.countdown__name { font-size: 30px; font-weight: 700; line-height: 1.15; margin: 0 0 8px; }
.countdown__meta { font-size: 14px; color: #cfd6e0; margin: 0 0 16px; }
.countdown__desc { font-size: 14px; color: #cfd6e0; line-height: 1.55; max-width: 430px; margin: 0 0 22px; }
.countdown__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.countdown__timer { flex: 0 0 auto; display: flex; gap: 14px; align-items: flex-end; }
.countdown__unit { text-align: center; }
.countdown__num {
  width: 84px; height: 84px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.countdown__label { display: block; font-family: var(--mono); font-size: 10px; color: #b9c4d4; margin-top: 7px; letter-spacing: .1em; }
.countdown__sep { font-size: 34px; font-weight: 300; color: #7e8aa0; padding-bottom: 24px; }

/* ==========================================================================
   §5 — Events
   ========================================================================== */
.events__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.event-card { overflow: hidden; border-radius: var(--radius); display: flex; flex-direction: column; }
.event-card__body { padding: 14px 0 0; display: flex; flex-direction: column; flex: 1; }
.event-card__body h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--ink); }
.event-card__desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
/* CTA pinned to the card foot so a row of cards aligns regardless of copy length. */
.event-card__body .link { margin-top: auto; }

/* ==========================================================================
   §6 — Club map
   ========================================================================== */
.map { display: flex; gap: 24px; }
.map__sidebar { flex: 0 0 360px; display: flex; flex-direction: column; gap: 14px; }
.search {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 14px;
  background: var(--input-bg); border: 1px solid var(--input-line); border-radius: 8px;
}
.search input { border: none; background: none; outline: none; width: 100%; font: inherit; font-size: 14px; color: var(--ink); }
.club-list { list-style: none; margin: 0; padding: 0; }
.club-list__item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid #f0f0f2; font-size: 14px; color: var(--ink-soft);
}
.club-list__item:last-child { border-bottom: none; }
.club-list__meta { color: var(--faint-2); font-size: 12px; }
.club-list__item--more { color: var(--muted-2); font-size: 13px; }

.map__canvas { flex: 1; min-height: 340px; position: relative; }
.map__caption { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.map__marker {
  position: absolute; width: 18px; height: 18px;
  background: var(--ink); border: 2px solid #fff;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
}
.map__popup {
  position: absolute; width: 170px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 10px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.map__popup strong { display: block; font-size: 12px; color: var(--ink); }
.map__popup span { font-size: 11px; color: var(--muted-2); }
.map__summary { font-size: 13.5px; color: var(--muted); margin: 18px 0 0; }

/* ==========================================================================
   §8 — Primary lead form ⭐
   ========================================================================== */
.form-section {
  background: var(--form-bg);
  border-top: 3px solid var(--accent);
  padding: var(--section-y) 0;
}
.form-section__inner { display: flex; gap: clamp(40px, 5vw, 56px); align-items: flex-start; }
.form-section__lead { flex: 0 0 400px; }
.form-section__title { font-size: 38px; font-weight: 700; color: var(--accent-ink); line-height: 1.15; margin: 0 0 14px; }
.form-section__sub { font-size: 16px; color: #52607a; line-height: 1.55; margin: 0; }

.lead-form {
  flex: 1;
  background: #fff; border-radius: 14px;
  padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field__hint { color: var(--muted-2); font-weight: 400; }
.field input, .field textarea {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--input-bg); border: 1px solid var(--input-line);
  border-radius: 8px; padding: 13px 16px; outline: none; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.checkbox { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.checkbox input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); }
.lead-form__note { font-size: 12.5px; color: var(--muted-2); text-align: center; margin: 0; }
.lead-form__note a { color: inherit; }

/* ==========================================================================
   §9 — Poradna
   ========================================================================== */
.poradna__inner { display: flex; gap: clamp(40px, 5vw, 56px); align-items: flex-start; }
.poradna__lead { flex: 0 0 400px; }
.poradna__intro { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 20px; }
.poradna__list { flex: 1; display: flex; flex-direction: column; }
.qa { padding: 16px 0; border-bottom: 1px solid var(--line); }
.qa:first-child { padding-top: 0; }
.qa:last-child { border-bottom: none; }
.qa h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.qa__by { margin: 0; font-size: 12.5px; color: var(--muted-2); }

/* ==========================================================================
   §10 — Social wall
   ========================================================================== */
.social__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.social__follow { display: flex; align-items: center; gap: 10px; }
.social-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--line); border: 1px solid #d4d4d8;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; color: var(--muted-2);
}
.social__intro { margin: 0 0 28px; max-width: var(--measure); font-size: 15px; color: var(--muted); line-height: 1.6; }
.social__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.social-post { overflow: hidden; border-radius: var(--radius); display: flex; flex-direction: column; }
.social-post__body { padding: 14px 0 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.social-post__body h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.social-post__desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.social-post .link { font-size: 12.5px; margin-top: auto; padding-top: 4px; }
.social__embed-note { font-family: var(--mono); font-size: 11px; color: var(--muted-2); text-align: center; margin: 14px 0 0; }

/* ==========================================================================
   §11 — Newsletters
   ========================================================================== */
/* Borders were stripped earlier, so the two forms are grouped by a single
   centred divider sitting in the gutter rather than by boxes (E). */
.newsletters__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.newsletter { margin: 0; padding: 4px 0; }
.newsletter:first-child  { padding-right: clamp(28px, 5vw, 56px); border-right: 1px solid var(--line); }
.newsletter:last-child   { padding-left: clamp(28px, 5vw, 56px); }
.newsletter h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--ink-soft); }
.newsletter__desc { margin: 0 0 16px; font-size: 13px; color: var(--muted-2); line-height: 1.5; }
.newsletter__row { display: flex; gap: 10px; }
.newsletter__row input {
  flex: 1; height: 44px; padding: 0 14px; font: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid var(--input-line); border-radius: 8px; outline: none;
}
.newsletter__row input:focus { border-color: var(--accent); }

/* ==========================================================================
   §12 — Footer
   ========================================================================== */
.footer { background: var(--card-2); border-top: 1px dashed var(--line-dash); padding: 36px 0; }
.footer__cols { display: flex; gap: 40px; }
.footer__col { flex: 1; }
.footer__col--brand { flex: 1.4; }
.footer__logo { font-weight: 800; letter-spacing: .04em; color: var(--ink); margin-bottom: 12px; }
.footer__col p { font-size: 13px; color: var(--muted-2); line-height: 1.6; margin: 0; }
.footer__col h4 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__col li, .footer__col a { font-size: 13px; color: var(--muted-2); text-decoration: none; }
.footer__col a:hover { color: var(--ink); }
.footer__contact { font-style: normal; display: flex; flex-direction: column; gap: 8px; }
.footer__contact a, .footer__contact span { font-size: 13px; color: var(--muted-2); text-decoration: none; }
.footer__contact a:hover { color: var(--ink); }
.footer__social { display: flex; gap: 10px; }
.footer__bottom {
  border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--faint-2);
}
.footer__bottom a { color: var(--faint-2); }

/* ==========================================================================
   Responsive — collapse the desktop layout to the mobile spec
   ========================================================================== */
@media (max-width: 1024px) {
  .explore__grid { grid-template-columns: repeat(2, 1fr); }
  .events__grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Nav → hamburger */
  .nav__inner { height: 60px; }
  .nav__menu {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 0 var(--pad);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav__menu.is-open { max-height: 320px; }
  .nav__menu a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* Hero → stacked, photo above CTAs */
  .hero__inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .hero__title { font-size: 30px; }
  .hero__sub { font-size: 15px; }
  .hero__media { min-height: 180px; order: 2; }
  .hero__actions { order: 3; flex-direction: column; }
  .hero__actions .btn { width: 100%; }

  /* Stack all card grids */
  .explore__grid, .events__grid, .social__grid, .newsletters__grid { grid-template-columns: 1fr; }
  .events__grid .event-card:nth-child(n+3) { display: none; } /* mobile spec shows 2 + "all events" link */
  .social__grid .social-post:nth-child(n+2) { display: none; }

  /* Newsletters: the centred divider becomes a top rule between the stacked forms. */
  .newsletters__grid { gap: 28px; }
  .newsletter:first-child  { padding-right: 0; border-right: none; }
  .newsletter:last-child   { padding-left: 0; padding-top: 28px; border-top: 1px solid var(--line); }

  .section { padding: 28px 0; }
  .section__title { font-size: 20px; }

  /* Countdown → stacked, equal-width units */
  .countdown { padding: 22px; gap: 18px; }
  .countdown__name { font-size: 20px; }
  .countdown__timer { width: 100%; gap: 8px; }
  .countdown__unit { flex: 1; }
  .countdown__num { width: 100%; height: 56px; font-size: 24px; }
  .countdown__sep { display: none; }
  .countdown__actions { flex-direction: column; }
  .countdown__actions .btn { width: 100%; }

  /* Map → stacked */
  .map { flex-direction: column; }
  .map__sidebar { flex: 1 1 auto; }
  .map__canvas { min-height: 200px; }

  /* Primary form → stacked, single-column fields */
  .form-section__inner { flex-direction: column; gap: 18px; }
  .form-section__lead { flex: 1 1 auto; }
  .form-section__title { font-size: 26px; }
  .lead-form { padding: 20px; }
  .field-row { flex-direction: column; gap: 16px; }

  /* Poradna → stacked */
  .poradna__inner { flex-direction: column; gap: 16px; }
  .poradna__lead { flex: 1 1 auto; }
  .poradna__lead .btn { width: 100%; }
  .poradna__list .qa:nth-child(n+2) { display: none; } /* mobile spec shows 1 example */
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}
