/* ==========================================================================
   NETFLIX MINCU — HIGH-END SKY/NAVY BESPOKE DESIGN SYSTEM
   Curated with Double-Bezel Architecture • Fluid Spatial Rhythm
   Zero AI Slop • Ergonomic Touch Targets • Ultra Responsive Desktop
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Brand Palette */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-focus: rgba(37, 99, 235, 0.25);
  --accent-sky: #0284c7;
  --sky-glow: rgba(56, 189, 248, 0.15);
  
  /* Neutrals */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --border-hairline: #e2e8f0;
  --border-bezel: rgba(203, 213, 225, 0.6);
  --text-headline: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  
  /* Radii */
  --radius-outer: 2rem;
  --radius-inner: calc(2rem - 0.5rem);
  --radius-pill: 9999px;
  --radius-btn: 1rem;
  
  /* Spring Bezier */
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-default: 350ms;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 0;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Floating Glass Island Navigation */
.floating-nav {
  position: sticky;
  top: 1rem;
  z-index: 50;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 1.5rem);
  max-width: 80rem; /* max-w-7xl equivalent */
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
  transition: all var(--duration-default) var(--ease-spring);
}

/* Double-Bezel Nested Hardware Architecture */
.double-bezel-card {
  position: relative;
  background: rgba(226, 232, 240, 0.65);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: var(--radius-outer);
  padding: 0.375rem;
  transition: all 300ms var(--ease-spring);
}

@media (min-width: 640px) {
  .double-bezel-card {
    padding: 0.5rem;
  }
}

.double-bezel-card:hover {
  background: rgba(191, 219, 254, 0.45);
  border-color: rgba(147, 197, 253, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 16px 28px -8px rgba(37, 99, 235, 0.12), 0 8px 12px -4px rgba(37, 99, 235, 0.04);
}

.double-bezel-inner {
  background: var(--bg-surface);
  border-radius: var(--radius-inner);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(15, 23, 42, 0.03);
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .double-bezel-inner {
    padding: 1.75rem;
  }
}

/* Fluid Typography */
.display-hero {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #ffffff;
}

/* Button-in-Button Trailing Icon Architecture */
.btn-pill-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 0.6rem 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 300ms var(--ease-spring);
  user-select: none;
  cursor: pointer;
  min-height: 48px;
}

.btn-pill-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-pill-primary:active {
  transform: translateY(0);
}

.btn-pill-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #ffffff;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 0.6rem 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid #bfdbfe;
  transition: all 300ms var(--ease-spring);
  cursor: pointer;
  min-height: 48px;
}

.btn-pill-secondary:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.btn-icon-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 300ms var(--ease-spring);
}

.btn-pill-primary:hover .btn-icon-circle {
  transform: translateX(2px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
  animation: fadeIn 250ms ease forwards;
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 1.5rem;
  }
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 38rem;
  max-height: 90vh;
  overflow-y: auto;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(226, 232, 240, 0.8);
  animation: slideUp 300ms var(--ease-spring) forwards;
}

@media (min-width: 640px) {
  .modal-card {
    border-radius: 2rem;
  }
}

/* Fullscreen Photo Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(16px);
  padding: 1rem;
  animation: fadeIn 200ms ease;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(2rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Maintenance Banner */
.maintenance-strip {
  background: linear-gradient(90deg, #b91c1c, #dc2626);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid #ef4444;
}

/* Accessibility & Ergonomics */
:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Tactile button press responses */
.btn-pill-primary:active,
.btn-pill-secondary:active {
  transform: scale(0.98);
}

/* Mobile Bottom Navigation & Safe-Area Inset */
#mobile-bottom-nav {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0.5rem));
}

/* Responsive Footer Clearance for Mobile Bottom Nav (Clean 16px clearance, no collision, no huge gap) */
.site-footer {
  padding-top: 1rem;
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
  .site-footer {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
}

.mob-tab-btn {
  min-height: 44px;
  min-width: 48px;
  padding: 0.35rem 0.6rem;
  border-radius: 1rem;
  transition: all 200ms ease;
  user-select: none;
  cursor: pointer;
}

.mob-tab-btn.active {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08);
}

.mob-tab-btn:active {
  transform: scale(0.95);
}
