:root {
  --paper: #f6f4ee;
  --ink: #17304a;
  --glass: rgba(250, 248, 240, .84);
  --line: rgba(23, 48, 74, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; background: #0c1710; }
body { margin: 0; font-family: Georgia, 'Times New Roman', serif; background: #0c1710; color: var(--ink); }
.topbar {
  position: fixed; z-index: 20; left: 0; right: 0; top: 0;
  height: 48px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 0 18px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); transition: transform .25s ease, opacity .25s ease;
}
.topbar.hidden { transform: translateY(-100%); opacity: .1; }
.brand { font-size: 12px; letter-spacing: .14em; font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.mainnav { display: flex; justify-content: center; gap: clamp(10px,2.2vw,30px); }
.mainnav a, .pdf { color: var(--ink); text-decoration: none; font-size: 13px; opacity: .78; }
.mainnav a:hover, .pdf:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.menu-toggle { display: none; border: 0; background: transparent; width: 38px; height: 38px; padding: 8px; cursor: pointer; justify-self: end; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#deck { width: 100%; }
.slide {
  min-height: 100svh; width: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; background: #0c1710; padding: 48px 0 0;
}
.slide img {
  width: 100%; height: calc(100svh - 48px); object-fit: contain; display: block;
  background: var(--paper); box-shadow: 0 0 40px rgba(0,0,0,.18);
}
.controls {
  position: fixed; z-index: 30; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 999px;
  background: rgba(248,246,240,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(23,48,74,.16); box-shadow: 0 8px 30px rgba(0,0,0,.15);
}
.controls button { border: 0; background: transparent; color: var(--ink); font-size: 20px; line-height: 1; width: 34px; height: 30px; cursor: pointer; border-radius: 99px; }
.controls button:hover { background: rgba(23,48,74,.08); }
#counter { min-width: 54px; text-align: center; font: 12px/1.2 Arial, sans-serif; letter-spacing: .04em; }
.contact-pill {
  position: fixed; z-index: 25; right: 14px; bottom: max(14px, env(safe-area-inset-bottom));
  background: rgba(248,246,240,.88); color: #184425; text-decoration: none; border: 1px solid rgba(24,68,37,.18);
  border-radius: 999px; padding: 9px 13px; font: 12px/1 Arial, sans-serif; backdrop-filter: blur(8px);
}
@media (max-width: 760px) {
  html { scroll-snap-type: y proximity; }
  .topbar { grid-template-columns: 1fr auto; height: 44px; padding: 0 10px 0 12px; overflow: visible; }
  .brand { font-size: 11px; }
  .menu-toggle { display: block; }
  .mainnav {
    display: none; position: absolute; top: 44px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 0 12px;
    background: rgba(250,248,240,.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.12);
  }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 12px 18px; font-size: 16px; opacity: .9; }
  .mainnav a:hover { text-decoration: none; background: rgba(23,48,74,.06); }
  .slide { min-height: auto; padding-top: 44px; scroll-margin-top: 44px; }
  .slide img { width: 100%; height: auto; min-height: 0; object-fit: contain; }
  .controls { bottom: 8px; }
  .contact-pill { display: none; }
}
@media (orientation: portrait) and (min-width: 761px) {
  .slide img { height: auto; max-height: calc(100svh - 48px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.video-slide { background: #f3ebe6; }
.video-page {
  width: 100%; height: calc(100svh - 48px); display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px 5vw 28px; background: #f3ebe6 url('assets/pages/page-09.webp') center/cover no-repeat; position: relative; overflow: hidden;
}
.video-page::before { content: ''; position: absolute; inset: 0; background: rgba(255,248,244,.82); backdrop-filter: blur(1px); }
.video-page h2 { position: relative; z-index: 1; margin: 0 0 16px; font-size: clamp(22px, 2vw, 34px); color: #111; font-weight: 700; text-align: center; }
.video-page video { position: relative; z-index: 1; width: min(78vw, 980px); max-height: calc(100svh - 145px); aspect-ratio: 16/9; object-fit: contain; background: #000; box-shadow: 0 7px 24px rgba(0,0,0,.22); border: 4px solid rgba(255,255,255,.85); }
@media (max-width: 760px) {
  .video-page { height: auto; min-height: calc(100svh - 44px); padding: 22px 14px 80px; }
  .video-page video { width: 100%; max-height: none; }
}
