/* ==========================================================
   Fly Photo – Kamil Voděra  |  Mobile-first stylesheet
   ========================================================== */

/* ── Custom properties ───────────────────────────────────── */
:root {
  --blue:        #0b3d91;
  --blue-dark:   #072a66;
  --red:         #c62828;
  --text:        #444;
  --muted:       #777;
  --border:      #e8e8e8;
  --bg-light:    #f9f9fb;
  --shadow:      0 4px 24px rgba(0,0,0,0.08);
  --radius:      6px;
  --transition:  0.3s ease;
  --nav-h:       70px;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 100%; }
body { font-family: var(--font-sans); background: #fff; color: var(--text); line-height: 1.8; font-weight: 300; }
img, video, iframe { display: block; max-width: 100%; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Skip link (accessibility) ───────────────────────────── */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 9999;
  font-size: 0.9rem;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  overflow: visible;
}

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

/* ── Header & navigation ─────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-h);
}

/* Logo */
.logo {
  font-family: var(--font-serif);
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.logo span { color: var(--red); }

/* Desktop nav links */
.nav-links {
  display: none; /* hidden on mobile, revealed at md */
  gap: 28px;
}
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #333;
  transition: color var(--transition);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--blue);
  border-color: var(--red);
}

/* Hamburger button (mobile) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 105;
}
.nav-drawer.open { display: block; }
.nav-drawer-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: min(300px, 80vw);
  height: 100%;
  background: #fff;
  padding: 100px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.nav-drawer-inner a {
  font-size: 1rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  transition: color var(--transition);
}
.nav-drawer-inner a:hover { color: var(--blue); }

/* ── Hero section ────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(0,0,0,0.42), rgba(0,0,0,0.42)),
    url("https://images.unsplash.com/photo-1508614589041-895b88991e3e?w=1600&q=80")
    center/cover no-repeat;
}
.hero-content {
  position: relative;
  color: #fff;
  max-width: 700px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
}
.accent-line {
  width: 70px;
  height: 3px;
  background: var(--red);
  margin: 20px 0;
  border: none;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  opacity: 0.92;
}
.hero-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 30px;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.88rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background var(--transition);
}
.hero-cta:hover { background: #a01c1c; }

/* ── Generic section ─────────────────────────────────────── */
section { padding: 80px 0; }
section:nth-child(even) { background: var(--bg-light); }

h2 {
  font-family: var(--font-serif);
  color: var(--blue);
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.section-line {
  width: 60px;
  height: 3px;
  background: var(--red);
  border: none;
  margin: 14px 0 32px;
}

/* ── Reveal animation ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Gallery ─────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ddd; /* placeholder colour */
  aspect-ratio: 4/3;
  cursor: pointer;
}

/* Shimmer loader */
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  z-index: 1;
}
.gallery-item.loaded::before { display: none; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item::before { animation: none; }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition), opacity var(--transition);
  opacity: 0;
  position: relative;
  z-index: 2;
}
.gallery-item.loaded img { opacity: 1; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ── Lightbox ────────────────────────────────────────────── */
#lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
}
#lightbox::backdrop { background: rgba(0,0,0,0.92); }

.lightbox-inner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}
.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  opacity: 0.8;
}
.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
.lb-btn:hover { background: rgba(255,255,255,0.3); }
#lb-prev { left: 16px; }
#lb-next { right: 16px; }
#lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
#lb-close:hover { background: rgba(200,40,40,0.7); }

/* ── Videos ──────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.video-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Contact ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-top: 36px;
}
.contact-info p { margin-bottom: 8px; }
.contact-info a { color: var(--blue); border-bottom: 1px solid transparent; transition: border-color var(--transition); }
.contact-info a:hover { border-color: var(--blue); }

.form-group { display: flex; flex-direction: column; margin-bottom: 14px; }
.form-group label { font-size: 0.85rem; margin-bottom: 4px; color: var(--muted); font-weight: 400; }
.form-group input,
.form-group textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: #fff;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11,61,145,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.form-status { margin-top: 10px; font-size: 0.9rem; }
.form-status.success { color: #2e7d32; }
.form-status.error   { color: var(--red); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
footer a { color: var(--blue); }

/* ── Responsive – medium (768 px) ────────────────────────── */
@media (min-width: 768px) {
  .nav-links    { display: flex; }
  .nav-toggle   { display: none; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Responsive – large (1024 px) ───────────────────────── */
@media (min-width: 1024px) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  header, .hero-cta, .gallery, #videa, #lightbox, .nav-toggle, .nav-drawer { display: none; }
  body { color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
