/* CSS variables aligned with NIPON institutional site (niponspa.pt) */
:root {
  /* VERMELHO INSTITUCIONAL - Terroso, profundo (não saturado) */
  --nipon-red: 0 57% 40%;
  /* #A33127 - Vermelho institucional */
  --nipon-red-dark: 0 57% 30%;
  /* #722118 - Variante mais escura */
  --nipon-red-light: 0 57% 50%;
  /* #CC3E31 - Variante para hover */

  /* BEIGE/ACENTO - Discreto (substitui dourado inventado) */
  --nipon-beige: 30 22% 64%;
  /* #B8A48D - Beige institucional */
  --nipon-beige-light: 30 22% 74%;
  /* #D4C5B3 - Variante mais clara */
  --nipon-beige-dark: 30 22% 54%;
  /* #9C8A70 - Variante mais escura */

  /* NEUTROS - Off-white e cinza institucional */
  --nipon-cream: 40 30% 96%;
  /* #F7F4F0 - Off-white quente */
  --nipon-cream-dark: 40 20% 90%;
  /* #E8E3DC - Variante escura */

  --nipon-gray: 240 2% 74%;
  /* #BCBCBE - Cinza rodapé */
  --nipon-gray-dark: 240 2% 64%;
  /* #9FA0A2 - Variante escura */

  /* TEXTO - Marrom quente (não preto puro) */
  --nipon-text: 30 7% 16%;
  /* #2D2A27 - Marrom escuro */
  --nipon-text-light: 30 7% 40%;
  /* #6B6560 - Cinza-marrom */

  --nipon-black: 30 7% 16%;
  /* Alias para nipon-text */

  /* TAILWIND SEMANTIC TOKENS - Atualizados para paleta institucional */
  --background: 40 30% 96%;
  /* Creme off-white */
  --foreground: 30 7% 16%;
  /* Marrom escuro */

  --card: 0 0% 100%;
  /* Branco puro para cards */
  --card-foreground: 30 7% 16%;
  /* Marrom escuro */

  --popover: 0 0% 100%;
  --popover-foreground: 30 7% 16%;

  --primary: 0 57% 40%;
  /* Vermelho institucional */
  --primary-foreground: 40 30% 96%;
  /* Creme */

  --secondary: 30 22% 64%;
  /* Beige (não dourado) */
  --secondary-foreground: 30 7% 16%;
  /* Marrom */

  --muted: 40 20% 90%;
  /* Creme escuro */
  --muted-foreground: 30 7% 40%;
  /* Marrom claro */

  --accent: 30 22% 64%;
  /* Beige */
  --accent-foreground: 30 7% 16%;
  /* Marrom */

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;

  --border: 40 20% 85%;
  --input: 40 20% 85%;
  --ring: 0 57% 40%;
  /* Vermelho institucional */

  --radius: 0.5rem;

  --sidebar-background: 0 0% 98%;
  --sidebar-foreground: 240 5.3% 26.1%;
  --sidebar-primary: 240 5.9% 10%;
  --sidebar-primary-foreground: 0 0% 98%;
  --sidebar-accent: 240 4.8% 95.9%;
  --sidebar-accent-foreground: 240 5.9% 10%;
  --sidebar-border: 220 13% 91%;
  --sidebar-ring: 217.2 91.2% 59.8%;
}

/* Utilities mapped from institutional site */
.seigaiha-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M0 40a40 40 0 1 1 0-80 40 40 0 0 1 0 80zm40 0a40 40 0 1 1 0-80 40 40 0 0 1 0 80zM80 40a40 40 0 1 1 0-80 40 40 0 0 1 0 80z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.gradient-beige {
  background: linear-gradient(135deg, hsl(30 22% 64%) 0%, hsl(30 22% 74%) 100%);
}

.gradient-red {
  background: linear-gradient(135deg, hsl(0 57% 40%) 0%, hsl(0 57% 30%) 100%);
}

.text-shadow-hero {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9), 0px 4px 20px rgba(0, 0, 0, 0.6);
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Small helper for hero floating circle */
@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-10px)
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Animation Utilities for Intersection Observer */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   PREMIUM UI ENHANCEMENTS (Institucional)
   ========================================= */

/* Washi Paper Texture */
.bg-washi {
  background-color: hsl(40 30% 96%);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Beige Glow Shadow - Acento institucional discreto */
.shadow-beige-glow {
  box-shadow:
    0 4px 20px rgba(184, 164, 141, 0.15),
    0 10px 40px rgba(184, 164, 141, 0.1),
    0 0 60px rgba(184, 164, 141, 0.05);
}

.shadow-beige-glow-sm {
  box-shadow:
    0 2px 10px rgba(184, 164, 141, 0.2),
    0 4px 20px rgba(184, 164, 141, 0.1);
}

/* Softer card shadows (institutional, not commercial) */
.shadow-soft {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Video Modal Styles */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal.active {
  display: flex;
  opacity: 1;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
  z-index: 10000;
  transition: color 0.2s;
}

.video-modal-close:hover {
  color: hsl(30 22% 64%);
  /* Beige hover */
}

.video-modal iframe,
.video-modal video {
  width: 100%;
  height: 100%;
  border: none;
}

/* Smoke/Vapor Rising Effect */
@keyframes smoke {
  0% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }

  10% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.15;
  }

  100% {
    opacity: 0;
    transform: translateY(-150px) scale(1.5);
  }
}

.smoke {
  position: absolute;
  bottom: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  animation: smoke 8s ease-in-out infinite;
  pointer-events: none;
}

.smoke:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 7s;
}

.smoke:nth-child(2) {
  left: 30%;
  animation-delay: 2s;
  animation-duration: 9s;
  width: 120px;
  height: 120px;
}

.smoke:nth-child(3) {
  left: 50%;
  animation-delay: 4s;
  animation-duration: 8s;
  width: 90px;
  height: 90px;
}

.smoke:nth-child(4) {
  left: 70%;
  animation-delay: 1s;
  animation-duration: 10s;
  width: 110px;
  height: 110px;
}

.smoke:nth-child(5) {
  left: 85%;
  animation-delay: 3s;
  animation-duration: 7.5s;
}


/* =========================================
   MINIMALIST BUTTON STYLES (Zen Style)
   ========================================= */

.btn-minimal {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.875rem;
  font-weight: 300;
  border-radius: 2px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-minimal:hover {
  background: white;
  color: hsl(var(--nipon-text));
  border-color: white;
}

.btn-minimal-beige {
  border-color: hsl(var(--nipon-beige-light));
  color: hsl(var(--nipon-beige-light));
}

.btn-minimal-beige:hover {
  background: hsl(var(--nipon-beige-light));
  color: hsl(var(--nipon-text));
}

/* Typography refinements */
body {
  font-family: 'Zen Kaku Gothic New', system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cormorant Garamond', serif;
}

/* =========================================
   HERO CAROUSEL STYLES
   ========================================= */

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* Carousel indicators (progress bars) */
.carousel-indicators {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.carousel-indicator {
  width: 3rem;
  height: 0.25rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.carousel-indicator.active {
  background: hsl(var(--nipon-beige));
  width: 3rem;
}

/* Optional: Progress fill animation */
.carousel-indicator.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: hsl(var(--nipon-beige-light));
  animation: progress-fill 5s linear forwards;
}

@keyframes progress-fill {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .carousel-indicators {
    justify-content: flex-start;
  }
}

/* =========================================
   CAROUSEL TEXT ANIMATIONS
   ========================================= */

@keyframes fade-up-text {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.animate-text-title {
  animation: fade-up-text 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-text-body {
  animation: fade-up-text 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

/* Re-trigger animation when slide becomes active */
.carousel-slide.active .animate-text-title,
.carousel-slide.active .animate-text-body {
  animation: fade-up-text 0.8s ease-out forwards;
}

.carousel-slide.active .animate-text-title {
  animation-delay: 0.2s;
}

.carousel-slide.active .animate-text-body {
  animation-delay: 0.4s;
}
/* Typography refinements with premium fonts */
body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Shippori Mincho', serif;
  letter-spacing: -0.02em;
}

button, .btn, a.bg-nipon-red, a.bg-nipon-beige {
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.lead, .text-xl {
  font-weight: 300;
}

/* =========================================
   HINOMARU NAVIGATION (Japanese Minimalist)
   ========================================= */

/* Hinomaru Navigation (Efeito Sol Nascente) */
.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* O Círculo Vermelho (Sol) */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 6px;
  height: 6px;
  background-color: hsl(var(--nipon-red));
  border-radius: 50%;
  opacity: 0;
  transform: translateY(10px) scale(0);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Estado Hover e Active */
.nav-link:hover::after,
.nav-link.active::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nav-link:hover {
  color: hsl(var(--nipon-red));
}

/* Click Animation (Pequena pressão) */
.nav-link:active {
  transform: scale(0.95);
}

/* Mobile Menu Stagger Animation */
.mobile-link-enter {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.mobile-menu-open .mobile-link-enter {
  opacity: 1;
  transform: translateY(0);
}

/* Delay para cada item (Stagger) */
.mobile-link-enter:nth-child(1) { transition-delay: 0.1s; }
.mobile-link-enter:nth-child(2) { transition-delay: 0.2s; }
.mobile-link-enter:nth-child(3) { transition-delay: 0.3s; }
.mobile-link-enter:nth-child(4) { transition-delay: 0.4s; }
.mobile-link-enter:nth-child(5) { transition-delay: 0.5s; }
