/* ==========================================================================
   IMAGINING.CO APP HUB — LIGHT & MODERN LUXURY DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette - Light Theme */
  --bg-page: #F8FAFC;
  --bg-canvas: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFFFF;

  --border-card: #E2E8F0;
  --border-card-hover: #CBD5E1;
  --border-subtle: #F1F5F9;

  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;

  --primary-brand: #4F46E5;
  --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
  --brand-glow: rgba(79, 70, 229, 0.15);

  --btn-bg: #0F172A;
  --btn-text: #FFFFFF;
  --btn-hover-bg: #4F46E5;

  /* Typography */
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 20px 35px -8px rgba(79, 70, 229, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.04);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 350ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Lights (Claros y Suaves) */
.ambient-light {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.light-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.light-orb-1 {
  width: 450px;
  height: 450px;
  top: -120px;
  left: 10%;
  background: radial-gradient(circle, #E0E7FF 0%, rgba(224, 231, 255, 0) 70%);
}

.light-orb-2 {
  width: 500px;
  height: 500px;
  top: 35%;
  right: 5%;
  background: radial-gradient(circle, #FCE7F3 0%, rgba(252, 231, 243, 0) 70%);
  animation-duration: 18s;
  animation-delay: -4s;
}

.light-orb-3 {
  width: 400px;
  height: 400px;
  bottom: -50px;
  left: 25%;
  background: radial-gradient(circle, #E0F2FE 0%, rgba(224, 242, 254, 0) 70%);
  animation-duration: 15s;
  animation-delay: -8s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Main Page Wrapper */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.main-header {
  margin-bottom: 3.5rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 3rem;
}

.logo-box {
  display: flex;
  align-items: center;
}

.main-logo-img {
  max-height: 80px;
  width: auto;
  max-width: 380px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-bounce);
}

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

.brand-fallback-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-badge {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
  transition: transform var(--transition-bounce);
}

.logo-box:hover .brand-badge {
  transform: scale(1.06) rotate(4deg);
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-domain {
  color: var(--primary-brand);
}

.brand-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Status Indicator */
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-full);
}

.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #065F46;
}

/* Hero Text */
.hero-text-area {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   CARDS GRID (6 APPS)
   ========================================================================== */

.main-content {
  flex: 1;
  margin-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* App Card */
.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  overflow: hidden;
}

/* Top colored accent line on hover */
.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color, var(--primary-brand));
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-hover);
}

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

/* Card Top Bar */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.app-logo-frame {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  background: var(--gradient-bg, var(--primary-gradient));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  transition: transform var(--transition-bounce);
  overflow: hidden;
  padding: 6px;
}

.app-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.app-card:hover .app-logo-frame {
  transform: scale(1.08) rotate(3deg);
}

.badge-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #DCFCE7;
}

/* Card Info */
.card-info {
  margin-bottom: 1.6rem;
  flex: 1;
}

.app-name {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.app-description {
  font-size: 0.9125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Card Action Button */
.card-action {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.launch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--btn-text);
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.launch-btn svg {
  transition: transform var(--transition-fast);
}

.launch-btn:hover {
  background: var(--btn-hover-bg);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

.launch-btn:hover svg {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.main-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-card);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--primary-brand);
}

.nav-divider {
  color: var(--text-light);
}

.app-card.card-centered {
  grid-column: 2 / 3;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-card.card-centered {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: calc((100% - 2rem) / 2);
  }
}

@media (max-width: 640px) {
  .page-wrapper {
    padding: 1.5rem 1rem 3rem 1rem;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
  }

  .main-logo-img {
    max-height: 60px;
    max-width: 280px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .app-card.card-centered {
    grid-column: auto;
    max-width: 100%;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
