:root {
  --terracotta: #C45535;
  --terracotta-light: #D4673F;
  --sage: #789982;
  --aqua: #4A90E2;
  --anthracite: #2C3E50;
  --anthracite-deep: #1a2634;
  --off-white: #F5F5F5;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--anthracite-deep); color: #F5F5F5; font-family: 'Montserrat', sans-serif; overflow-x: hidden; }
::selection { background: rgba(196,85,53,0.85); color:#fff; }

/* Scroll progress bar */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--terracotta), var(--sage), var(--aqua));
  z-index: 100; transition: width 0.1s linear; box-shadow: 0 0 12px rgba(196,85,53,0.6);
}

/* Glassmorphism */
.glass {
  background: rgba(44, 62, 80, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass-strong {
  background: rgba(26, 38, 52, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Gradient text */
.text-gradient-terra {
  background: linear-gradient(135deg, #C45535, #e07050);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-aqua {
  background: linear-gradient(135deg, #4A90E2, #789982);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-tri {
  background: linear-gradient(110deg, #C45535 0%, #D4673F 30%, #789982 65%, #4A90E2 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Particle canvas */
#particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.35; }

/* Nav */
#navbar { transition: all 0.4s ease; }
#navbar.scrolled {
  background: rgba(26, 38, 52, 0.92) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}

/* ============ HERO (full-bleed photo) ============ */
.hero-photo { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg img, .hero-bg video {
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  from { transform: scale(1.05) translate(0,0); }
  to   { transform: scale(1.18) translate(-1.5%, -2%); }
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(15,22,30,0.72) 0%, rgba(15,22,30,0.35) 35%, rgba(15,22,30,0.55) 70%, rgba(15,22,30,0.95) 100%),
    radial-gradient(120% 80% at 20% 20%, rgba(196,85,53,0.18), transparent 60%);
}
.hero-grain { position:absolute; inset:0; z-index:2; opacity:0.5; pointer-events:none;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px); }

/* Hero grid (legacy / inner pages) */
.hero-grid {
  background-image:
    linear-gradient(rgba(74,144,226,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,144,226,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
/* page header photo band */
.page-hero { position: relative; overflow: hidden; }
.page-hero .ph-bg { position:absolute; inset:0; z-index:0; }
.page-hero .ph-bg img { width:100%; height:100%; object-fit:cover; transform: scale(1.05); }
.page-hero .ph-overlay { position:absolute; inset:0; z-index:1;
  background: linear-gradient(180deg, rgba(15,22,30,0.80), rgba(15,22,30,0.70) 50%, rgba(26,38,52,1) 100%); }

/* ============ Parallax banner ============ */
.parallax { position: relative; overflow: hidden; }
.parallax .px-img { position:absolute; inset:-12% 0; z-index:0; }
.parallax .px-img img { width:100%; height:124%; object-fit:cover; will-change: transform; }
.parallax .px-overlay { position:absolute; inset:0; z-index:1;
  background: linear-gradient(180deg, rgba(26,38,52,0.92), rgba(26,38,52,0.55) 50%, rgba(26,38,52,0.92)); }

/* ============ Image cards ============ */
.img-card { position: relative; overflow: hidden; border-radius: 1.25rem; }
.img-card img { width:100%; height:100%; object-fit:cover; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.img-card:hover img { transform: scale(1.08); }
.img-card .ic-grad { position:absolute; inset:0;
  background: linear-gradient(0deg, rgba(15,22,30,0.92) 0%, rgba(15,22,30,0.15) 55%, transparent 100%); }

/* ============ Gallery ============ */
.gallery-item { position: relative; overflow: hidden; border-radius: 1rem; cursor: pointer; }
.gallery-item img { width:100%; height:100%; object-fit:cover; transition: transform 0.8s cubic-bezier(.2,.7,.2,1); display:block; }
.gallery-item:hover img { transform: scale(1.12); }
.gallery-item::after {
  content: ''; position:absolute; inset:0;
  background: linear-gradient(0deg, rgba(196,85,53,0.0), rgba(196,85,53,0.0));
  transition: background 0.4s ease;
}
.gallery-item:hover::after { background: linear-gradient(0deg, rgba(15,22,30,0.5), rgba(196,85,53,0.12)); }
.gallery-item .gi-plus {
  position:absolute; bottom:12px; right:12px; width:36px; height:36px; border-radius:50%;
  background: rgba(196,85,53,0.9); display:flex; align-items:center; justify-content:center;
  opacity:0; transform: translateY(8px); transition: all 0.4s ease; z-index:2;
}
.gallery-item:hover .gi-plus { opacity:1; transform: translateY(0); }

/* Lightbox */
#lightbox {
  position: fixed; inset:0; z-index: 200; display:none;
  background: rgba(10,15,20,0.94); backdrop-filter: blur(8px);
  align-items:center; justify-content:center; padding: 4vw;
}
#lightbox.open { display:flex; animation: lbfade 0.3s ease; }
@keyframes lbfade { from{opacity:0} to{opacity:1} }
#lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,0.6); }
#lightbox .lb-close { position:absolute; top:24px; right:28px; color:#fff; font-size:34px; cursor:pointer; line-height:1; opacity:0.8; }
#lightbox .lb-close:hover { opacity:1; }
#lightbox .lb-nav { position:absolute; top:50%; transform:translateY(-50%); color:#fff; font-size:46px; cursor:pointer; opacity:0.6; padding:0 18px; user-select:none; }
#lightbox .lb-nav:hover { opacity:1; }
#lightbox .lb-prev { left:8px; } #lightbox .lb-next { right:8px; }

/* ============ Marquee ============ */
.marquee { overflow:hidden; white-space:nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display:inline-flex; gap:3rem; align-items:center; animation: marquee 28s linear infinite; }
.marquee-track span { font-weight:900; text-transform:uppercase; letter-spacing:0.08em; font-size:1.5rem; color: rgba(245,245,245,0.18); display:inline-flex; align-items:center; gap:3rem; }
.marquee-track span::after { content:'\25C6'; color: var(--terracotta); font-size:0.7rem; }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* Video frame */
.video-frame { position:relative; border-radius: 1.5rem; overflow:hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.5); border:1px solid rgba(255,255,255,0.1); }
.video-frame video, .video-frame img.poster { width:100%; display:block; aspect-ratio:16/9; object-fit:cover; }
.play-btn {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:3;
  background: linear-gradient(0deg, rgba(15,22,30,0.55), rgba(15,22,30,0.15));
  transition: background 0.4s ease;
}
.play-btn:hover { background: linear-gradient(0deg, rgba(15,22,30,0.4), rgba(196,85,53,0.12)); }
.play-btn .pb-core { width:84px; height:84px; border-radius:50%; background: rgba(196,85,53,0.95);
  display:flex; align-items:center; justify-content:center; box-shadow: 0 0 0 0 rgba(196,85,53,0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(196,85,53,0.45)} 70%{box-shadow:0 0 0 24px rgba(196,85,53,0)} 100%{box-shadow:0 0 0 0 rgba(196,85,53,0)} }

/* Animated underline */
.underline-terra { position: relative; }
.underline-terra::after { content:''; position:absolute; bottom:-6px; left:0; width:60px; height:3px; background: var(--terracotta); border-radius:2px; }

/* Cards hover */
.card-hover { transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease, border-color 0.35s ease; }
.card-hover:hover { transform: translateY(-8px); box-shadow: 0 28px 70px rgba(0,0,0,0.45); }

/* Stat counter */
.stat-number { font-variant-numeric: tabular-nums; }

/* ============ Reveal animations ============ */
.fade-up, .reveal { opacity: 0; transform: translateY(44px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.fade-up.visible, .reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity:0; transform: translateX(-50px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal-left.visible { opacity:1; transform:translateX(0); }
.reveal-right { opacity:0; transform: translateX(50px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal-right.visible { opacity:1; transform:translateX(0); }
.reveal-scale { opacity:0; transform: scale(0.9); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal-scale.visible { opacity:1; transform:scale(1); }

/* Glow accents */
.glow-terra { box-shadow: 0 0 40px rgba(196,85,53,0.25); }
.glow-aqua { box-shadow: 0 0 40px rgba(74,144,226,0.2); }

/* Button styles */
.btn-primary {
  background: linear-gradient(135deg, #C45535, #D4673F);
  color: white; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.btn-primary::before { content:''; position:absolute; inset:0; background: linear-gradient(135deg, #D4673F, #C45535); opacity:0; transition: opacity 0.3s; }
.btn-primary::after {
  content:''; position:absolute; top:0; left:-120%; width:60%; height:100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg); transition: left 0.6s ease;
}
.btn-primary:hover::before { opacity:1; }
.btn-primary:hover::after { left: 140%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(196,85,53,0.45); }
.btn-primary span { position: relative; z-index: 1; }

.btn-outline { border: 1.5px solid rgba(255,255,255,0.3); color: white; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; transition: all 0.3s ease; }
.btn-outline:hover { border-color: var(--aqua); color: var(--aqua); transform: translateY(-2px); }

/* Divider */
.divider-terra { width: 48px; height: 3px; background: var(--terracotta); border-radius: 2px; }
.divider-aqua { width: 48px; height: 3px; background: var(--aqua); border-radius: 2px; }
.divider-sage { width: 48px; height: 3px; background: var(--sage); border-radius: 2px; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* Scroll indicator */
.scroll-dot { animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)}50%{transform:translateY(8px)} }

/* Noise texture overlay */
body::before {
  content:''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.4;
}

/* Active nav link */
.nav-active { color: #fff !important; }
.nav-active::after { content:''; display:block; height:2px; margin-top:3px; border-radius:2px; background: var(--terracotta); }

/* Responsive nav */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: rgba(26,38,52,0.97); padding: 24px; gap: 20px; }
  .marquee-track span { font-size: 1.1rem; }
}

/* ============ Before / After slider ============ */
.ba-slider {
  position: relative; width: 100%; aspect-ratio: 3/2; --pos: 50%;
  border-radius: 1.5rem; overflow: hidden; touch-action: none;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
}
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-slider .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 14px rgba(0,0,0,0.55); pointer-events: none; z-index: 3; }
.ba-knob { position: absolute; top: 50%; left: var(--pos); transform: translate(-50%,-50%); width: 48px; height: 48px; border-radius: 50%; background: var(--terracotta); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 18px rgba(0,0,0,0.45); pointer-events: none; z-index: 4; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 5; }
.ba-tag { position: absolute; bottom: 16px; padding: 6px 14px; border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; z-index: 2; pointer-events: none; }
.ba-tag.l { left: 16px; background: rgba(196,85,53,0.88); }
.ba-tag.r { right: 16px; background: rgba(120,153,130,0.9); }

@media (prefers-reduced-motion: reduce) {
  .fade-up, .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; transition: none; }
  #particles { display: none; }
  .scroll-dot, .play-btn .pb-core, .marquee-track { animation: none; }
  .hero-bg img, .hero-bg video { animation: none; }
  .card-hover:hover, .btn-primary:hover, .img-card:hover img, .gallery-item:hover img { transform: none; }
}

/* Portrait (vertical) film frame */
.video-frame.portrait { max-width: 400px; margin-left: auto; margin-right: auto; aspect-ratio: 9/16; }
.video-frame.portrait video, .video-frame.portrait img.poster { aspect-ratio: 9/16; }
