/* ============================================
   ODIN Tech App Hub — Glassmorphism + ODIN Palette
   ============================================ */

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

:root {
  /* ODIN Palette */
  --orchid: #6A1B9A;
  --fuchsia: #C2185B;
  --magenta: #E91E63;
  --orange: #FF5722;
  --yellow: #FFEB3B;

  /* Neutrals */
  --cosmic: #1A1A2E;
  --gray-dark: #212121;
  --white: #ffffff;

  /* Glass tokens */
  --glass-bg: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-blur: 24px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Text contrast */
  --text-glow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
  --text-glow-strong: 0 2px 12px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.4);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Animated Gradient Background --- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    135deg,
    var(--orchid) 0%,
    var(--fuchsia) 25%,
    var(--magenta) 50%,
    var(--orange) 75%,
    var(--yellow) 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Subtle inner glow for glass cards */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* --- Header --- */
.header {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  text-align: center;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.logo-container {
  padding: 16px 32px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo {
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.4s ease;
}

.logo:hover {
  transform: scale(1.03);
}

.tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.02em;
  text-shadow: var(--text-glow);
}

/* --- Intro Section --- */
.intro-section {
  padding: 0 0 var(--space-xl);
}

.intro-card {
  padding: var(--space-lg);
}

.intro-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--white) 0%, rgba(255, 255, 255, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.intro-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--white);
  max-width: 800px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.intro-text strong {
  color: var(--white);
  font-weight: 600;
}

.intro-stats {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: background 0.3s ease, transform 0.3s ease;
}

.stat:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: var(--text-glow-strong);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* --- Section Titles --- */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-xs);
  text-shadow: var(--text-glow);
  background: linear-gradient(135deg, var(--white) 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.section-subtitle {
  text-align: center;
  color: var(--white);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* --- Apps Grid --- */
.apps-section {
  padding: 0 0 var(--space-xl);
}

.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .apps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- App Card --- */
.app-card {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.app-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.35);
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px;
  flex-shrink: 0;
}

.app-card-titles {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: text-shadow 0.3s ease;
}

.app-card:hover .app-name {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.app-category {
  font-size: 0.8rem;
  color: var(--white);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.app-description {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.app-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-features li {
  font-size: 0.85rem;
  color: var(--white);
  padding-left: 1.2em;
  position: relative;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.app-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--magenta);
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--orchid), var(--fuchsia));
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  width: fit-content;
}

.app-link:hover {
  background: linear-gradient(135deg, var(--fuchsia), var(--magenta));
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.4);
}

.app-link svg {
  transition: transform 0.3s ease;
}

.app-link:hover svg {
  transform: translate(2px, -2px);
}

/* --- Comparison Table --- */
.comparison-section {
  padding: 0 0 var(--space-xl);
}

.table-wrap {
  overflow-x: auto;
  padding: var(--space-sm);
  -webkit-overflow-scrolling: touch;
}

/* Scroll hint on mobile */
@media (max-width: 480px) {
  .table-wrap {
    mask-image: linear-gradient(
      to right,
      black 0%,
      black 85%,
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      black 0%,
      black 85%,
      transparent 100%
    );
  }
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.comparison-table th {
  font-weight: 600;
  color: var(--white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.comparison-table tbody tr {
  transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.comparison-table td:first-child {
  font-weight: 600;
}

/* --- Footer --- */
.footer {
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
}

.footer-brand {
  font-size: 0.85rem;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.footer-note {
  font-size: 0.8rem;
  color: var(--white);
  opacity: 0.75;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* --- Responsive Tweaks --- */

/* Tablets & Small Laptops */
@media (max-width: 767px) {
  .header {
    padding: var(--space-lg) var(--space-sm) var(--space-md);
  }

  .logo-container {
    padding: 12px 24px;
  }

  .logo {
    max-width: 200px;
  }

  .tagline {
    font-size: 1rem;
  }

  .intro-card {
    padding: var(--space-md);
  }

  .intro-title {
    font-size: 1.35rem;
  }

  .intro-stats {
    gap: var(--space-md);
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .stat {
    padding: var(--space-xs) var(--space-sm);
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 0.88rem;
  }

  .app-card {
    padding: var(--space-md);
  }

  .app-card-header {
    gap: var(--space-sm);
  }

  .app-icon {
    width: 52px;
    height: 52px;
  }

  .app-name {
    font-size: 1.15rem;
  }

  .app-description {
    font-size: 0.88rem;
  }

  .app-features li {
    font-size: 0.82rem;
  }

  .app-link {
    padding: 10px 18px;
    font-size: 0.88rem;
  }

  .comparison-table {
    font-size: 0.8rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
  }

  .footer {
    padding: var(--space-md) var(--space-sm);
  }

  .footer-brand {
    font-size: 0.8rem;
  }

  .footer-note {
    font-size: 0.75rem;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  .header {
    padding: var(--space-md) var(--space-sm) var(--space-sm);
  }

  .logo-container {
    padding: 10px 18px;
    border-radius: 12px;
  }

  .logo {
    max-width: 150px;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .intro-card {
    padding: var(--space-sm);
  }

  .intro-title {
    font-size: 1.2rem;
  }

  .intro-text {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .intro-stats {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .stat {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
  }

  .stat-num {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .section-subtitle {
    font-size: 0.82rem;
  }

  .app-card {
    padding: var(--space-sm);
  }

  .app-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .app-icon {
    width: 48px;
    height: 48px;
  }

  .app-name {
    font-size: 1.1rem;
  }

  .app-category {
    font-size: 0.72rem;
  }

  .app-description {
    font-size: 0.84rem;
  }

  .app-features li {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .app-link {
    padding: 12px 20px;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }

  /* Table: horizontal scroll with hint */
  .table-wrap {
    padding: var(--space-xs);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .comparison-table {
    min-width: 480px;
    font-size: 0.75rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 8px 8px;
  }

  .footer {
    padding: var(--space-sm);
  }

  .footer-brand {
    font-size: 0.75rem;
  }

  .footer-note {
    font-size: 0.7rem;
  }
}
