/* ============================================================
   KEG Portfolio — Custom design layer (works with Tailwind CDN)
   Theme: Midnight ink + champagne gold
   ============================================================ */

:root {
  --ink: #0a0c16;
  --inksoft: #10131f;
  --inkcard: #151827;
  --gold: #d4a94e;
  --gold-light: #f0d48a;
  --gold-dark: #a67c2e;
  --cream: #f2ede1;
  --mute: #9aa0b5;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
html { scroll-padding-top: 90px; }

body { background: var(--ink); }

::selection { background: var(--gold); color: var(--ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-dark), var(--gold));
  border-radius: 8px;
  border: 2px solid var(--ink);
}

img { user-select: none; }

/* ---------- Layout helpers ---------- */
.section-pad { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.section-header { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.section-heading::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin: 1.1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.gold-text {
  background: linear-gradient(120deg, var(--gold-dark) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead-text {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.8;
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
}

/* ---------- Buttons ---------- */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold-dark), var(--gold));
  color: var(--ink);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition: all 0.35s var(--ease);
  box-shadow: 0 4px 20px rgba(212, 169, 78, 0.25);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 169, 78, 0.45);
  filter: brightness(1.08);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: 1.5px solid rgba(242, 237, 225, 0.45);
  color: var(--cream);
  font-weight: 700;
  font-size: 0.92rem;
  backdrop-filter: blur(6px);
  transition: all 0.35s var(--ease);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-3px);
}

/* ---------- Header / Nav ---------- */
#siteHeader.scrolled {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  background: rgba(10, 12, 22, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 169, 78, 0.18);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.nav-link {
  position: relative;
  color: var(--mute);
  transition: color 0.3s;
  padding: 0.35rem 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.mobile-link {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--cream);
  transition: color 0.3s, letter-spacing 0.3s;
}
.mobile-link:hover { color: var(--gold-light); letter-spacing: 0.05em; }

#mobileMenu.open { display: flex; animation: menuFade 0.35s var(--ease); }
@keyframes menuFade { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- Hero Slider ---------- */
.slider { position: relative; overflow: hidden; }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s var(--ease), visibility 1s;
}
.slide.active { opacity: 1; visibility: visible; z-index: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 7s linear;
}
.slide.active img { transform: scale(1); }

.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,12,22,0.97) 0%, rgba(10,12,22,0.72) 38%, rgba(10,12,22,0.45) 65%, rgba(10,12,22,0.55) 100%),
    linear-gradient(100deg, rgba(10,12,22,0.85) 0%, rgba(10,12,22,0.45) 55%, rgba(10,12,22,0.1) 100%);
}

/* Slightly dim the slide imagery so it stays behind the text */
.slide img { filter: brightness(0.72) saturate(0.92); }

.slide-caption {
  position: absolute;
  bottom: clamp(5rem, 12vh, 9rem);
  left: 0;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  z-index: 5;
}

.slide-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(212, 169, 78, 0.5);
  background: rgba(212, 169, 78, 0.12);
  backdrop-filter: blur(6px);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(24px);
}
.slide.active .slide-badge { animation: riseIn 0.7s var(--ease) 0.35s forwards; }

.slide-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 6.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--cream);
  max-width: 20ch;
  margin-bottom: 1.1rem;
  opacity: 0;
  transform: translateY(34px);
  text-shadow: 0 2px 18px rgba(10, 12, 22, 0.9), 0 0 40px rgba(10, 12, 22, 0.6);
}
.slide.active .slide-title { animation: riseIn 0.8s var(--ease) 0.5s forwards; }

.slide-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: rgba(242, 237, 225, 0.95);
  text-shadow: 0 1px 12px rgba(10, 12, 22, 0.9);
  max-width: 56ch;
  margin-bottom: 1.75rem;
  opacity: 0;
  transform: translateY(34px);
}
.slide.active .slide-subtitle { animation: riseIn 0.8s var(--ease) 0.65s forwards; }

.slide-caption .flex { opacity: 0; transform: translateY(34px); }
.slide.active .slide-caption .flex { animation: riseIn 0.8s var(--ease) 0.8s forwards; }

@keyframes riseIn { to { opacity: 1; transform: translateY(0); } }

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  color: rgba(242, 237, 225, 0.28);
  border: 1px solid rgba(242, 237, 225, 0.08);
  background: transparent;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s var(--ease);
}
@media (min-width: 768px) { .slider-btn { display: flex; } }
.slider-btn:hover {
  color: var(--cream);
  border-color: rgba(242, 237, 225, 0.35);
  background: rgba(10, 12, 22, 0.25);
  backdrop-filter: blur(4px);
}
.slider-btn:active {
  color: var(--gold-light);
  border-color: rgba(212, 169, 78, 0.5);
  background: rgba(10, 12, 22, 0.4);
  transform: translateY(-50%) scale(0.96);
}
.slider-btn.prev { left: 1.5rem; }
.slider-btn.next { right: 1.5rem; }

.slider-dots {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.65rem;
  z-index: 20;
}
.slider-dot {
  width: 2.2rem;
  height: 4px;
  border-radius: 4px;
  border: none;
  background: rgba(242, 237, 225, 0.3);
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.slider-dot.active { background: var(--gold); width: 3.4rem; }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  width: 2.6rem;
  height: 2.6rem;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--gold-light);
  border: 1px solid rgba(212, 169, 78, 0.45);
  background: rgba(10, 12, 22, 0.4);
  backdrop-filter: blur(6px);
  animation: bob 2.2s ease-in-out infinite;
  transition: all 0.3s;
}
@media (min-width: 1024px) { .scroll-indicator { display: flex; } }
.scroll-indicator:hover { background: var(--gold); color: var(--ink); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }

/* ---------- Cards & features ---------- */
.glass-card {
  background: rgba(21, 24, 39, 0.7);
  border: 1px solid rgba(212, 169, 78, 0.15);
  border-radius: 1.4rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 169, 78, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.glass-title {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.6rem;
}

.glass-desc { color: var(--mute); font-size: 0.95rem; line-height: 1.7; }

.feature-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: rgba(21, 24, 39, 0.7);
  border: 1px solid rgba(212, 169, 78, 0.15);
  border-radius: 1.2rem;
  padding: 1.4rem;
  backdrop-filter: blur(8px);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.feature-card:hover { transform: translateY(-5px); border-color: rgba(212, 169, 78, 0.45); }

.feature-icon {
  flex-shrink: 0;
  width: 3.4rem;
  height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(212, 169, 78, 0.12);
  border: 1px solid rgba(212, 169, 78, 0.3);
}

.feature-title {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}
.feature-desc { color: var(--mute); font-size: 0.92rem; line-height: 1.65; }

.stat-card {
  background: rgba(21, 24, 39, 0.8);
  border: 1px solid rgba(212, 169, 78, 0.2);
  border-radius: 1.4rem;
  padding: 2rem 1.25rem;
  text-align: center;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(212, 169, 78, 0.12);
}

.stat-number {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 800;
  background: linear-gradient(120deg, var(--gold-dark), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}

.stat-lottie { width: 56px; height: 56px; margin: 0 auto 0.5rem; }

/* ---------- Tabs ---------- */
.tab-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.tab-btn {
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 169, 78, 0.25);
  background: transparent;
  color: var(--mute);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.35s var(--ease);
}
.tab-btn:hover { color: var(--gold-light); border-color: var(--gold); }
.tab-btn.active {
  background: linear-gradient(120deg, var(--gold-dark), var(--gold));
  color: var(--ink);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(212, 169, 78, 0.3);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: tabIn 0.5s var(--ease); }
@keyframes tabIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Projects ---------- */
.project-card {
  background: rgba(21, 24, 39, 0.7);
  border: 1px solid rgba(212, 169, 78, 0.15);
  border-radius: 1.4rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 169, 78, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.project-media { aspect-ratio: 16/9; overflow: hidden; }
.project-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-media img { transform: scale(1.06); }

.project-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.project-title {
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cream);
}
.project-text { color: var(--mute); font-size: 0.95rem; line-height: 1.7; margin-bottom: 0.85rem; }

/* ---------- Video frames ---------- */
.video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #000;
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0.9rem;
}

.yt-card {
  background: rgba(21, 24, 39, 0.7);
  border: 1px solid rgba(212, 169, 78, 0.15);
  border-radius: 1.4rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.yt-card:hover { transform: translateY(-6px); border-color: rgba(212, 169, 78, 0.45); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; width: 100%; position: relative; }
.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(3rem, 10vw, 8rem);
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--ink), transparent); }

.marquee-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  padding: 1rem 0;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.partner-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.partner-chip img {
  width: 7.5rem;
  height: 7.5rem;
  object-fit: contain;
  border-radius: 1.2rem;
  background: #fff;
  padding: 0.8rem;
  filter: grayscale(0.4);
  transition: all 0.4s var(--ease);
}
.partner-chip:hover img { filter: none; transform: translateY(-5px) scale(1.04); }
.partner-chip span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

.vaultx-chip {
  flex-shrink: 0;
  height: clamp(11rem, 24vw, 17rem);
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(212, 169, 78, 0.2);
}
.vaultx-chip img { height: 100%; width: auto; object-fit: cover; display: block; }

/* ---------- Gallery ---------- */
.gallery-item {
  position: relative;
  border-radius: 1.1rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid rgba(212, 169, 78, 0.15);
  cursor: zoom-in;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.gallery-item:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 169, 78, 0.5);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.07); }

.gallery-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1.1rem 0.9rem;
  background: linear-gradient(to top, rgba(10,12,22,0.92), transparent);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s var(--ease);
}
.gallery-item:hover .gallery-cap { opacity: 1; transform: none; }

/* ---------- TEDx ---------- */
.tedx-card {
  background: rgba(21, 24, 39, 0.7);
  border: 1px solid rgba(212, 169, 78, 0.15);
  border-radius: 1.2rem;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.tedx-card:hover { transform: translateY(-5px); border-color: rgba(212, 169, 78, 0.45); }
.tedx-img { aspect-ratio: 2/3; overflow: hidden; }
.tedx-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.tedx-card:hover .tedx-img img { transform: scale(1.06); }

/* ---------- Social orbs ---------- */
.social-orb {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--gold);
  border: 1px solid rgba(212, 169, 78, 0.4);
  background: rgba(212, 169, 78, 0.08);
  transition: all 0.35s var(--ease);
}
.social-orb:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(212, 169, 78, 0.35);
}

/* ---------- Platform tags / live dot ---------- */
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 169, 78, 0.35);
  background: rgba(212, 169, 78, 0.1);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 169, 78, 0.6); }
  50% { box-shadow: 0 0 0 7px rgba(212, 169, 78, 0); }
}

/* ---------- Forms ---------- */
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 0.85rem;
  background: rgba(10, 12, 22, 0.6);
  border: 1px solid rgba(212, 169, 78, 0.2);
  color: var(--cream);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input::placeholder { color: rgba(154, 160, 181, 0.55); }
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 169, 78, 0.18);
}
.form-group.has-error .form-input { border-color: #e05c5c; }

.error-message {
  color: #ff8a8a;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.4rem;
  animation: tabIn 0.3s var(--ease);
}

.form-success {
  text-align: center;
  padding: 3rem 1.5rem;
  animation: tabIn 0.5s var(--ease);
}
.form-success h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  margin: 1rem 0 0.5rem;
}
.form-success p { color: var(--mute); }

/* ---------- Footer ---------- */
.footer-link { color: var(--mute); transition: color 0.3s, padding-left 0.3s; }
.footer-link:hover { color: var(--gold-light); padding-left: 6px; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.revealed { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
#lightbox.open { display: flex; animation: menuFade 0.3s var(--ease); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
}
