/* ============================================================
   Bohumír Sláma – Global Styles
   Aesthetic: Warm organic luminance. Dark navy + gold + amber.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #060e1a;
  --bg-mid: #0c1826;
  --bg-soft: rgba(12, 24, 38, 0.85);
  --gold: #c8a84b;
  --gold-light: #e5c96e;
  --gold-soft: rgba(200, 168, 75, 0.14);
  --gold-border: rgba(200, 168, 75, 0.28);
  --amber: #c97a2e;
  --amber-light: #e8a050;
  --cream: #f7f0e0;
  --cream-soft: rgba(247, 240, 224, 0.88);
  --forest: #3a7d44;
  --forest-light: rgba(58, 125, 68, 0.2);
  --text-dark: #1c1206;
  --text-light: #f0e8d6;
  --text-muted: rgba(240, 232, 214, 0.62);
  --text-dark-muted: rgba(28, 18, 6, 0.72);
  --card: rgba(10, 22, 38, 0.82);
  --card-light: rgba(247, 240, 224, 0.94);
  --line: rgba(200, 168, 75, 0.18);
  --line-light: rgba(28, 18, 6, 0.1);
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 12px 48px rgba(200, 168, 75, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --container: min(1160px, calc(100vw - 48px));
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-light);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(200, 168, 75, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(58, 90, 140, 0.16) 0%, transparent 45%),
    linear-gradient(180deg, #060e1a 0%, #080f1d 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; transition: color 200ms ease, opacity 200ms ease; }
a:hover { opacity: 0.82; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--font-body); cursor: pointer; border: none; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
}
h1 { font-size: clamp(2.8rem, 6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.2rem; }
p { line-height: 1.72; font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.container { width: var(--container); margin: 0 auto; }
.section { padding: 80px 0; }
.section-light {
  background: var(--card-light);
  color: var(--text-dark);
  border-radius: var(--radius-xl);
  padding: 72px 56px;
  border: 1px solid var(--line-light);
}
.section-center { text-align: center; }
.section-center p { max-width: 62ch; margin: 0 auto; }

/* ─── HEADER / NAV ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 100;
  width: var(--container);
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  background: rgba(6, 14, 26, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(200, 168, 75, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.03) inset;
  transition: all 200ms ease;
}

.site-header.compact {
  padding: 10px 24px;
  background: rgba(6, 14, 26, 0.96);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  font-weight: 700;
}
.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--gold);
  box-shadow: 0 0 14px rgba(200, 168, 75, 0.3);
}
.brand-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--cream);
}
.brand-name em {
  font-style: italic;
  color: var(--gold-light);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 180ms ease;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--cream);
  background: rgba(255,255,255,0.07);
  opacity: 1;
}
.site-nav a.nav-highlight {
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.menu-btn {
  display: none;
  padding: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.1);
  flex-direction: column;
  gap: 4.5px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.menu-btn.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.menu-btn.open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }
.menu-btn.open span:nth-child(2){ opacity: 0; }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1a0e00;
  box-shadow: 0 12px 32px rgba(200, 168, 75, 0.28);
}
.btn-primary:hover { box-shadow: 0 18px 44px rgba(200, 168, 75, 0.38); opacity: 1; }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.14);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); opacity: 1; }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-lg { padding: 18px 36px; font-size: 1.1rem; }

/* ─── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 36px 96px rgba(0,0,0,0.5); }
.card-light {
  background: var(--card-light);
  color: var(--text-dark);
  border-color: var(--line-light);
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
}
.card-gold {
  background: linear-gradient(135deg, rgba(200,168,75,0.12), rgba(200,168,75,0.06));
  border-color: var(--gold-border);
}

/* ─── FORMS ───────────────────────────────────────────────── */
.form-group { display: grid; gap: 8px; }
.form-group label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}
.form-group .field-hint {
  font-size: 0.82rem;
  color: var(--text-dark-muted);
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(28,18,6,0.18);
  background: rgba(255,255,255,0.96);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,168,75,0.18);
}
.form-control::placeholder { color: rgba(28,18,6,0.4); }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: rgba(200,168,75,0.08);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gold);
  margin-top: 2px;
  cursor: pointer;
}
.checkbox-label { font-size: 0.92rem; font-weight: 600; }
.checkbox-label em { color: var(--amber); font-style: normal; }

.form-status {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.94rem;
  display: none;
}
.form-status.success { background: rgba(58,125,68,0.15); border: 1px solid rgba(58,125,68,0.3); color: var(--forest); display: block; }
.form-status.error { background: rgba(180,50,30,0.12); border: 1px solid rgba(180,50,30,0.25); color: #8a1f1f; display: block; }

/* ─── SECTION HEADING ─────────────────────────────────────── */
.section-head { max-width: 72ch; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head p { margin-top: 16px; color: var(--text-muted); }
.section-light .section-head p { color: var(--text-dark-muted); }

/* ─── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  margin-top: 80px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .brand-name { font-size: 1.2rem; margin-bottom: 14px; display: block; }
.footer-brand p { color: var(--text-muted); font-size: 0.92rem; max-width: 32ch; }
.footer-col h5 {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 180ms ease;
}
.footer-col a:hover { color: var(--cream); opacity: 1; }
.footer-bottom {
  width: var(--container);
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* ─── HERO COMMON ─────────────────────────────────────────── */
.hero {
  padding: 60px 0 80px;
  position: relative;
}
.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
}

/* ─── GRID UTILITIES ──────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ─── UTILITIES ───────────────────────────────────────────── */
.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; }
.text-gold { color: var(--gold-light); }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-24 { margin-bottom: 24px; }
.mb-48 { margin-bottom: 48px; }

/* ─── DECORATIVE DIVIDER ─────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold);
  font-size: 1.2rem;
  margin: 48px 0;
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ─── TABLET (≤900px) ─────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --container: min(100vw - 32px, 1160px); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .section { padding: 60px 0; }
  .section-light { padding: 56px 40px; }
}

/* ─── MOBILE (≤640px) ────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --container: min(100vw - 24px, 1160px);
    --radius-xl: 20px;
    --radius-lg: 16px;
  }

  /* Navigation */
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
    border-radius: 16px;
    margin-top: 8px;
    gap: 12px;
    /* CRITICAL: Remove backdrop-filter — it creates a stacking context
       that traps position:fixed children (the nav overlay) inside it.
       Without this, the nav cannot appear above other page content. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(6, 14, 26, 0.95);
    z-index: 100;
  }

  /* Nav overlay — full screen, above everything */
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    padding: 88px 24px 32px;
    background: rgba(6, 14, 26, 0.98);
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    /* Must be > site-header z-index (100) */
    z-index: 200;
    overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    font-size: 1.15rem;
    padding: 14px 16px;
    width: 100%;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
  }

  /* Menu button — above the nav overlay so user can close it */
  .menu-btn {
    display: flex;
    z-index: 300;
    position: relative;
  }

  .brand-avatar { width: 36px; height: 36px; }

  /* Typography */
  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  h3 { font-size: 1.3rem; }
  p  { font-size: 0.97rem; }

  /* Buttons */
  .btn { padding: 13px 20px; font-size: 0.93rem; }
  .btn-lg { padding: 14px 22px; font-size: 0.98rem; }

  /* Grids → single column */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  /* Sections */
  .section { padding: 48px 0; }
  .section-light { padding: 40px 20px; border-radius: 20px; }
  .section-head { margin-bottom: 32px; }
  .mb-48 { margin-bottom: 32px; }
  .mt-48 { margin-top: 32px; }
  .ornament { margin: 32px 0; }

  /* Cards */
  .card { padding: 24px 20px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .site-footer { margin-top: 48px; padding: 36px 0 24px; }

  /* Hero common */
  .hero { padding: 40px 0 56px; }

  /* Forms */
  .form-control { padding: 12px 14px; font-size: 0.96rem; }
  .checkbox-group { padding: 12px; }
}

/* ─── SUBMENU (horizontal scroll on mobile) ───────────────── */
.submenu { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.submenu-inner { white-space: nowrap; }
.submenu a { white-space: nowrap; }

/* Prevent horizontal overflow globally */
body { overflow-x: hidden; }
.container { overflow-x: hidden; }

/* Touch-friendly tap targets */
@media (max-width: 640px) {
  a, button { min-height: 44px; min-width: 44px; }
  .btn { min-height: 48px; }
  .site-nav a { min-height: 48px; display: flex; align-items: center; }
}

/* ─── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glow {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}
.fade-up { animation: fadeUp 600ms ease forwards; }
.fade-up-delay-1 { animation-delay: 120ms; }
.fade-up-delay-2 { animation-delay: 240ms; }
.fade-up-delay-3 { animation-delay: 360ms; }
