/* ============================================================
   BEND FC — PRIVATE INVESTMENT OPPORTUNITY
   World-class investor presentation website
   ============================================================ */

:root {
  --gold:       #C9A84C;
  --gold-light: #E8C96A;
  --gold-dark:  #A8883A;
  --black:      #0A0A0A;
  --gray-dark:  #141414;
  --gray:       #1E1E1E;
  --gray-mid:   #2A2A2A;
  --white:      #FFFFFF;
  --off-white:  #F0EDE8;
  --muted:      #888888;
  --nav-h:      64px;
  --foot-h:     52px;
  --trans-fast: 0.2s cubic-bezier(0.4,0,0.2,1);
  --trans-med:  0.45s cubic-bezier(0.4,0,0.2,1);
  --trans-slow: 0.7s cubic-bezier(0.16,1,0.3,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Barlow', sans-serif;
  overflow: hidden;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── LOADER ─────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.loader-badge {
  width: 100px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(0.95); }
}
.loader-bar {
  width: 240px; height: 2px;
  background: var(--gray-mid);
  border-radius: 2px;
  overflow: hidden;
}
.loader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  width: 0%;
  animation: loadBar 1.8s ease forwards;
}
@keyframes loadBar {
  0% { width: 0%; }
  60% { width: 80%; }
  100% { width: 100%; }
}
.loader-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; letter-spacing: 4px;
  color: var(--gold); font-weight: 600;
}

/* ── NAV ─────────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  position: relative;
}
.nav-logo {
  height: 38px; width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.3));
}
.nav-title {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1; min-width: 0;
}
.nav-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px; font-weight: 800; letter-spacing: 2px;
  color: var(--gold); line-height: 1;
}
.nav-sub {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.nav-controls {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.nav-btn {
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold); width: 34px; height: 34px;
  border-radius: 6px; cursor: pointer; font-size: 16px;
  transition: var(--trans-fast);
  display: flex; align-items: center; justify-content: center;
}
.nav-btn:hover { background: rgba(201,168,76,0.25); border-color: var(--gold); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.slide-counter {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--white); letter-spacing: 1px;
  min-width: 50px; text-align: center;
}

/* Progress bar */
.nav-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: rgba(255,255,255,0.05);
}
.nav-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width 0.4s ease;
  width: 7.7%; /* 1/13 */
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; left: 0; top: var(--nav-h); bottom: var(--foot-h);
  width: 180px; z-index: 90;
  background: rgba(10,10,10,0.97);
  border-right: 1px solid rgba(201,168,76,0.15);
  transform: translateX(-100%);
  transition: transform var(--trans-med);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-mid) transparent;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  padding: 14px 12px 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; letter-spacing: 3px;
  color: var(--gold); font-weight: 700;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.thumb-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; }

.thumb-item {
  position: relative; cursor: pointer;
  border-radius: 4px; overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--trans-fast), transform var(--trans-fast);
  aspect-ratio: 16/9;
}
.thumb-item:hover { border-color: rgba(201,168,76,0.4); transform: scale(1.02); }
.thumb-item.active { border-color: var(--gold); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-num {
  position: absolute; bottom: 3px; right: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 700;
  color: var(--white); background: rgba(0,0,0,0.6);
  padding: 1px 4px; border-radius: 2px;
}

.sidebar-toggle {
  position: fixed; left: 0; top: calc(var(--nav-h) + 16px); z-index: 95;
  background: rgba(10,10,10,0.9);
  border: 1px solid rgba(201,168,76,0.3);
  border-left: none;
  color: var(--gold); width: 32px; height: 32px;
  border-radius: 0 6px 6px 0;
  cursor: pointer; font-size: 18px;
  transition: var(--trans-fast);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle:hover { background: rgba(201,168,76,0.15); }
.sidebar.open ~ .sidebar-toggle { left: 180px; }

/* ── MAIN STAGE ──────────────────────────────────────────── */
#stage {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  bottom: var(--foot-h);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--black);
}

.slides-container {
  position: relative;
  width: 100%; height: 100%;
  perspective: 1200px;
}

/* Each slide */
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.slide.active {
  opacity: 1;
  pointer-events: all;
  z-index: 2;
}
.slide.exiting { z-index: 1; }

.slide-img-wrap {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 40px;
}
.slide-img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow:
    0 25px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(201,168,76,0.1);
  transition: box-shadow 0.5s ease;
}
.slide.active .slide-img {
  box-shadow:
    0 30px 100px rgba(0,0,0,0.8),
    0 0 0 1px rgba(201,168,76,0.2),
    0 0 40px rgba(201,168,76,0.05);
}

/* Slide number label */
.slide-label {
  position: absolute;
  bottom: 12px; right: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; letter-spacing: 2px; font-weight: 600;
  color: rgba(201,168,76,0.5);
  pointer-events: none;
}

/* ── TRANSITION ANIMATIONS ────────────────────────────────── */

/* NEXT: current slides out left, new slides in from right */
.slide.exit-left {
  animation: exitLeft 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.slide.enter-right {
  animation: enterRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* PREV: current slides out right, new slides in from left */
.slide.exit-right {
  animation: exitRight 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.slide.enter-left {
  animation: enterLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes exitLeft {
  0%   { opacity: 1; transform: translateX(0) scale(1) rotateY(0deg); filter: brightness(1); }
  40%  { opacity: 0.8; transform: translateX(-8%) scale(0.88) rotateY(4deg); filter: brightness(0.6); }
  100% { opacity: 0; transform: translateX(-25%) scale(0.75) rotateY(8deg); filter: brightness(0.3); }
}
@keyframes enterRight {
  0%   { opacity: 0; transform: translateX(30%) scale(0.8) rotateY(-6deg); filter: brightness(0.3) blur(4px); }
  50%  { opacity: 0.7; filter: brightness(0.8) blur(0px); }
  100% { opacity: 1; transform: translateX(0) scale(1) rotateY(0deg); filter: brightness(1) blur(0px); }
}
@keyframes exitRight {
  0%   { opacity: 1; transform: translateX(0) scale(1) rotateY(0deg); filter: brightness(1); }
  40%  { opacity: 0.8; transform: translateX(8%) scale(0.88) rotateY(-4deg); filter: brightness(0.6); }
  100% { opacity: 0; transform: translateX(25%) scale(0.75) rotateY(-8deg); filter: brightness(0.3); }
}
@keyframes enterLeft {
  0%   { opacity: 0; transform: translateX(-30%) scale(0.8) rotateY(6deg); filter: brightness(0.3) blur(4px); }
  50%  { opacity: 0.7; filter: brightness(0.8) blur(0px); }
  100% { opacity: 1; transform: translateX(0) scale(1) rotateY(0deg); filter: brightness(1) blur(0px); }
}

/* ── HIT AREAS ───────────────────────────────────────────── */
.hit-prev, .hit-next {
  position: absolute; top: 0; bottom: 0; width: 12%;
  background: transparent; border: none; cursor: pointer;
  z-index: 10;
  display: flex; align-items: center;
  transition: background var(--trans-fast);
}
.hit-prev { left: 0; justify-content: flex-start; padding-left: 16px; }
.hit-next { right: 0; justify-content: flex-end; padding-right: 16px; }

.hit-prev::after, .hit-next::after {
  content: '';
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(201,168,76,0);
  border: 2px solid rgba(201,168,76,0);
  transition: var(--trans-fast);
  display: flex; align-items: center; justify-content: center;
}
.hit-prev:hover { background: linear-gradient(to right, rgba(201,168,76,0.06), transparent); }
.hit-next:hover { background: linear-gradient(to left, rgba(201,168,76,0.06), transparent); }

/* Arrow icons inside hit areas */
.hit-prev::before, .hit-next::before {
  content: '';
  width: 14px; height: 14px;
  border-top: 2px solid rgba(201,168,76,0.4);
  border-left: 2px solid rgba(201,168,76,0.4);
  transition: var(--trans-fast);
  position: absolute;
}
.hit-prev::before { transform: rotate(-45deg); left: 22px; }
.hit-next::before { transform: rotate(135deg); right: 22px; }
.hit-prev:hover::before, .hit-next:hover::before {
  border-color: var(--gold);
  transform: rotate(-45deg) scale(1.2);
}
.hit-next:hover::before { transform: rotate(135deg) scale(1.2); }

/* ── DOTS ────────────────────────────────────────────────── */
.dots {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 20;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer; transition: var(--trans-fast);
  border: 1px solid transparent;
}
.dot.active {
  background: var(--gold);
  width: 20px; border-radius: 3px;
}
.dot:hover:not(.active) { background: rgba(201,168,76,0.5); }

/* ── FULLSCREEN BTN ──────────────────────────────────────── */
.btn-fullscreen {
  position: fixed; bottom: calc(var(--foot-h) + 12px); right: 16px;
  z-index: 50;
  background: rgba(10,10,10,0.8);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold); width: 36px; height: 36px;
  border-radius: 6px; cursor: pointer;
  font-size: 16px; transition: var(--trans-fast);
  display: flex; align-items: center; justify-content: center;
}
.btn-fullscreen:hover { background: rgba(201,168,76,0.15); }

/* ── FOOTER CTA ──────────────────────────────────────────── */
#footer-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--foot-h); z-index: 100;
  background: rgba(10,10,10,0.96);
  border-top: 1px solid rgba(201,168,76,0.2);
  backdrop-filter: blur(12px);
}
.cta-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 0 20px;
}
.cta-text {
  font-size: 13px; color: var(--muted);
}
.cta-text strong { color: var(--white); }

.cta-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  padding: 6px 16px; border-radius: 4px;
  text-decoration: none; transition: var(--trans-fast);
  background: var(--gold);
  color: var(--black);
  border: 1px solid var(--gold);
}
.cta-btn:hover { background: var(--gold-light); }
.cta-btn--outline {
  background: transparent;
  color: var(--gold);
}
.cta-btn--outline:hover {
  background: rgba(201,168,76,0.15);
}

/* ── KEYBOARD HINT ───────────────────────────────────────── */
#key-hint {
  position: fixed; bottom: calc(var(--foot-h) + 14px); left: 50%;
  transform: translateX(-50%);
  font-size: 11px; color: rgba(255,255,255,0.25);
  letter-spacing: 0.5px; pointer-events: none;
  transition: opacity 1s ease;
  z-index: 40;
}
#key-hint.hidden { opacity: 0; }

/* ── TOUCH SWIPE INDICATOR ───────────────────────────────── */
.swipe-hint {
  position: fixed; bottom: calc(var(--foot-h) + 60px); left: 50%;
  transform: translateX(-50%);
  font-size: 11px; color: rgba(255,255,255,0.2);
  display: none;
}
@media (max-width: 768px) {
  .swipe-hint { display: block; }
  .hit-prev, .hit-next { display: none; }
  .dots { bottom: 10px; }
  .nav-sub { display: none; }
  .cta-text { display: none; }
  .sidebar { width: 160px; }
  .sidebar.open ~ .sidebar-toggle { left: 160px; }
  .slide-img-wrap { padding: 16px 20px; }
}

/* ── GOLD SHIMMER EFFECT ON ACTIVE SLIDE ─────────────────── */
@keyframes goldShimmer {
  0%   { opacity: 0; transform: translateX(-100%) rotate(25deg); }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(200%) rotate(25deg); }
}
.slide.active .slide-img-wrap::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 30%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.12), rgba(255,255,255,0.04), rgba(201,168,76,0.12), transparent);
  animation: goldShimmer 1.8s ease-in-out 0.3s forwards;
  pointer-events: none;
}

/* ── SLIDE ENTER GLOW ────────────────────────────────────── */
.slide.enter-right .slide-img,
.slide.enter-left .slide-img {
  animation: slideGlow 0.9s ease forwards;
}
@keyframes slideGlow {
  0%   { box-shadow: 0 0 60px rgba(201,168,76,0.4), 0 25px 80px rgba(0,0,0,0.9); }
  50%  { box-shadow: 0 0 80px rgba(201,168,76,0.25), 0 30px 100px rgba(0,0,0,0.8); }
  100% { box-shadow: 0 30px 100px rgba(0,0,0,0.8), 0 0 0 1px rgba(201,168,76,0.2), 0 0 40px rgba(201,168,76,0.05); }
}

/* ── GOAL CELEBRATION (SLIDE 13) ─────────────────────────── */
#goal-overlay {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
  opacity: 0;
}
#goal-overlay.active { opacity: 1; }

/*
 * Orbit uses 3 nested layers:
 *   .soccer-ball-anchor  — fixed center point, handles scale + opacity
 *   .orbit-x             — moves left/right (sin wave via ease-in-out)
 *   .orbit-y             — moves up/down (cos wave via ease-in-out)
 *   .soccer-ball         — the ball itself, handles spin
 */
.soccer-ball-anchor {
  position: fixed;
  top: 50%; left: 50%;
  width: 0; height: 0;
  z-index: 9999;
  visibility: hidden;
}
#goal-overlay.active .soccer-ball-anchor {
  visibility: visible;
  animation: ballScale 8s linear forwards;
}
.orbit-x {
  position: absolute;
  width: 0; height: 0;
}
.orbit-y {
  position: absolute;
  width: 0; height: 0;
}
#goal-overlay.active .orbit-x {
  animation: orbitX 5s ease-in-out forwards;
}
#goal-overlay.active .orbit-y {
  animation: orbitY 5s ease-in-out forwards;
}

/* The ball */
.soccer-ball {
  position: absolute;
  width: 100px; height: 100px;
  margin: -50px 0 0 -50px;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.6));
}
#goal-overlay.active .soccer-ball {
  animation: ballSpin 8s ease-out forwards;
}
.soccer-ball .ball-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}

/*
 * X peaks at different times than Y → creates elliptical curves.
 * ease-in-out on the animation smooths each direction change.
 * Amplitude shrinks each loop so the ball spirals inward.
 */
@keyframes orbitX {
  0%    { transform: translateX(0); }
  /* Orbit 1 — wide */
  8%    { transform: translateX(18vw); }
  25%   { transform: translateX(-18vw); }
  /* Orbit 2 — medium */
  42%   { transform: translateX(11vw); }
  58%   { transform: translateX(-11vw); }
  /* Orbit 3 — tight */
  70%   { transform: translateX(4vw); }
  80%   { transform: translateX(-2vw); }
  /* Settle center */
  88%   { transform: translateX(0); }
  100%  { transform: translateX(0); }
}
/* Y is offset so peaks fall between X peaks → circular motion */
@keyframes orbitY {
  0%    { transform: translateY(-14vh); }
  /* Orbit 1 */
  17%   { transform: translateY(14vh); }
  33%   { transform: translateY(-14vh); }
  /* Orbit 2 */
  50%   { transform: translateY(8vh); }
  64%   { transform: translateY(-8vh); }
  /* Orbit 3 */
  75%   { transform: translateY(3vh); }
  84%   { transform: translateY(-1vh); }
  /* Settle center */
  90%   { transform: translateY(0); }
  100%  { transform: translateY(0); }
}

/* Scale: grows while orbiting, holds big at center, slow 3s fade */
@keyframes ballScale {
  0%   { transform: scale(0.4); opacity: 0; }
  3%   { opacity: 1; }
  20%  { transform: scale(1.5); opacity: 1; }
  35%  { transform: scale(3); opacity: 1; }
  48%  { transform: scale(5); opacity: 1; }
  /* Settled at center, hold */
  55%  { transform: scale(6); opacity: 1; }
  62%  { transform: scale(6); opacity: 1; }
  /* Slow fade out (~3s) */
  100% { transform: scale(6); opacity: 0; }
}

/* Spin during orbit, then stop with logo facing forward */
@keyframes ballSpin {
  0%   { transform: rotate(0deg); }
  45%  { transform: rotate(720deg); }
  55%  { transform: rotate(720deg); }
  100% { transform: rotate(720deg); }
}


/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-mid); border-radius: 2px; }

/* ── ACCESSIBILITY ───────────────────────────────────────── */
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  #nav, #footer-cta, .sidebar, .sidebar-toggle,
  .btn-fullscreen, .dots, .hit-prev, .hit-next { display: none; }
  body { overflow: visible; }
  #stage { position: relative; height: auto; }
  .slide { position: relative; opacity: 1; page-break-after: always; }
}
