/* ==========================================================================
   I2 AI Education Apps — Glassmorphism Design System
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #1a0a2e;
  --bg-tertiary: #0a1628;

  --text-primary: #f0f0f0;
  --text-secondary: #b0b0c0;
  --text-muted: #6a6a80;

  --accent-blue: #6c9fff;
  --accent-blue-glow: rgba(108, 159, 255, 0.3);
  --accent-gold: #d4a574;
  --accent-gold-glow: rgba(212, 165, 116, 0.2);

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-hover: rgba(255, 255, 255, 0.1);
  --glass-bg-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-blur: blur(20px);
  --glass-radius: 20px;

  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Body & Background Atmosphere --- */
body {
  font-family: var(--font-stack);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Gradient mesh background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(26, 10, 46, 0.8) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(10, 22, 40, 0.9) 0%, transparent 50%),
    linear-gradient(160deg, var(--bg-primary) 0%, var(--bg-secondary) 40%, var(--bg-tertiary) 100%);
  z-index: -3;
}

/* Floating ambient blobs for depth */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  z-index: -2;
  pointer-events: none;
}

.bg-blob--blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108, 159, 255, 0.4) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: blob-drift-1 25s ease-in-out infinite alternate;
}

.bg-blob--purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(120, 60, 200, 0.35) 0%, transparent 70%);
  bottom: -5%;
  left: -10%;
  animation: blob-drift-2 30s ease-in-out infinite alternate;
}

.bg-blob--gold {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 40%;
  animation: blob-drift-3 20s ease-in-out infinite alternate;
}

@keyframes blob-drift-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.1); }
}

@keyframes blob-drift-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.05); }
}

@keyframes blob-drift-3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, -30px) scale(1.15); }
}

/* --- Glass Base --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
}

/* --- Selection --- */
::selection {
  background: var(--accent-blue);
  color: var(--bg-primary);
}

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Links --- */
a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #93b8ff;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(10, 10, 26, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 100;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  color: var(--text-primary);
  opacity: 0.8;
}

.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
}

.nav-breadcrumb .separator {
  color: var(--text-muted);
  font-weight: 300;
}

.nav-breadcrumb .current {
  color: var(--text-secondary);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  transition: color 0.2s ease;
}

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: calc(var(--nav-height) + 6rem) 2rem 4rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
  animation: fade-up 0.8s ease-out both;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--accent-gold);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  animation: fade-up 0.8s ease-out 0.15s both;
}

.hero .tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
  animation: fade-up 0.8s ease-out 0.3s both;
}

.hero .positioning {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
  max-width: 640px;
  margin: 1rem auto 0;
  animation: fade-up 0.8s ease-out 0.4s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 2.5rem;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Card Grid
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.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(--glass-radius);
  padding: 2rem;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 60px rgba(108, 159, 255, 0.05);
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card .card-subtitle {
  font-size: 0.9rem;
  color: var(--accent-gold);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.card-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-blue);
  transition: gap 0.2s ease;
}

.card-link::after {
  content: ' \2192';
  transition: transform 0.2s ease;
  display: inline-block;
}

.card:hover .card-link::after {
  transform: translateX(4px);
}

/* --- Pillar Cards --- */
.card--pillar {
  position: relative;
  padding-top: 2.5rem;
}

.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: rgba(108, 159, 255, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(108, 159, 255, 0.2);
  margin-bottom: 1rem;
}

.pill--gold {
  background: rgba(212, 165, 116, 0.12);
  color: var(--accent-gold);
  border-color: rgba(212, 165, 116, 0.2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-stack);
  color: var(--accent-blue);
  background: rgba(108, 159, 255, 0.08);
  border: 1px solid rgba(108, 159, 255, 0.25);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: rgba(108, 159, 255, 0.15);
  border-color: rgba(108, 159, 255, 0.4);
  box-shadow: 0 0 20px var(--accent-blue-glow);
  color: var(--accent-blue);
}

/* ==========================================================================
   Privacy Policy Section
   ========================================================================== */
.privacy-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.privacy-section .privacy-container {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  padding: 3rem;
}

.privacy-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.privacy-section .privacy-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.privacy-section .privacy-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.privacy-section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.privacy-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.privacy-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.privacy-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.privacy-section ul,
.privacy-section ol {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.privacy-section li {
  margin-bottom: 0.35rem;
}

.privacy-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.privacy-section a {
  word-break: break-word;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--text-secondary);
}

.footer p + p {
  margin-top: 0.5rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .nav {
    padding: 0 1.25rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 260px;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--glass-border);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .hero {
    padding: calc(var(--nav-height) + 3rem) 1.25rem 2.5rem;
  }

  .section {
    padding: 2.5rem 1.25rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.5rem;
  }

  .privacy-section {
    padding: 2.5rem 1.25rem;
  }

  .privacy-section .privacy-container {
    padding: 1.75rem;
  }

  .bg-blob--blue {
    width: 350px;
    height: 350px;
  }

  .bg-blob--purple {
    width: 300px;
    height: 300px;
  }

  .bg-blob--gold {
    width: 200px;
    height: 200px;
  }
}
