/* ==========================================================================
   GASTROGIRO DESIGN SYSTEM & STYLESHEET (INGEN-IA Ecosystem)
   Ultra-modern Dark Glassmorphism, Responsive & Micro-animated
   ========================================================================== */

/* DESIGN TOKENS */
:root {
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Theme Colors */
  --bg-main: #0a0a12;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(220, 38, 38, 0.35);

  /* Accents */
  --color-primary: #dc2626;        /* Gastro Red */
  --color-primary-glow: rgba(220, 38, 38, 0.3);
  --color-amber: #f59e0b;          /* Alert / Amber */
  --color-emerald: #10b981;        /* Success / Green */
  --color-emerald-glow: rgba(16, 185, 129, 0.25);
  
  /* Text */
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --text-highlight: #ffffff;

  /* Shadows */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow-red: 0 0 35px rgba(220, 38, 38, 0.25);
  --shadow-glow-emerald: 0 0 35px rgba(16, 185, 129, 0.2);
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-muted);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-highlight);
  font-weight: 700;
  line-height: 1.2;
}

/* ============ Glassmorphism Utility ============ */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

:where(.glass) {
  position: relative;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 35%);
  pointer-events: none;
}

.glass-interactive {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-interactive:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glass), var(--shadow-glow-red);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass {
    background: rgba(18, 18, 26, 0.95);
  }
}

/* ============ Aurora Background ============ */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-main);
}

.aurora {
  position: absolute;
  border-radius: 9999px;
  filter: blur(95px);
  will-change: transform, opacity;
}

.aurora-1 {
  width: 55vw;
  height: 55vw;
  top: -18%;
  left: -10%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.22), transparent 65%);
  animation: aurora-drift-1 26s ease-in-out infinite alternate;
}

.aurora-2 {
  width: 45vw;
  height: 45vw;
  top: 25%;
  right: -15%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), transparent 65%);
  animation: aurora-drift-2 32s ease-in-out infinite alternate;
}

.aurora-3 {
  width: 60vw;
  height: 60vw;
  bottom: -25%;
  left: 20%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.14), transparent 65%);
  animation: aurora-drift-1 38s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vw, 4vh, 0) scale(1.12); }
}

@keyframes aurora-drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-5vw, 6vh, 0) scale(0.95); }
}

/* ============ Preloader ============ */
.preloader {
  transition: opacity 0.6s ease;
}

.preloader.preloader-hidden {
  opacity: 0;
  pointer-events: none;
}

#preloader-bar {
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ Header & Navbar Pill ============ */
#navbar-pill {
  border: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#site-header.nav-scrolled #navbar-pill {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* ============ Interactive Simulator ============ */
.simulator-phone {
  width: 100%;
  max-width: 400px;
  border-radius: 36px;
  background: #0d0f17;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(220, 38, 38, 0.15);
  overflow: hidden;
  position: relative;
}

.phone-notch {
  width: 120px;
  height: 18px;
  background: #000000;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.phone-camera {
  width: 8px;
  height: 8px;
  background: #1a1a24;
  border-radius: 50%;
  position: absolute;
  right: 28px;
  top: 5px;
}

.simulator-kds {
  width: 100%;
  border-radius: 24px;
  background: #0c0e15;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.15);
  overflow: hidden;
}

.kds-ticket {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.kds-ticket.new-ticket-anim {
  animation: ticket-flash 0.8s ease-out;
  border-color: rgba(220, 38, 38, 0.6);
}

@keyframes ticket-flash {
  0% { transform: scale(0.92); opacity: 0; background: rgba(220, 38, 38, 0.25); }
  50% { transform: scale(1.02); opacity: 1; background: rgba(220, 38, 38, 0.15); }
  100% { transform: scale(1); opacity: 1; background: rgba(255, 255, 255, 0.04); }
}

.dish-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
  cursor: pointer;
}

.dish-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(220, 38, 38, 0.4);
  transform: translateY(-2px);
}

.dish-btn:active {
  transform: scale(0.96);
}

.dish-btn.dish-selected {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.5);
}

/* ============ Custom Sliders (ROI Calculator) ============ */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.2s;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dc2626;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid #ffffff;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.85);
}

.custom-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dc2626;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
  border: 2px solid #ffffff;
}

/* ============ Pulse Dot ============ */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.5;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ============ 3D Tilt Cards ============ */
.tilt-card {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

/* ============ FAQ Accordion Transition ============ */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  opacity: 1;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #dc2626;
}

/* ============ Magnetic Buttons ============ */
.magnetic {
  will-change: transform;
}

/* ============ Focus styles ============ */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ============ Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; }
  .preloader { transition: none; }
  #preloader-bar { transition: none; }
  .pulse-dot::after { animation: none; }
  .tilt-card { transform: none !important; }
  .glass-interactive:hover { transform: none !important; }
}
