/* Illuzion Apps - Global Styles & Tokens */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Premium Dark Theme Core */
  --bg-dark: #0f172a; /* Slate 900 */
  --bg-darker: #020617; /* Slate 950 */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  
  /* App Primary Colors (subtle sleek gradients) */
  --accent-echogram: #1d4ed8; /* Dark Blue */
  --accent-overlays: #38bdf8; /* Light Blue */
  --accent-elabels:  #8b5cf6; /* Violet/Purple */
  
  /* Glassmorphism System */
  --glass-bg: rgba(30, 41, 59, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(16px);
  
  /* Utilities */
  --radius-lg: 24px;
  --radius-md: 16px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-darker);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Dynamic Background Glow */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-glow::before, .bg-glow::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: floatOrb 20s infinite alternate cubic-bezier(0.25, 0.1, 0.25, 1);
}
.bg-glow::before {
  background: var(--accent-echogram);
  top: -10%;
  left: -10%;
}
.bg-glow::after {
  background: var(--accent-overlays);
  bottom: 0%;
  right: -10%;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 50px) scale(1.1); }
  100% { transform: translate(-50px, 150px) scale(0.9); }
}

/* Glass Navbar */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 8rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1.5px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

/* Grid & Cards */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.app-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: left;
  transition: all var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.app-card.echogram::before { background: var(--accent-echogram); }
.app-card.overlays::before { background: var(--accent-overlays); }
.app-card.elabels::before { background: var(--accent-elabels); }

.app-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(40, 50, 70, 0.5);
}

.app-card:hover::before {
  opacity: 1;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.app-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.app-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 2rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.05);
  margin-top: auto;
  align-self: flex-start;
}

.btn-download:hover {
  background: white;
  color: black;
  transform: scale(1.02);
}

/* Privacy Pages */
.doc-section {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 2rem;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  padding: 3rem;
}

.doc-section h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.doc-section h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.doc-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.doc-section a {
  color: var(--accent-echogram);
  text-decoration: none;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.8);
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-primary);
  text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .nav-links { display: none; } /* Could add a hamburger menu if needed */
  .doc-section { margin: 2rem; padding: 1.5rem; }
  .apps-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

/* --- EchoGram Landing Page Specific Styles --- */
.landing-hero {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 4rem;
}
.landing-hero .hero-content {
  flex: 1;
  text-align: left;
}
.landing-hero .hero-content h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1.5px;
}
.landing-hero .hero-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.landing-hero .hero-visual {
  flex: 1;
  position: relative;
  height: 500px;
  perspective: 1000px;
}
.mockup {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(59, 130, 246, 0.2);
  border: 1px solid var(--glass-border);
  transition: transform var(--transition-smooth);
}
.mockup-1 {
  width: 250px;
  top: 5%;
  left: 5%;
  transform: rotateY(-15deg) rotateX(5deg);
  z-index: 2;
  animation: floatMockup1 8s infinite alternate ease-in-out;
}
.mockup-2 {
  width: 250px;
  top: 25%;
  right: 5%;
  transform: rotateY(-10deg) rotateX(5deg) translateZ(-50px);
  z-index: 1;
  opacity: 0.8;
  animation: floatMockup2 10s infinite alternate ease-in-out;
}
@keyframes floatMockup1 {
  0% { transform: translateY(0) rotateY(-15deg) rotateX(5deg); }
  100% { transform: translateY(-20px) rotateY(-12deg) rotateX(8deg); }
}
@keyframes floatMockup2 {
  0% { transform: translateY(0) rotateY(-10deg) rotateX(5deg) translateZ(-50px); }
  100% { transform: translateY(-15px) rotateY(-8deg) rotateX(3deg) translateZ(-50px); }
}

.features-split {
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
}
.features-split .f-text {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}
.features-split .f-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.features-split .f-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.f-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.f-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-fast);
}
.f-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}
.f-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.f-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.f-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.showcase-section {
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
}
.showcase-row {
  display: flex;
  align-items: center;
  gap: 4rem;
  margin-bottom: 6rem;
}
.showcase-row:nth-child(even) {
  flex-direction: row-reverse;
}
.showcase-img {
  flex: 1;
  text-align: center;
}
.showcase-img img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-height: 480px;
  object-fit: cover;
}
.showcase-text {
  flex: 1;
}
.showcase-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.showcase-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .landing-hero {
    flex-direction: column;
    text-align: center;
    padding-top: 4rem;
  }
  .landing-hero .hero-content {
    text-align: center;
  }
  .landing-hero .app-icon {
    margin: 0 auto 2rem !important;
  }
  .landing-hero .btn-download {
    margin: 0 auto;
  }
  .landing-hero .hero-visual {
    height: 350px;
    width: 100%;
  }
  .mockup-1, .mockup-2 {
    width: 40vw;
  }
  .showcase-row, .showcase-row:nth-child(even) {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
}

/* --- Hamburger Menu Styles --- */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  z-index: 101;
  padding: 0;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex !important;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
  }
  .navbar .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
    display: flex !important; /* override the old display:none */
  }
  .navbar .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}
