/* =========================================================
   style.css  –  Flavis Premium Advertisement
   ========================================================= */

/* ── 1. Reset & Variables ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:          #d42b2b;
  --red-deep:     #8b0000;
  --red-bright:   #ff3b3b;
  --red-glow:     rgba(212, 43, 43, 0.55);
  --red-subtle:   rgba(212, 43, 43, 0.12);
  --gold:         #c9a84c;
  --bg:           #080808;
  --bg2:          #0e0e0e;
  --text:         #f5f0eb;
  --muted:        rgba(245, 240, 235, 0.5);
  --font-sans:    'Outfit', system-ui, sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;
  --nav-h:        72px;
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── 2. NAVBAR ───────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(8, 8, 8, 0);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
}

.navbar.scrolled {
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(20px);
  border-color: rgba(255,255,255,0.06);
}

.nav-logo {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  color: var(--text);
  cursor: default;
}

.nav-logo-f { color: var(--red); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 0 0 var(--red-glow);
}

.nav-cta:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--red-glow);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .navbar { padding: 0 20px; }
}

/* ── 3. LOADER ───────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loader-brand {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: 0.3em;
  color: var(--text);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s var(--ease-out) forwards;
}

.lb-f { color: var(--red); }

.loader-ring {
  width: 100px;
  height: 100px;
}

.loader-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track { fill: none; stroke: #1a1a1a; stroke-width: 6; }

.ring-fill {
  fill: none;
  stroke: var(--red);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 0.12s linear;
  filter: drop-shadow(0 0 8px var(--red-glow));
}

.loader-pct {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.loader-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 4. SCROLL TRACK ─────────────────────────────────── */
#scroll-track { position: relative; }

/* ── 5. STICKY PIN WRAP ──────────────────────────────── */
.pin-wrap {
  position: sticky;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* ── 6. FRAME IMAGE ──────────────────────────────────── */
#frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  will-change: contents;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ── 7. VIGNETTE ─────────────────────────────────────── */
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.65) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 25%, transparent 65%, rgba(0,0,0,0.6) 100%);
  z-index: 2;
}

/* ── 8. SCROLL OVERLAYS ──────────────────────────────── */
.overlay {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

/* Shared fade-up entry */
.overlay.visible {
  opacity: 1;
  transform: translateY(0) !important;
}

/* Phase 1 — top-left */
.phase-1 {
  top: 50%;
  left: 7%;
  transform: translateY(calc(-50% + 20px));
}

/* Phase 2 — centered */
.phase-2 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 20px));
  text-align: center;
}

/* Phase 3 — centered big */
.phase-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 20px));
  text-align: center;
}

/* Eyebrow label */
.ov-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 14px;
  text-shadow: 0 0 20px var(--red-glow);
}

/* Large overlay headline */
.ov-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,0,0.7);
}

.ov-headline em {
  color: var(--red-bright);
  font-style: italic;
}

.ov-sub {
  margin-top: 20px;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  font-weight: 300;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

/* Phase 3 big brand name */
.ov-big-brand {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(5rem, 15vw, 13rem);
  letter-spacing: 0.18em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,0.85);
  text-shadow: 0 0 80px var(--red-glow);
  line-height: 1;
}

.ov-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 2rem);
  color: var(--red-bright);
  letter-spacing: 0.08em;
  margin-top: 8px;
  text-shadow: 0 0 30px var(--red-glow);
}

/* ── 9. SCROLL HINT ──────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.scroll-hint.hidden { opacity: 0; }

.hint-icon {
  font-size: 1.4rem;
  color: #fff;
  animation: bounce 1.8s ease-in-out infinite;
}

.hint-text {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(9px); }
}

/* ── 10. BANNER SECTION ──────────────────────────────── */
.banner-section {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 120px 8%;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.banner-section::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--red-subtle) 0%, transparent 70%);
  pointer-events: none;
}

.banner-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}

.banner-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 28px;
}

.banner-text {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
  line-height: 1.8;
  max-width: 500px;
}

/* Right column glow circle */
.banner-img-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-glow {
  width: clamp(260px, 35vw, 460px);
  height: clamp(260px, 35vw, 460px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #c0392b 0%, #7b0000 55%, #1a0000 100%);
  box-shadow:
    0 0 80px 20px rgba(180, 30, 30, 0.4),
    0 0 160px 60px rgba(120, 0, 0, 0.2);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 80px 20px rgba(180,30,30,0.4), 0 0 160px 60px rgba(120,0,0,0.2); transform: scale(1); }
  50%       { box-shadow: 0 0 120px 40px rgba(212,43,43,0.5), 0 0 240px 80px rgba(180,0,0,0.25); transform: scale(1.04); }
}

@media (max-width: 900px) {
  .banner-section { grid-template-columns: 1fr; padding: 80px 6%; text-align: center; }
  .banner-img-col { margin-top: 40px; }
  .banner-text { margin: 0 auto; }
}

/* ── 11. FEATURES SECTION ────────────────────────────── */
.features-section {
  padding: 120px 8%;
  background: var(--bg2);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.features-section::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--red-subtle) 0%, transparent 70%);
}

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 64px;
  color: var(--text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.feat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 40px 28px;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
  cursor: default;
}

.feat-card:hover {
  border-color: rgba(212, 43, 43, 0.35);
  background: rgba(212, 43, 43, 0.06);
  transform: translateY(-6px);
}

.feat-icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
  display: block;
}

.feat-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.feat-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── 12. CTA SECTION ─────────────────────────────────── */
.cta-section {
  position: relative;
  padding: 140px 24px;
  text-align: center;
  background: var(--bg);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,0,0,0.18) 0%, transparent 70%);
  pointer-events: none;
  animation: pulseGlow 5s ease-in-out infinite;
}

.cta-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
  position: relative;
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 24px;
  position: relative;
}

.cta-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  margin-bottom: 48px;
  position: relative;
  line-height: 1.6;
}

.cta-sub strong { color: var(--text); font-weight: 600; }

.cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 32px;
}

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 18px 40px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.3s, transform 0.25s, box-shadow 0.3s;
  box-shadow: 0 0 0 0 var(--red-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  background: var(--red-bright);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 50px var(--red-glow);
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary svg {
  transition: transform 0.25s var(--ease-out);
}
.btn-primary:hover svg { transform: translateX(4px); }

/* Ghost button */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  padding: 17px 36px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.18);
  transition: border-color 0.3s, background 0.3s, transform 0.25s;
}

.btn-ghost:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.cta-note {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  position: relative;
}

/* ── 13. FOOTER ──────────────────────────────────────── */
.site-footer {
  background: #050505;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  color: var(--text);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--text); }

@media (max-width: 640px) {
  .site-footer { flex-direction: column; align-items: center; text-align: center; }
}

/* ── 14. SCROLL-REVEAL (after-animation sections) ────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── 15. AUTOPLAY BUTTON ─────────────────────────────── */
#autoplay-btn {
  position: fixed;
  bottom: 36px;
  right: 36px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 10, 10, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 13px 22px 13px 18px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.25s var(--ease-out),
    box-shadow 0.3s ease;
  /* Start hidden — revealed after loader */
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

/* Revealed after loading */
#autoplay-btn.ready {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

#autoplay-btn:hover {
  background: rgba(212, 43, 43, 0.18);
  border-color: rgba(212, 43, 43, 0.55);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(212, 43, 43, 0.3);
}

#autoplay-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Playing state — full red */
#autoplay-btn.playing {
  background: rgba(212, 43, 43, 0.22);
  border-color: rgba(212, 43, 43, 0.6);
  box-shadow: 0 0 0 0 var(--red-glow);
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 43, 43, 0.5); }
  50%       { box-shadow: 0 0 0 10px rgba(212, 43, 43, 0); }
}

.ap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--red-bright);
  flex-shrink: 0;
}

.ap-icon svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s var(--ease-out);
}

#autoplay-btn:hover .ap-icon svg {
  transform: scale(1.15);
}

.ap-label {
  white-space: nowrap;
  color: var(--text);
}

@media (max-width: 480px) {
  #autoplay-btn {
    bottom: 24px;
    right: 20px;
    padding: 12px 18px 12px 14px;
    font-size: 0.8rem;
  }
}

/* ── 16. Reduced Motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hint-icon, .circle-glow, .cta-glow { animation: none; }
  .overlay, #loader, .reveal { transition: none; }
}
