/* ============================================================
   AutoDMV Productions
   ============================================================ */

:root {
  --navy:      #14305c;
  --navy-dark: #0c1f3e;
  --navy-tint: rgba(20,48,92,0.09);
  --ink:       #111720;
  --gray:      #6b7280;
  --gray-lt:   #9ca3af;
  --line:      #e4e6ea;
  --bg:        #f9f9f8;
  --white:     #ffffff;
  --hero-bg:   #0a0f1a;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Archivo', 'Inter', sans-serif;
}

/* Prevent class-based display from overriding [hidden] */
[hidden] { display: none !important; }

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  animation: pageFade 0.6s ease 0.05s both;
}

@keyframes pageFade { from{opacity:0} to{opacity:1} }

/* ---- Header ---- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.5rem,5vw,4rem);
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(249,249,248,0.94);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.07em;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  transition: color 0.3s;
}

.brand { color: rgba(255,255,255,0.92); }
.site-header.scrolled .brand { color: var(--ink); }

.brand span { color: #5b8ee6; }
.site-header.scrolled .brand span { color: var(--navy); }

.brand em {
  font-style: normal;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.65;
}

.site-nav { display:flex; align-items:center; gap:1.75rem; }

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  color: rgba(255,255,255,0.82);
  transition: color 0.3s;
}

.site-header.scrolled .nav-link { color: var(--ink); }

.nav-link::after {
  content:''; position:absolute; left:0; bottom:-2px;
  width:0; height:1.5px;
  background: currentColor;
  transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width:100%; }

.nav-cta {
  border: 1.5px solid rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.92) !important;
  padding: 0.5rem 1.15rem;
  border-radius: 3px;
  transition: background 0.3s, border-color 0.3s, color 0.3s !important;
}
.nav-cta::after { display:none; }
.nav-cta:hover { background: rgba(255,255,255,0.15); }

.site-header.scrolled .nav-cta {
  border-color: var(--navy);
  color: var(--navy) !important;
}
.site-header.scrolled .nav-cta:hover,
.site-header.scrolled .nav-cta.active {
  background: var(--navy);
  color: var(--white) !important;
}

/* Instagram nav icon */
.nav-instagram {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.82) !important;
  padding-bottom: 0;
  opacity: 0.82;
  transition: opacity 0.3s;
}
.nav-instagram::after { display:none; }
.nav-instagram:hover { opacity: 1; }
.nav-instagram svg { width:20px; height:20px; }
.site-header.scrolled .nav-instagram { color: var(--ink) !important; opacity: 0.65; }
.site-header.scrolled .nav-instagram:hover { opacity: 1; }

/* Footer instagram link */
.footer-instagram {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: color 0.25s;
}
.footer-instagram:hover { color: #fff; }
.footer-instagram svg { width:16px; height:16px; flex-shrink:0; }

/* ---- Hero ---- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--hero-bg);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/full/z06-1.jpg');
  background-size: cover;
  background-position: center 40%;
  opacity: 0.32;
  transform: scale(1.04);
  animation: heroBgDrift 18s ease-in-out infinite alternate;
}

@keyframes heroBgDrift {
  from { transform: scale(1.04) translateX(0); }
  to   { transform: scale(1.08) translateX(-1.5%); }
}

.hero::after {
  content:'';
  position:absolute; inset:0;
  background: radial-gradient(ellipse at 60% 50%, transparent 30%, rgba(8,13,26,0.55) 100%);
  pointer-events:none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(7rem,15vw,10rem) clamp(1.5rem,6vw,5rem) clamp(5rem,10vw,7rem);
  max-width: 800px;
}

.hero-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #5b8ee6;
  margin-bottom: 1.4rem;
}

.hero-headline {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(3rem,8vw,6.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 2.5rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 3px;
  transition: background 0.3s, transform 0.2s;
}
.hero-btn:hover { background: #1e47a0; transform: translateY(-1px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: clamp(1.5rem,6vw,5rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.45);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: scrollFade 2.5s ease 1.5s both;
}

@keyframes scrollFade {
  0%   { opacity:0; transform:translateY(-8px); }
  40%  { opacity:1; transform:translateY(0); }
  80%  { opacity:1; }
  100% { opacity:0; }
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollLine 2.5s ease 1.5s infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- Section label ---- */

.section-label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(3rem,7vw,5rem) clamp(1.5rem,5vw,4rem) clamp(1.5rem,3vw,2.5rem);
}

.section-rule { flex:1; height:1px; background:var(--line); }

.section-text {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray);
  white-space: nowrap;
}

/* ---- Gallery grid ---- */

.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem,5vw,4rem) clamp(3rem,7vw,5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem,1.8vw,1.25rem);
}

.project-card {
  position: relative;
  display: block;
  border: none;
  padding: 0;
  background: #1a1f2e;
  cursor: pointer;
  overflow: hidden;
  border-radius: 5px;
  aspect-ratio: 4 / 3;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease, box-shadow 0.4s ease;
}

.project-card.visible { opacity:1; transform:translateY(0); }

.project-card.featured {
  grid-column: span 2;
  aspect-ratio: 3 / 2;
}

/* RS7 (2nd card): height is pixel-synced to the featured card via JS */
.gallery > .project-card:nth-child(2) {
  aspect-ratio: unset;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2,0.6,0.2,1), opacity 0.4s ease;
  opacity: 0.9;
}

.project-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.22); }
.project-card:hover img { transform: scale(1.05); opacity: 1; }

.project-card::after {
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(to top, rgba(8,13,26,0.85) 0%, rgba(8,13,26,0.2) 45%, transparent 70%);
  pointer-events:none;
  transition: opacity 0.4s ease;
}
.project-card:hover::after { opacity: 0.8; }

.card-meta {
  position: absolute;
  left:1.25rem; right:1.25rem; bottom:1.1rem;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--white);
  transform: translateY(4px);
  transition: transform 0.4s ease;
}
.project-card:hover .card-meta { transform: translateY(0); }

.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.project-card.featured .card-title { font-size: 1.4rem; }

.card-count {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.4s ease;
  background: var(--navy);
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
}
.project-card:hover .card-count { opacity: 1; }
.project-card:focus-visible { outline: 3px solid #5b8ee6; outline-offset: 3px; }

/* ---- Serving strip ---- */

.serving-strip {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem,5vw,4rem) clamp(1.5rem,3vw,2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.serving-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
}
.serving-locations { font-size: 0.78rem; color: var(--gray-lt); }

/* ---- CTA strip ---- */

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto clamp(3rem,7vw,5rem);
  padding: 2.5rem clamp(1.5rem,5vw,4rem);
  background: var(--navy-dark);
  border-radius: 6px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s both;
}
.cta-strip p {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.1rem,2.5vw,1.6rem);
  color: var(--white);
  letter-spacing: -0.01em;
}
.cta-strip-btn {
  flex-shrink: 0;
  display: inline-block;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 3px;
  transition: background 0.3s, border-color 0.3s;
}
.cta-strip-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.8); }

/* ============================================================
   Project View (Cars & Bids style)
   ============================================================ */

.project-view {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #080b12;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-view.open { opacity: 1; }

/* Header bar */
.pv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  min-height: 56px;
  background: #0d1018;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  gap: 1rem;
}

.pv-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.65);
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0;
  white-space: nowrap;
  transition: color 0.2s;
}
.pv-back:hover { color: #fff; }
.pv-back svg { width:16px; height:16px; flex-shrink:0; }

.pv-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.02em;
  text-align: center;
  flex: 1;
}

.pv-counter {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  min-width: 3.5rem;
  text-align: right;
}

/* Main image area */
.pv-main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.pv-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: block;
}
.pv-img.show { opacity: 1; }

.pv-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  user-select: none;
}
.pv-arrow:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.pv-prev { left: 1rem; }
.pv-next { right: 1rem; }

/* Thumbnail strip */
.pv-thumbs {
  height: 96px;
  min-height: 96px;
  background: #0d1018;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.pv-thumbs::-webkit-scrollbar { height: 4px; }
.pv-thumbs::-webkit-scrollbar-track { background: transparent; }
.pv-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 2px; }

.pv-thumb {
  height: 70px;
  min-width: 105px;
  width: 105px;
  object-fit: cover;
  border-radius: 3px;
  opacity: 0.45;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.pv-thumb:hover { opacity: 0.75; }
.pv-thumb.active { opacity: 1; border-color: #5b8ee6; }

body.pv-open { overflow: hidden; }

/* ---- Footer ---- */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1.5rem,5vw,4rem);
  font-size: 0.82rem;
}
.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
}
.footer-brand span { color: #5b8ee6; }
.footer-copy { display:none; }
.footer-link { color: rgba(255,255,255,0.55); text-decoration:none; font-weight:500; letter-spacing:0.04em; transition:color 0.25s; }
.footer-link:hover { color: #fff; }

/* ---- Book page intro ---- */

.book-hero {
  background: var(--hero-bg);
  padding: clamp(8rem,15vw,11rem) clamp(1.5rem,6vw,5rem) clamp(3rem,5vw,4rem);
}
.book-hero .hero-kicker { color: #5b8ee6; }
.book-hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.5rem,6vw,5rem);
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0.75rem 0 1rem;
}
.book-hero p { color: rgba(255,255,255,0.55); font-size: 1rem; max-width: 500px; font-weight: 300; }

/* ---- Booking form ---- */

.booking {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(3rem,7vw,5rem) clamp(1.5rem,5vw,4rem) clamp(4rem,8vw,6rem);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.field { margin-bottom: 1.75rem; }
.field-row .field { margin-bottom: 0; }

.field label {
  display:block;
  font-size:0.8rem;
  font-weight:600;
  letter-spacing:0.06em;
  text-transform: uppercase;
  margin-bottom:0.55rem;
  color:var(--ink);
}

.req { color:var(--navy); }
.optional { font-weight:400; text-transform:none; letter-spacing:0; color:var(--gray); font-size:0.75rem; }

.field input, .field textarea, .field select {
  width:100%;
  padding:0.9rem 1rem;
  font-family:var(--font-body);
  font-size:1rem;
  color:var(--ink);
  background:var(--white);
  border:1.5px solid var(--line);
  border-radius:4px;
  transition: border-color 0.25s, box-shadow 0.25s;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.field textarea { resize:vertical; }
.field input::placeholder, .field textarea::placeholder { color:#c0c4cc; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline:none;
  border-color:var(--navy);
  box-shadow: 0 0 0 3px var(--navy-tint);
}
.field.invalid input, .field.invalid select { border-color:#c0392b; }

/* Session type items (checkbox-style cards, no checkbox input) */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.checkbox-item {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.2s, background 0.2s;
}
.checkbox-item:hover { border-color: #b0bfd8; background: #f4f6fa; }
.checkbox-item.checked {
  background: #e8f1ff;
  border-color: #5b8ee6;
}
.checkbox-label { display: flex; flex-direction: column; gap: 0.15rem; }
.checkbox-label strong { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.checkbox-label span { font-size: 0.78rem; color: var(--gray); }

.error-msg { display:none; font-size:0.78rem; color:#c0392b; margin-top:0.4rem; }
.field.invalid .error-msg { display:block; }

.submit-btn {
  display:inline-block;
  background:var(--navy);
  color:var(--white);
  font-family:var(--font-head);
  font-weight:700;
  font-size:0.88rem;
  letter-spacing:0.12em;
  text-transform:uppercase;
  border:none; border-radius:4px;
  padding:1rem 2.5rem;
  cursor:pointer;
  transition:background 0.3s, transform 0.2s;
}
.submit-btn:hover { background:var(--navy-dark); }
.submit-btn:active { transform:scale(0.98); }
.submit-btn:disabled { opacity:0.6; cursor:wait; }

.form-status { margin-top:1.1rem; font-size:0.95rem; display:none; }
.form-status.success { display:block; color:#1a6b3a; }
.form-status.error   { display:block; color:#c0392b; }

.form-note { margin-top:1.25rem; font-size:0.78rem; color:var(--gray); }

/* ---- Fade helpers ---- */

.fade-item {
  opacity:0;
  transform:translateY(16px);
  animation: fadeUp 0.9s ease 0.15s both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2,1fr); }
  .project-card.featured { grid-column:span 2; }
  .gallery > .project-card:nth-child(2) { aspect-ratio: 4/3; }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
  .project-card.featured { grid-column:span 1; aspect-ratio: 4/3; }
  .gallery > .project-card:nth-child(2) { aspect-ratio: 4/3; }
  .brand em { display:none; }
  .site-nav { gap:1rem; }
  .nav-cta { padding:0.4rem 0.8rem; }
  .pv-arrow { width:40px; height:40px; font-size:1.5rem; }
  .cta-strip { flex-direction:column; text-align:center; gap:1.25rem; }
  .site-footer { flex-direction:column; text-align:center; gap:0.6rem; }
  .serving-strip { justify-content:center; text-align:center; }
  .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
}
