:root{
  --bg: #ffffff;
  --ink: #111;
  --muted: #666;
  --panel: #3b3b3b;
  --yellow1: #ffd84d;
  --yellow2: #f3c400;
  --radius: 22px;
  --shadow: 0 12px 30px rgba(0,0,0,.25);

  --header-h: 76px;
  --footer-h: 92px;
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);

  /* GLOBAL FIXED BACKGROUND */
  background: url("./assets/hero-bg.jpg") center / cover no-repeat fixed;
}

/* Darken background for readability */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: -1;
}

/* Fixed header */
.topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  padding: 0 16px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  z-index: 1000;

  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.icon-btn{
  width: 60px;
  height: 52px;
  border: 0;
  border-radius: 20px;
  background: rgba(0,0,0,.06);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.burger{
  position: relative;
  width: 26px;
  height: 3px;
  background: #111;
  border-radius: 999px;
}
.burger::before,
.burger::after{
  content:"";
  position:absolute;
  left:0;
  width: 26px;
  height: 3px;
  background: #111;
  border-radius: 999px;
}
.burger::before{ top: -8px; }
.burger::after{ top: 8px; }

.cta{
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--yellow1), var(--yellow2));
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
}

/* Drawer */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.28);
  z-index: 998;
}

.drawer{
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 280px;
  transform: translateX(-105%);
  transition: transform .28s ease;
  z-index: 999;

  background: rgba(40,40,40,.62);
  backdrop-filter: blur(14px);
  border-right: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  padding: 18px;
}
.drawer.open{ transform: translateX(0); }

.drawer-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  color: #fff;
  margin-bottom: 14px;
}
.drawer-title{ font-weight: 800; letter-spacing: .04em; }

.drawer-close{
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.drawer-nav{
  display:flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}
.drawer-link{
  color: var(--yellow1);
  text-decoration: none;
  font-weight: 800;
  padding: 12px 12px;
  border-radius: 14px;
}
.drawer-link:hover{ background: rgba(255,255,255,.08); }

/* Film frame */
.frame{
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
  height: 100vh;
}

.content{
  height: calc(100vh - var(--header-h) - var(--footer-h));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Hero (no bg here; body handles bg) */
.hero{
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 48px 16px 20px;
}

.hero-logo{
  width: min(920px, 92vw);
  height: auto;
  max-height: 60vh;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.6));
}

/* Sections */
.section{ padding: 48px 16px; }
.container{ max-width: 1000px; margin: 0 auto; }
.container.narrow{ max-width: 520px; }

.h2{ font-size: 28px; margin: 0 0 10px; }
.center{ text-align: center; }
.muted{ color: rgba(255,255,255,.75); } /* on dark background */
.small{ font-size: 14px; }

/* Glass section backing for readability over photo */
.section-glass{
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
}
.section-glass .muted{ color: #666; } /* inside glass */
.section-glass .h2{ color: #111; }

/* About panel */
.panel{
  background: rgba(35,35,35,.86);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.panel-title{
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: .04em;
}
.panel p{ margin: 0 0 12px; color: rgba(255,255,255,.88); line-height: 1.55; }

/* Buttons */
.btn{
  display: inline-flex;
  justify-content:center;
  align-items:center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}
.btn-primary{ background: #111; color: #fff; }
.btn-dark{ background: #111; color: #fff; width: 100%; }

/* ===== Polished Carousel ===== */
.carousel{ position: relative; margin-top: 18px; }

.carousel-viewport{
  overflow: hidden;
  border-radius: 18px;
  outline: none;
}
.carousel-viewport:focus-visible{ box-shadow: 0 0 0 3px rgba(0,0,0,.25); }

.carousel-track{
  --gap: 14px;
  --perView: 1;
  display: flex;
  gap: var(--gap);
  padding: 6px;
  scroll-behavior: smooth;

  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.carousel-track::-webkit-scrollbar{ display:none; }

.carousel-item{
  flex: 0 0 calc((100% - (var(--gap) * (var(--perView) - 1))) / var(--perView));
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  background: #fff;
}
.carousel-item img{
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}
@media (min-width: 720px){
  .carousel-track{ --perView: 2; }
  .carousel-item img{ height: 340px; }
}
@media (min-width: 1024px){
  .carousel-track{ --perView: 3; }
  .carousel-item img{ height: 300px; }
}

.carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  color: #111;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
}
.carousel-btn.prev{ left: 10px; }
.carousel-btn.next{ right: 10px; }
.carousel-btn:active{ transform: translateY(-50%) scale(.98); }

.carousel-dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.carousel-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(0,0,0,.25);
}
.carousel-dot[aria-current="true"]{
  background: rgba(0,0,0,.85);
  width: 22px;
}
@media (prefers-reduced-motion: reduce){
  .carousel-track{ scroll-behavior: auto; }
}

/* Form */
.form{
  display:flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
label span{
  display:block;
  font-size: 14px;
  color: rgba(255,255,255,.75);
  margin: 0 0 6px;
}
input, textarea{
  width: 100%;
  padding: 12px 12px;
  font-size: 16px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  outline: none;
  background: rgba(255,255,255,.92);
  color: #111;
}
input:focus, textarea:focus{ border-color: rgba(0,0,0,.45); }

/* Fixed footer */
.footer{
  padding: 18px 16px;
}
.footer-fixed{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  z-index: 900;

  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,0,0,.08);
}
.footer-inner{
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  text-align:center;
}
.footer-brand{ font-weight: 900; font-size: 20px; }
.footer-links{ margin-top: 6px; display:flex; justify-content:center; gap: 18px; }
.footer-links a{ color: #333; text-decoration: none; }
.footer-copy{ margin-top: 6px; color: #666; font-size: 13px; }

.bottom-spacer{ height: 28px; }

/* Anchors inside a scroll container */
#about, #gallery, #contact{ scroll-margin-top: 24px; }

/* Mobile fallback: normal page scroll, footer not fixed, no fixed background */
@media (max-width: 900px){
  body{ background-attachment: scroll; }

  .frame{
    height: auto;
    padding-bottom: 0;
  }

  .content{
    height: auto;
    overflow: visible;
  }

  .footer-fixed{
    position: static;
    height: auto;
    background: rgba(255,255,255,.95);
    backdrop-filter: none;
  }

  .muted{ color: rgba(255,255,255,.78); }
}
