/* ===========================================
   TOKENY — DARK (výchozí) / LIGHT
   =========================================== */
:root {
  --bg:          #0e0c08;
  --surface:     #1b170f;
  --surface-2:   #211c13;
  --amber:       #eba417;
  --amber-hover: #f5b830;
  --amber-ink:   #1a1407;
  --text:        #f4efe3;
  --muted:       #9c968a;
  --faint:       #8c877b;
  --border:      rgba(244,239,227,.12);
  --ph-bg:       #1a160e;
  --ph-icon:     rgba(244,239,227,.12);
  --radius:      16px;
  --shadow-card: 0 18px 40px rgba(0,0,0,.45);
  --modal-bg:    rgba(6,5,3,.82);
  --nav-bg:      rgba(14,12,8,.9);
}

[data-theme="light"] {
  --bg:          #f5f1e8;
  --surface:     #ffffff;
  --surface-2:   #ede9e0;
  --amber:       #b87d08;
  --amber-hover: #a06c07;
  --amber-ink:   #ffffff;
  --text:        #1a1407;
  --muted:       #5c5549;
  --faint:       #8a8278;
  --border:      rgba(26,20,7,.13);
  --ph-bg:       #e8e4db;
  --ph-icon:     rgba(26,20,7,.15);
  --shadow-card: 0 12px 32px rgba(0,0,0,.1);
  --modal-bg:    rgba(0,0,0,.5);
  --nav-bg:      rgba(245,241,232,.9);
}

/* ===========================================
   RESET & BASE
   =========================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  transition: background .3s, color .3s;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ===========================================
   STICKY TOPNAV (index.php)
   =========================================== */
.topnav {
  position: sticky; top: 0; z-index: 90;
  background: var(--nav-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.topnav-logo { display: flex; align-items: center; text-decoration: none; }
.topnav-logo img {
  height: 30px; display: block;
  filter: brightness(0) invert(1);   /* black → white v dark mode */
}
[data-theme="light"] .topnav-logo img {
  filter: none;                       /* black zůstane black v light mode */
}
.topnav-actions { display: flex; align-items: center; gap: 10px; }
.topnav-toggle {
  background: none; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 11px; font-size: 16px;
  cursor: pointer; color: var(--text); line-height: 1;
  transition: transform .2s, border-color .18s;
}
.topnav-toggle:hover { transform: scale(1.1); border-color: var(--amber); }
.topnav-cta { padding: 9px 16px; font-size: 13px; }
@media(max-width:480px) { .topnav-cta { display: none; } }

/* ===========================================
   THEME TOGGLE (projekty.php — fixed)
   =========================================== */
.theme-toggle {
  position: fixed; top: 16px; right: 20px; z-index: 99;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 13px; font-size: 17px;
  cursor: pointer; color: var(--text); line-height: 1;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  transition: transform .2s, box-shadow .2s;
}
.theme-toggle:hover { transform: scale(1.1); box-shadow: 0 4px 20px rgba(0,0,0,.25); }

/* ===========================================
   TYPOGRAFIE A SDÍLENÉ KOMPONENTY
   =========================================== */
.eyebrow {
  color: var(--amber); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; display: flex; align-items: center;
  gap: 10px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--amber); }

.section-label {
  color: var(--amber); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 600;
  display: flex; align-items: center; gap: 10px; margin-bottom: 44px;
}
.section-label::before { content: ""; width: 30px; height: 1px; background: var(--amber); }

.section-title {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(26px, 4vw, 38px); margin: 0 0 20px; line-height: 1.15;
}

/* ===========================================
   TLAČÍTKA
   =========================================== */
.btn {
  font-size: 14px; font-weight: 600; padding: 11px 20px;
  border-radius: 10px; cursor: pointer; border: 0;
  text-decoration: none; display: inline-block;
  font-family: 'Inter', sans-serif;
  transition: opacity .15s, transform .1s, background .15s;
}
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.97); }

.btn-primary  { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-hover); opacity: 1; }

.btn-ghost    { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); opacity: 1; }

.btn-disabled { border: 1px solid var(--border); color: var(--faint); background: transparent; cursor: default; }
.btn-disabled:hover { opacity: 1; }

/* ===========================================
   STACK CHIPY
   =========================================== */
.stack { display: flex; flex-wrap: wrap; gap: 7px; }
.stack span {
  font-size: 12px; color: var(--faint);
  background: var(--surface-2); border-radius: 6px; padding: 4px 9px;
}

/* ===========================================
   BADGE
   =========================================== */
.badge {
  align-self: flex-start; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--amber);
  border: 1px solid rgba(235,164,23,.3); border-radius: 999px; padding: 5px 11px;
}
[data-theme="light"] .badge { border-color: rgba(184,125,8,.3); }

/* ===========================================
   FILTER CHIPY (projekty.php)
   =========================================== */
.filter { display: flex; flex-wrap: wrap; gap: 10px; padding: 36px 0 28px; }
.chip {
  border: 1px solid var(--border); color: var(--text); background: transparent;
  border-radius: 999px; padding: 9px 16px; font-size: 14px;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.chip:hover:not([aria-pressed="true"]) { border-color: var(--amber); color: var(--amber); }
.chip[aria-pressed="true"] {
  background: var(--amber); color: var(--amber-ink);
  border-color: var(--amber); font-weight: 600;
}

/* ===========================================
   KARTA PROJEKTU
   =========================================== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.card-thumb {
  aspect-ratio: 16/9; background: var(--ph-bg);
  overflow: hidden; position: relative; flex-shrink: 0;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .35s;
}
.card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb .ph {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: var(--ph-icon);
}
.card-thumb .ph svg { width: 40px; height: 40px; }

.card-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 20px; margin: 2px 0 0; }
.card .tagline { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.5; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }

/* ===========================================
   GRID PROJEKTŮ
   =========================================== */
.grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; padding-bottom: 80px; }
@media(max-width:720px) { .grid { grid-template-columns: 1fr; } }

.empty-state {
  display: none; grid-column: 1/-1;
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty-state strong {
  display: block; font-family: 'Fraunces', serif;
  font-size: 22px; color: var(--text); margin-bottom: 8px;
}

/* ===========================================
   MODAL
   =========================================== */
.modal {
  position: fixed; inset: 0; background: var(--modal-bg);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow: auto; z-index: 50;
}
.modal.open { display: flex; }

.sheet {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); max-width: 700px;
  width: 100%; margin: auto; outline: none;
}

.sheet-thumb {
  aspect-ratio: 16/9; background: var(--ph-bg);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden; position: relative;
}
.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-thumb .ph {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: var(--ph-icon);
}
.sheet-thumb .ph svg { width: 56px; height: 56px; }

.sheet-body { padding: 28px 30px 32px; }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.sheet-close {
  flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px; padding: 7px 14px;
  cursor: pointer; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  transition: background .15s; margin-top: 2px;
}
.sheet-close:hover { background: var(--border); }

.sheet h2 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 27px; margin: 0 0 5px; }
.sheet .tagline { color: var(--muted); font-size: 15px; margin: 0; }

.lbl {
  color: var(--amber); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 600;
  margin: 22px 0 6px; display: block;
}
.sheet p  { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.65; }
.sheet li { color: var(--muted); font-size: 15px; margin-bottom: 3px; }
.sheet ul { margin: 0; padding-left: 18px; }

.warn {
  background: rgba(235,164,23,.1); border: 1px solid rgba(235,164,23,.28);
  border-radius: 10px; padding: 12px 14px; color: #e7c48a;
  font-size: 13.5px; margin-top: 18px;
}
[data-theme="light"] .warn { color: #7a5200; background: rgba(184,125,8,.08); }

/* ===========================================
   FOOTER
   =========================================== */
footer { border-top: 1px solid var(--border); padding-top: 40px; padding-bottom: 40px; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}
.footer-copy { color: var(--faint); font-size: 13px; }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 14px;
  transition: color .18s, border-color .18s;
}
.footer-links a:hover { color: var(--amber); border-color: var(--amber); }

/* ===========================================
   LANDING — HERO
   =========================================== */
.hero { padding-top: 72px; padding-bottom: 72px; }
.hero-inner {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 48px;
}
.hero-text { flex: 1; min-width: 0; }

.hero h1 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(34px, 5.5vw, 54px); line-height: 1.06; margin: 0 0 20px;
}
.hero h1 em { color: var(--amber); font-style: italic; }

.hero-lead {
  color: var(--muted); font-size: 17px; max-width: 56ch;
  margin: 0 0 28px; line-height: 1.68;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-portrait {
  width: 200px; height: 240px; flex-shrink: 0;
  border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  position: relative;
}
.hero-portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}
.hero-portrait .ph-face {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; font-size: 56px;
  color: var(--ph-icon);
}

@media(max-width:780px) {
  .hero-inner { flex-direction: column-reverse; gap: 28px; }
  .hero-portrait { width: 100px; height: 120px; }
}

/* ===========================================
   LANDING — ČÍSLA
   =========================================== */
.numbers {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 52px 0;
}
.numbers-inner { display: flex; flex-wrap: wrap; }

.num-item {
  flex: 1; min-width: 200px;
  padding: 20px 36px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.num-item:last-child { border-right: none; }

.num-value {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 4.5vw, 40px);
  font-weight: 600; color: var(--amber);
  line-height: 1; margin-bottom: 10px;
}
.num-label { font-size: 13px; color: var(--muted); line-height: 1.45; }

@media(max-width:720px) {
  .num-item {
    min-width: 50%; border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .num-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .num-item:last-child { border-bottom: none; }
}

/* ===========================================
   LANDING — PILÍŘE
   =========================================== */
.pillars { padding-top: 80px; padding-bottom: 80px; }
.pillars-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

.pillar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
}
.pillar-icon { font-size: 26px; margin-bottom: 14px; line-height: 1; }
.pillar-title { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 600; margin: 0 0 10px; }
.pillar-text { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.65; }

@media(max-width:780px) { .pillars-grid { grid-template-columns: 1fr; } }

/* ===========================================
   LANDING — VYBRANÉ PROJEKTY
   =========================================== */
.featured { padding-bottom: 80px; }
.featured-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 32px; }
.featured-more { text-align: center; }

@media(max-width:860px) { .featured-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:560px) { .featured-grid { grid-template-columns: 1fr; } }

/* ===========================================
   LANDING — O MNĚ / TIMELINE
   =========================================== */
.about { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--border); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

.about-text p {
  color: var(--muted); font-size: 15.5px; margin: 0 0 16px; line-height: 1.72;
}
.about-text p:last-child { margin: 0; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex; gap: 16px;
  padding-left: 22px; padding-bottom: 22px;
  position: relative;
}
.tl-item::before {
  content: ''; position: absolute;
  left: 3px; top: 8px; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: ''; position: absolute;
  left: 0; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%; background: var(--amber);
}

.tl-year   { font-size: 11px; color: var(--amber); font-weight: 600; letter-spacing: .06em; margin-bottom: 3px; }
.tl-role   { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.tl-company { font-size: 13px; color: var(--muted); }

@media(max-width:720px) { .about-inner { grid-template-columns: 1fr; gap: 40px; } }

/* ===========================================
   LANDING — JAK SPOLUPRACUJU
   =========================================== */
.how { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--border); }
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

.how-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px;
}
.how-item strong { display: block; font-size: 15px; margin-bottom: 8px; }
.how-item p { color: var(--muted); font-size: 13.5px; margin: 0; line-height: 1.6; }

@media(max-width:600px) { .how-grid { grid-template-columns: 1fr; } }

/* ===========================================
   LANDING — STACK
   =========================================== */
.stack-section { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--border); }
.stack-groups { display: flex; flex-direction: column; gap: 28px; }
.stack-group-label {
  font-size: 11px; color: var(--amber); letter-spacing: .14em;
  text-transform: uppercase; font-weight: 600; margin-bottom: 12px;
}
.stack-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-chip {
  font-size: 13px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 13px;
}

/* ===========================================
   LANDING — KONTAKT
   =========================================== */
.contact { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--border); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

.contact-text h2 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(26px, 4vw, 40px); margin: 0 0 16px; line-height: 1.15;
}
.contact-text p { color: var(--muted); font-size: 16px; margin: 0 0 28px; line-height: 1.68; }
.contact-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.contact-details { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-item { display: flex; align-items: center; gap: 14px; }
.contact-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.contact-label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 2px; }
.contact-value { font-size: 15px; font-weight: 500; }
.contact-value a { text-decoration: none; }
.contact-value a:hover { color: var(--amber); }

@media(max-width:720px) { .contact-inner { grid-template-columns: 1fr; gap: 40px; } }

/* ===========================================
   PROJEKTY.PHP — NAVIGAČNÍ PRUH
   =========================================== */
.subnav {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.subnav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
}
.subnav-back {
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  text-decoration: none; display: flex; align-items: center; gap: 6px;
  transition: color .18s;
}
.subnav-back:hover { color: var(--amber); }
.subnav-title {
  font-family: 'Fraunces', serif; font-size: 15px;
  font-weight: 600; color: var(--text);
}
.subnav-sep { color: var(--border); font-size: 18px; }

/* ===========================================
   MOBILE GLOBAL
   =========================================== */
@media(max-width:600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
