/* ==========================================================================
   Wifi4Guest 2.0 - Tailwind CSS Integrated Stylesheet
   Modern, Unique, Light & Dark Theme Design System
   ========================================================================== */

/* ---------- 1. CSS Custom Properties for Theming ---------- */
:root {
  --bg-page: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --border-card: #e2e8f0;
  --border-hover: #0ea5e9;
  --text-main: #0f172a;
  --text-body: #475569;
  --text-muted: #64748b;
  --brand-blue: #0284c7;
  --brand-amber: #f59e0b;
  --brand-teal: #10b981;
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 20px 40px -12px rgba(15, 23, 42, 0.12), 0 6px 16px -2px rgba(15, 23, 42, 0.04);
}

.dark {
  --bg-page: #060a14;
  --bg-subtle: #0b1120;
  --bg-card: #0f172a;
  --border-card: rgba(255, 255, 255, 0.08);
  --border-hover: #38bdf8;
  --text-main: #f8fafc;
  --text-body: #94a3b8;
  --text-muted: #64748b;
  --brand-blue: #38bdf8;
  --brand-amber: #fbbf24;
  --brand-teal: #34d399;
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 25px 50px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(14, 165, 233, 0.15);
}

/* ---------- 2. Base Styles ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}

/* Dark CTA section explicit white text overrides */
#contact h2 {
  color: #ffffff !important;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

#contact p {
  color: #cbd5e1 !important;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 16px;
  background: var(--brand-amber);
  color: #0b1329;
  padding: 10px 18px;
  border-radius: 9999px;
  font-weight: 700;
  z-index: 1000;
}

.skip-link:focus {
  left: 20px;
}

/* ================= MODERN STICKY NAVIGATION HEADER ================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 72px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.dark .site-header {
  background: rgba(7, 12, 24, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.97);
}

.dark .site-header.is-scrolled {
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.6);
  background: rgba(7, 12, 24, 0.97);
  border-bottom-color: rgba(56, 189, 248, 0.2);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Nav links */
.nav-link {
  color: var(--text-body);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9999px;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
}

.nav-link:hover {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}

.dark .nav-link:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.nav-link.is-active {
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.dark .nav-link.is-active {
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.85);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.dark .theme-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.theme-toggle:hover {
  transform: scale(1.05);
  background: rgba(15, 23, 42, 0.08);
}

.dark .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.dark .theme-toggle .icon-sun { display: block; }
.dark .theme-toggle .icon-moon { display: none; }

/* Buttons */
.btn-amber {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #0b1329;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-amber:hover {
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.55);
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn-ghost {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
  transition: all 0.25s ease;
  text-decoration: none;
}

.dark .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.btn-ghost:hover {
  background: #f8fafc;
  border-color: #0f172a;
  transform: translateY(-2px);
}

.dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Beacon Pulse */
.beacon-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #10b981;
}

.beacon-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: #10b981;
  opacity: 0.6;
  animation: pulseBeacon 2s infinite ease-out;
}

@keyframes pulseBeacon {
  0% { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Floating Badges */
.float-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  z-index: 10;
  pointer-events: none;
}

.float-badge-1 {
  top: -16px;
  right: -16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  animation: floatAnim1 5s ease-in-out infinite alternate;
}

.dark .float-badge-1 {
  background: #0d1424;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.7);
}

.float-badge-2 {
  bottom: 24px;
  left: -20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  animation: floatAnim2 6s ease-in-out infinite alternate;
}

.dark .float-badge-2 {
  background: #0d1424;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.7);
}

@keyframes floatAnim1 {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

@keyframes floatAnim2 {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

/* Chat Mockup Styling */
.chat-window {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.chat-msg-out {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: #ffffff;
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  font-weight: 500;
  max-width: 82%;
}

.chat-msg-in {
  align-self: flex-start;
  background: #ffffff;
  color: var(--text-main);
  border-radius: 18px 18px 18px 4px;
  padding: 12px 16px;
  border: 1px solid var(--border-card);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  max-width: 90%;
}

.dark .chat-msg-in {
  background: #111a2e;
  border-color: rgba(255, 255, 255, 0.08);
}

.chat-chip {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-chip:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
}

.dark .chat-chip:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Typing Dots Animation */
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #0ea5e9;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.animate-slide-in {
  animation: slideInMsg 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #0369a1;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.6);
}

/* Mobile Drawer */
.mobile-nav {
  position: fixed;
  top: 78px;
  left: 16px;
  right: 16px;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 899;
}

.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
