/**
 * AK GLOBAL INVEST — Master Stylesheet
 * 
 * Ultra-Premium Design System v2.0
 * Royal Bordo + Brushed Platinum + Cinematic Motion
 * 
 * This file supplements Tailwind with custom animations,
 * glassmorphism effects, fullscreen menu, and brand styling.
 */

/* ═══════════════════════════════════════════════════════════════ */
/* FOUNDATION                                                     */
/* ═══════════════════════════════════════════════════════════════ */

:root {
  --bordo: #6b0f2b;
  --bordo-hover: #8b1a3a;
  --bordo-dark: #4a0a1e;
  --bordo-logo: #440113;
  --platinum: #b8b8c0;
  --platinum-lt: #d4d4dc;
  --silver: #e8e8ee;
  --midnight: #0a0a0f;
  --dark-surface: #1a1a24;
  --snow: #f5f5f7;
  --gold-accent: #c9a96e;
}

/* Smooth scrolling & font rendering */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
  background-color: var(--bordo);
  color: #fff;
}

::-moz-selection {
  background-color: var(--bordo);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════ */
/* NAVIGATION — Glassmorphism States                              */
/* ═══════════════════════════════════════════════════════════════ */

.nav-transparent {
  background: transparent;
}

.nav-scrolled {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--bordo);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 70%;
}

/* Scrolled state nav links → bordo underline */
.nav-scrolled .nav-link::after {
  background: var(--bordo);
}

/* Dropdown items hover line */
.dropdown-item {
  position: relative;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 60%;
  border-radius: 0 4px 4px 0;
  background: var(--bordo);
  transition: width 0.3s ease;
}

.dropdown-item:hover::before {
  width: 3px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FULLSCREEN OVERLAY MENU                                        */
/* ═══════════════════════════════════════════════════════════════ */

/* Menu link entrance stagger animation */
.menu-link {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-visible .menu-link {
  opacity: 1;
  transform: translateY(0);
}

.menu-visible .menu-link:nth-child(1) {
  transition-delay: 0.15s;
}
.menu-visible .menu-link:nth-child(2) {
  transition-delay: 0.22s;
}
.menu-visible .menu-link:nth-child(3) {
  transition-delay: 0.29s;
}
.menu-visible .menu-link:nth-child(4) {
  transition-delay: 0.36s;
}
.menu-visible .menu-link:nth-child(5) {
  transition-delay: 0.43s;
}
.menu-visible .menu-link:nth-child(6) {
  transition-delay: 0.5s;
}

/* Menu photo cards entrance (Bugatti-style) */
.menu-photo {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-visible .menu-photo {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.menu-visible .menu-photo:nth-child(1) {
  transition-delay: 0.3s;
}
.menu-visible .menu-photo:nth-child(2) {
  transition-delay: 0.4s;
}
.menu-visible .menu-photo:nth-child(3) {
  transition-delay: 0.5s;
}

/* Menu contact info entrance */
.menu-contact {
  opacity: 0;
  transform: translateX(30px);
  transition:
    opacity 0.5s ease 0.5s,
    transform 0.5s ease 0.5s;
}

.menu-visible .menu-contact {
  opacity: 1;
  transform: translateX(0);
}

/* Hamburger → X morphing */
.menu-line {
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: center;
}

/* ═══════════════════════════════════════════════════════════════ */
/* HERO SECTION                                                   */
/* ═══════════════════════════════════════════════════════════════ */

/* Hero search bar select styling */
#hero select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

#hero select option {
  background: #1a1a24;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════ */
/* ANIMATIONS — Entrance & Scroll-triggered                       */
/* ═══════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes kenBurns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-bordo {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(107, 15, 43, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(107, 15, 43, 0);
  }
}

@keyframes bordo-line-glow {
  0%,
  100% {
    opacity: 0.4;
    box-shadow:
      0 0 8px rgba(155, 40, 71, 0),
      0 0 20px rgba(155, 40, 71, 0);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 8px rgba(155, 40, 71, 0.3),
      0 0 20px rgba(155, 40, 71, 0.15);
  }
}

@keyframes bordo-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-bordo-line {
  animation: bordo-line-glow 3s ease-in-out infinite;
}

.bordo-line-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(155, 40, 71, 0.1) 20%,
    rgba(155, 40, 71, 0.6) 40%,
    rgba(155, 40, 71, 1) 50%,
    rgba(155, 40, 71, 0.6) 60%,
    rgba(155, 40, 71, 0.1) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation:
    bordo-shimmer 4s ease-in-out infinite,
    bordo-line-glow 3s ease-in-out infinite;
}

/* Animation utility classes */
.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}
.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-fade-in-down {
  animation: fadeInDown 0.6s ease forwards;
}
.animate-ken-burns {
  animation: kenBurns 25s ease infinite alternate;
}
.animate-float {
  animation: float 4s ease-in-out infinite;
}
.animate-scale-in {
  animation: scaleIn 0.5s ease forwards;
}
.animate-pulse-bordo {
  animation: pulse-bordo 2s ease infinite;
}

/* GSAP trigger states */
[data-gsap] {
  opacity: 0;
  transform: translateY(40px);
}

[data-gsap].gsap-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════ */
/* LISTING CARDS                                                  */
/* ═══════════════════════════════════════════════════════════════ */

/* Premium card hover effect */
article.group:hover {
  transform: translateY(-8px);
}

/* Image lazy load fade-in */
img[loading='lazy'] {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* ═══════════════════════════════════════════════════════════════ */
/* GLASSMORPHISM UTILITIES                                        */
/* ═══════════════════════════════════════════════════════════════ */

.glass {
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-light {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: rgba(10, 10, 15, 0.75);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════ */
/* TYPOGRAPHY UTILITIES                                           */
/* ═══════════════════════════════════════════════════════════════ */

.heading-luxury {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.text-gradient-bordo {
  background: linear-gradient(135deg, var(--bordo) 0%, var(--bordo-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════ */
/* BUTTONS                                                        */
/* ═══════════════════════════════════════════════════════════════ */

.btn-bordo {
  background: var(--bordo);
  color: #fff;
  transition: all 0.3s ease;
}

.btn-bordo:hover {
  background: var(--bordo-hover);
  box-shadow: 0 12px 40px rgba(107, 15, 43, 0.3);
  transform: translateY(-2px);
}

/* Outline version */
.btn-bordo-outline {
  background: transparent;
  color: var(--bordo);
  border: 2px solid var(--bordo);
  transition: all 0.4s ease;
}

.btn-bordo-outline:hover {
  background: var(--bordo);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(107, 15, 43, 0.2);
}

/* ═══════════════════════════════════════════════════════════════ */
/* BORDO THEME ACCENT ELEMENTS                                    */
/* ═══════════════════════════════════════════════════════════════ */

/* Bordo decorative top bar on sections */
.section-accent-top {
  position: relative;
}

.section-accent-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--bordo), transparent);
}

/* Bordo hover card */
.card-bordo-hover {
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-bordo-hover:hover {
  border-color: rgba(107, 15, 43, 0.15);
  box-shadow: 0 20px 60px rgba(107, 15, 43, 0.08);
}

/* Separator with bordo dot */
.separator-dot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.separator-dot::before,
.separator-dot::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--silver));
}

.separator-dot::after {
  background: linear-gradient(90deg, var(--silver), transparent);
}

/* ═══════════════════════════════════════════════════════════════ */
/* SCROLLBAR                                                      */
/* ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--snow);
}

::-webkit-scrollbar-thumb {
  background: var(--platinum);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bordo);
}

/* ═══════════════════════════════════════════════════════════════ */
/* MOBILE REFINEMENTS                                             */
/* ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
  }

  /* Mobile menu text stagger */
  .mobile-nav-link {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
  }

  .mobile-nav-link:nth-child(1) {
    animation-delay: 0.1s;
  }
  .mobile-nav-link:nth-child(2) {
    animation-delay: 0.15s;
  }
  .mobile-nav-link:nth-child(3) {
    animation-delay: 0.2s;
  }
  .mobile-nav-link:nth-child(4) {
    animation-delay: 0.25s;
  }
  .mobile-nav-link:nth-child(5) {
    animation-delay: 0.3s;
  }
  .mobile-nav-link:nth-child(6) {
    animation-delay: 0.35s;
  }
  .mobile-nav-link:nth-child(7) {
    animation-delay: 0.4s;
  }
  .mobile-nav-link:nth-child(8) {
    animation-delay: 0.45s;
  }

  /* Smaller hero title on mobile */
  #hero h1 span {
    letter-spacing: 0.02em !important;
  }
}

/* Small screens hero search tweaks */
@media (max-width: 1024px) {
  #hero .absolute.bottom-0 {
    position: relative;
    margin-top: -60px;
  }
}

@media (max-width: 640px) {
  #hero .absolute.bottom-0 {
    margin-top: -40px;
  }
}

/* Safe area for iPhone notch */
@supports (padding: env(safe-area-inset-bottom)) {
  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
  header {
    padding-top: env(safe-area-inset-top);
  }
  .safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Marquee performance */
.showcase-marquee {
  will-change: transform;
}

/* Hide scrollbar utility */
.scrollbar-hide {
  -ms-overflow-style: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
@supports (scrollbar-width: none) {
  .scrollbar-hide {
    scrollbar-width: none;
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* PRINT STYLES                                                   */
/* ═══════════════════════════════════════════════════════════════ */

@media print {
  header,
  footer,
  .fixed {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  a {
    text-decoration: underline;
  }
}
