/* ========================================================
   Zubní laboratoř Martina Maťašovičová
   ======================================================== */

:root {
  --navy: #16324a;
  --navy-dark: #0d2032;
  --blue: #2f7ac2;
  --blue-light: #eaf3fb;
  --teal: #3fb0a8;
  --ivory: #f7f5f0;
  --text: #2c333a;
  --text-light: #6b7580;
  --white: #ffffff;
  --border: #e3e7ea;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 50, 74, 0.08);
  --shadow-lg: 0 20px 50px rgba(22, 50, 74, 0.14);
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}

p { margin: 0 0 1em; color: var(--text); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

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

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

section { padding: 96px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-head p { color: var(--text-light); font-size: 1.05rem; }

.section-head.left { margin: 0 0 44px; text-align: left; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(22, 50, 74, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(22, 50, 74, 0.34); }

.btn-outline {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

.btn-light {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-light:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 50px; height: 50px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; color: var(--white); }
.brand-mark img { width: 40px; height: 40px; display: block; margin-left: 3px; }

.brand-text { line-height: 1.15; }
.brand-text .name { display: block; font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.brand-text .role { display: block; font-size: 0.78rem; color: var(--text-light); letter-spacing: 0.03em; }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a.active {
  background: rgba(22, 50, 74, 0.08);
  color: var(--navy);
  font-weight: 600;
}

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.header-phone svg { width: 17px; height: 17px; color: var(--teal); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--navy); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-dark);
  color: var(--white);
  padding: 150px 0 150px;
  display: flex;
  align-items: center;
  min-height: 78vh;
}

.hero-bg {
  position: absolute;
  inset: -20px;
  background: url("images/01.jpg") center 35% / cover no-repeat;
  filter: blur(6px) brightness(0.85) saturate(1.05);
  transform: scale(1.06);
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(13,32,50,0.78) 0%, rgba(13,32,50,0.58) 50%, rgba(13,32,50,0.28) 82%, rgba(13,32,50,0.12) 100%);
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63,176,168,0.25), transparent 70%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0;
  text-align: left;
}

.hero .eyebrow { color: #8fd6cf; }

.hero h1 {
  color: var(--white);
  font-size: clamp(2.8rem, 6.5vw, 4.6rem);
  margin-bottom: 26px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.86);
  max-width: 720px;
}

/* ---------- features ---------- */
.features { background: var(--ivory); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 26px; height: 26px; color: var(--blue); }
.feature-icon img { width: 26px; height: 26px; display: block; }

.feature-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-light); font-size: 0.94rem; }

/* ---------- about / split sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split.reverse .split-media { order: 2; }
.split.reverse .split-text { order: 1; }

.split-media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--blue-light), #dcebf6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media .media-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--blue);
}
.img-missing .media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--blue);
}
.split-media .media-placeholder svg { width: 54px; height: 54px; opacity: 0.55; }
.split-media .media-placeholder span { font-size: 0.85rem; color: var(--text-light); }
.img-missing img { display: none; }

.split-text h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.split-text .eyebrow { margin-bottom: 12px; }

.quote-block {
  margin-top: 26px;
  padding: 20px 24px;
  border-left: 3px solid var(--teal);
  background: var(--blue-light);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--navy);
  font-size: 1.02rem;
}

/* ---------- scanner / týčko section ---------- */
.tycko {
  background: var(--navy);
  color: var(--white);
  border-radius: 28px;
  margin: 0 28px;
  padding: 72px 60px;
  position: relative;
  overflow: hidden;
}
.tycko::before {
  content: "";
  position: absolute;
  top: -140px; right: -100px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63,176,168,0.28), transparent 70%);
}

.tycko-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.tycko h2 { color: var(--white); font-size: clamp(1.5rem, 2.8vw, 2rem); }
.tycko p.lead { color: rgba(255,255,255,0.78); font-size: 1.05rem; }

.benefit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.98rem;
  color: rgba(255,255,255,0.9);
}
.benefit-list .check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(63,176,168,0.25);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.benefit-list .check svg { width: 15px; height: 15px; color: var(--teal); }
.benefit-list strong { color: var(--white); }

/* ---------- portfolio ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.portfolio-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: 4px;
  padding: 44px 40px;
  box-shadow: 0 4px 16px rgba(22, 50, 74, 0.05);
}
.portfolio-card.removable { border-top-color: var(--teal); }

.cat-index {
  position: absolute;
  top: 28px; right: 32px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  color: var(--border);
  letter-spacing: 0.05em;
}

.portfolio-card h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.portfolio-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 14px;
}
.portfolio-card.removable ul { grid-template-columns: 1fr; }
.portfolio-card ul li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.96rem;
  line-height: 1.4;
}
.portfolio-card ul li::before {
  content: "";
  width: 5px; height: 1px;
  background: var(--blue);
  flex-shrink: 0;
  transform: translateY(-4px);
}
.portfolio-card.removable ul li::before { background: var(--teal); }

/* ---------- moje práce (před/po) ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.work-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.work-card:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 360px);
}

.before-after {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
}

.ba-item {
  position: relative;
  flex: 1;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.ba-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 60% center;
  background: #f7f7f7;
}
.ba-item img.work-photo-05a {
  object-fit: contain;
  object-position: 60% center;
  transform: translateX(18px) scale(1.04);
  transform-origin: center center;
}
.ba-item .tag {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--white);
}
.ba-item.before .tag { background: rgba(22,50,74,0.75); }
.ba-item.after .tag { background: rgba(63,176,168,0.9); }

.ba-divider {
  flex: 0 0 auto;
  width: 3px;
  align-self: stretch;
  background: var(--white);
}

.work-card p.caption {
  text-align: center;
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--text-light);
}

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--blue-light), #dfeef8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .media-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--blue); }
.gallery-item .media-placeholder svg { width: 34px; height: 34px; opacity: 0.5; }
.gallery-item .media-placeholder span { font-size: 0.72rem; color: var(--text-light); text-align: center; padding: 0 10px; }

/* ---------- contact ---------- */
.contact { background: var(--ivory); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: stretch;
}

.contact-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.contact-card h2 { color: var(--white); font-size: 1.6rem; }
.contact-card p { color: rgba(255,255,255,0.75); }

.contact-list { list-style: none; margin: 28px 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-list .ic svg { width: 19px; height: 19px; color: var(--teal); }
.contact-list a, .contact-list span.txt { font-weight: 600; color: var(--white); }
.contact-list .label { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-bottom: 2px; font-weight: 400; }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 320px;
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 40px 0 0;
}
.footer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.88rem;
  text-align: center;
  padding-bottom: 28px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.footer-info a { color: rgba(255,255,255,0.75); }
.footer-info a:hover { color: var(--white); }
.footer-title { color: var(--white); font-weight: 600; }
.footer-name { color: var(--white); }
.footer-info span:not(:last-child)::after,
.footer-info a:not(:last-child)::after {
  content: "·";
  margin-left: 18px;
  color: rgba(255,255,255,0.3);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.75s cubic-bezier(.16,.8,.3,1), transform 0.75s cubic-bezier(.16,.8,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* staggered cascade for grid items */
.feature-grid .reveal:nth-child(1),
.portfolio-grid .reveal:nth-child(1),
.work-grid .reveal:nth-child(1),
.gallery-grid .reveal:nth-child(1) { transition-delay: 0s; }
.feature-grid .reveal:nth-child(2),
.portfolio-grid .reveal:nth-child(2),
.work-grid .reveal:nth-child(2),
.gallery-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.feature-grid .reveal:nth-child(3),
.portfolio-grid .reveal:nth-child(3),
.work-grid .reveal:nth-child(3),
.gallery-grid .reveal:nth-child(3) { transition-delay: 0.24s; }
.feature-grid .reveal:nth-child(4),
.work-grid .reveal:nth-child(4),
.gallery-grid .reveal:nth-child(4) { transition-delay: 0.36s; }

/* parallax hero background */
.hero-bg { will-change: transform; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }
  .header-cta .btn-primary { display: none; }
  .header-cta { gap: 10px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .split, .tycko-inner, .portfolio-grid, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media, .split.reverse .split-text { order: initial; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .tycko { margin: 0 16px; padding: 48px 28px; }
  section { padding: 68px 0; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 14px 20px; }
  .portfolio-card.fixed ul { grid-template-columns: 1fr; }
  .cat-index { top: 24px; right: 24px; }
}

/* mobile nav panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--navy-dark);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 28px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav .close-btn { align-self: flex-end; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-nav .close-btn svg { width: 26px; height: 26px; color: var(--white); }
.mobile-nav a {
  color: var(--white);
  font-size: 1.4rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav .btn { margin-top: 30px; align-self: flex-start; }

/* ---------- extra small phones ---------- */
@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .header-inner { padding: 12px 16px; }
  .brand-text .role { display: none; }
  .hero { padding: 96px 0 90px; min-height: 60vh; }
  .gallery-grid { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }
  .tycko { padding: 40px 20px; }
  .portfolio-card { padding: 30px 22px; }
  .contact-card { padding: 34px 26px; }
}

/* ---------- large desktop & 4K screens ---------- */
@media (min-width: 1600px) {
  html { font-size: 18px; }
  :root { --maxw: 1360px; }
  .hero { padding: 150px 0 160px; }
  .gallery-grid { max-width: 1080px; }
  .work-grid { max-width: 400px; }
}

@media (min-width: 2200px) {
  html { font-size: 20px; }
  :root { --maxw: 1560px; }
}
