/* ==========================================================================
   NOMIQ BRANDING EXPERIENCE — CORE STYLESHEET
   Design System: Deep Obsidian (#000000 - #0B0B0C) + Nomiq Orange (#FF6B00 / #FF8A00)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-pure: #000000;
  --bg-deep: #050505;
  --bg-base: #080808;
  --bg-surface: #0B0B0C;
  --surface-card: #141416;
  --surface-elevated: #1A1A1E;
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-border-hover: rgba(255, 107, 0, 0.35);

  --nomiq-orange: #FF6B00;
  --nomiq-amber: #FF8A00;
  --nomiq-amber-dark: #CC5500;
  --nomiq-glow: rgba(255, 107, 0, 0.28);
  --nomiq-glow-subtle: rgba(255, 107, 0, 0.12);

  --text-primary: #F5F5F7;
  --text-secondary: #8E8E93;
  --text-muted: #545458;

  --status-green: #2ECC71;
  --status-red: #E74C3C;
  --status-blue: #3498DB;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
}

/* Base Resets & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-pure);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-pure);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-pure);
}
::-webkit-scrollbar-thumb {
  background: #222226;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--nomiq-amber-dark);
}

/* Selection Highlight */
::selection {
  background: rgba(255, 107, 0, 0.35);
  color: #FFFFFF;
}

/* Ambient Radial Glows */
.ambient-glow-top-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 65vw;
  height: 65vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle at top right, rgba(255, 107, 0, 0.16) 0%, rgba(255, 138, 0, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.ambient-glow-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.18) 0%, transparent 65%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Containers */
.glass-panel {
  background: rgba(20, 20, 22, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--surface-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.glass-panel-interactive:hover {
  border-color: var(--surface-border-hover);
  box-shadow: 0 16px 48px rgba(255, 107, 0, 0.12), 0 0 0 1px rgba(255, 107, 0, 0.2);
  transform: translateY(-2px);
}

/* Navigation Capsule */
.nav-capsule {
  background: rgba(11, 11, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.nav-capsule.scrolled {
  background: rgba(8, 8, 8, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 107, 0, 0.06);
}

/* Nomiq Orange Glow Buttons */
.btn-nomiq-primary {
  background: linear-gradient(135deg, #FF7A00 0%, #FF5500 100%);
  color: #000000;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 18px rgba(255, 107, 0, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-nomiq-primary:hover {
  background: linear-gradient(135deg, #FF8A00 0%, #FF6500 100%);
  box-shadow: 0 6px 28px rgba(255, 107, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transform: translateY(-1px) scale(1.02);
}

.btn-nomiq-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-nomiq-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.btn-nomiq-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 107, 0, 0.4);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Orange Gradient Text */
.text-orange-glow {
  background: linear-gradient(135deg, #FFA834 0%, #FF6B00 50%, #FF4500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-white-glow {
  background: linear-gradient(180deg, #FFFFFF 0%, #D4D4D8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Section Eyebrow Badge */
.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.22);
  color: var(--nomiq-amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--nomiq-orange);
  box-shadow: 0 0 8px var(--nomiq-orange);
  animation: pulseBeacon 2.2s infinite ease-in-out;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

/* Monospace Tags */
.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: -0.02em;
}

/* Receipt Scanner Light Bar */
@keyframes laserScan {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.scanning-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #FF8A00, #FF6B00, #FFFFFF, #FF6B00, #FF8A00, transparent);
  box-shadow: 0 0 16px #FF6B00, 0 0 32px #FF8A00;
  animation: laserScan 2.4s ease-in-out infinite;
  z-index: 20;
}

/* Plaintext to Cipher Text Animation */
.cipher-scramble {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  transition: all 0.3s ease;
}

/* ==========================================================================
   IPHONE 18 PRO MAX 3D STORYTELLING RIG & HARDWARE MOCKUP
   Grade 5 Obsidian Titanium • Dynamic Island 2.0 • Super Retina XDR OLED
   ========================================================================== */

/* Fixed Pinned Storytelling Stage */
.iphone-story-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 38;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  transition: opacity 0.4s ease;
}

/* 3D Phone Chassis Rig */
.iphone-18-pro-max-rig {
  width: 350px;
  height: 720px;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: auto;
  user-select: none;
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 45px rgba(255, 107, 0, 0.16));
  transition: filter 0.3s ease;
}

/* Titanium Outer Band (Grade 5 Obsidian Titanium) */
.iphone-chassis {
  position: absolute;
  inset: 0;
  border-radius: 54px;
  background: linear-gradient(145deg, #2A2A2E 0%, #17171A 35%, #0D0D0F 70%, #202024 100%);
  padding: 3.5px;
  box-shadow: 
    inset 0 0 0 1.2px rgba(255, 255, 255, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 107, 0, 0.25);
  transform: translateZ(0);
}

/* Inner Display Bezel (1.2mm ultra-thin border) */
.iphone-bezel {
  width: 100%;
  height: 100%;
  border-radius: 51px;
  background: #000000;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.9), inset 0 0 12px rgba(0, 0, 0, 0.8);
}

/* Dynamic Glass Glare & Angle Reflection */
.iphone-screen-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 30%, transparent 60%);
  pointer-events: none;
  z-index: 55;
  border-radius: 51px;
  mix-blend-mode: overlay;
  transition: opacity 0.3s ease;
}

/* Hardware Buttons on Sides */
.iphone-button {
  position: absolute;
  background: linear-gradient(180deg, #3A3A40 0%, #1E1E22 100%);
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.6);
  z-index: -1;
}

.iphone-btn-action {
  left: -5.5px;
  top: 110px;
  width: 5px;
  height: 28px;
  background: linear-gradient(180deg, #FF7A00 0%, #CC5500 100%);
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

.iphone-btn-vol-up {
  left: -5.5px;
  top: 155px;
  width: 5px;
  height: 52px;
}

.iphone-btn-vol-down {
  left: -5.5px;
  top: 220px;
  width: 5px;
  height: 52px;
}

.iphone-btn-power {
  right: -5.5px;
  top: 170px;
  width: 5px;
  height: 78px;
}

/* Rear Triple-Prism Camera Plateau (Visible during isometric tilts) */
.iphone-camera-plateau {
  position: absolute;
  top: 16px;
  left: -18px;
  width: 140px;
  height: 140px;
  border-radius: 36px;
  background: linear-gradient(135deg, #1C1C20 0%, #101012 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateZ(-16px);
  z-index: -2;
  box-shadow: -8px 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 107, 0, 0.12);
}

.iphone-camera-lens {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #25252A 0%, #08080A 70%);
  border: 2px solid #333338;
  box-shadow: inset 0 0 8px rgba(255, 107, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.8);
}
.iphone-camera-lens::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 107, 0, 0.6);
  filter: blur(2px);
}
.iphone-lens-1 { top: 16px; left: 16px; }
.iphone-lens-2 { top: 78px; left: 16px; }
.iphone-lens-3 { top: 46px; left: 74px; }

/* Dynamic Island 2.0 with Adaptive Morphing */
.iphone-island-container {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iphone-island {
  height: 30px;
  min-width: 110px;
  padding: 0 12px;
  border-radius: 20px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 107, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.iphone-island.expanded {
  height: 34px;
  min-width: 190px;
  border-color: rgba(255, 107, 0, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9), 0 0 18px rgba(255, 107, 0, 0.3);
}

/* Status Bar Top */
.iphone-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  padding: 12px 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  z-index: 50;
  pointer-events: none;
}

/* Screen Display Stage & States */
.iphone-display-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-screen-state {
  position: absolute;
  inset: 0;
  padding: 54px 18px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  background: #000000;
}

.phone-screen-state.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Home Indicator Bar at Bottom */
.iphone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 128px;
  height: 4.5px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 9999px;
  z-index: 55;
  pointer-events: none;
}

/* Floating Chapter Navigation Capsule */
.chapter-nav-capsule {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 107, 0, 0.12);
  border-radius: 9999px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 90vw;
  overflow-x: auto;
}

.chapter-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 9999px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
  cursor: pointer;
}

.chapter-pill:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.chapter-pill.active {
  background: var(--nomiq-orange);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.4);
}

/* Responsive Scaling for Desktop vs Mobile */
@media (min-width: 1024px) {
  .story-grid-left {
    padding-right: 360px;
  }
  .story-grid-right {
    padding-left: 360px;
  }
}

@media (max-width: 1023px) {
  .iphone-18-pro-max-rig {
    width: 300px;
    height: 615px;
    transform: scale(0.85) !important;
  }
  .chapter-nav-capsule {
    bottom: 14px;
    padding: 4px 8px;
    gap: 6px;
  }
  .chapter-pill {
    font-size: 9.5px;
    padding: 4px 8px;
  }
}

@media (max-width: 640px) {
  .iphone-18-pro-max-rig {
    width: 270px;
    height: 555px;
    transform: scale(0.72) !important;
  }
}

/* Mobile Visibility Toggle Capsule */
.phone-toggle-dock {
  display: none;
}
@media (max-width: 1023px) {
  .phone-toggle-dock {
    display: flex;
  }
}

/* Legacy iPhone Frame fallback styling if needed */
.iphone-frame {
  width: 320px;
  height: 650px;
  border-radius: 54px;
  background: #000000;
  border: 4px solid #2C2C2E;
  box-shadow: 
    0 0 0 2px #1C1C1E,
    0 25px 60px rgba(0, 0, 0, 0.9),
    0 0 60px rgba(255, 107, 0, 0.15);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .iphone-frame {
    width: 360px;
    height: 720px;
  }
}

.iphone-dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 30px;
  background: #000000;
  border-radius: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

/* Pulse animation for live indicators */
@keyframes breathingOrb {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.35);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 70px rgba(255, 138, 0, 0.6);
  }
}

.breathing-orb {
  animation: breathingOrb 4s ease-in-out infinite;
}

/* Chaotic Floating Elements in Story Section */
@keyframes floatDriftA {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

@keyframes floatDriftB {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(14px) rotate(-4deg); }
}

.float-item-a {
  animation: floatDriftA 5s ease-in-out infinite;
}

.float-item-b {
  animation: floatDriftB 6.5s ease-in-out infinite;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
