/* ============================================================
   Homepage — PlanTodo product gateway
   Layout, animations, and pseudo-elements only.
   Colors/radius/shadows → Tailwind utilities in template.
   Reusable components → examples/tw_source.css.
   ============================================================ */

/* ---- Hero layout ---------------------------------------- */

.home-hero {
  position: relative;
  text-align: center;
  padding: clamp(5rem, 12vw, 8rem) var(--space-6) clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}

/* Atmospheric orb */
.home-hero-orb {
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 90vw);
  height: min(700px, 90vw);
  border-radius: 50%;
  background: radial-gradient(
    ellipse 60% 50% at 50% 40%,
    var(--color-accent-light) 0%,
    var(--color-accent-subtle) 45%,
    transparent 70%
  );
  pointer-events: none;
  animation: orb-breathe 8s ease-in-out infinite;
}

@keyframes orb-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(1.06); opacity: 1; }
}

.home-hero-title {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
  animation: hp-fade-up var(--duration-slow) var(--ease-out) both;
}

/* Subtle decorative dash under the title */
.home-hero-title::after {
  content: '';
  display: block;
  width: 2rem;
  height: 3px;
  margin: var(--space-4) auto 0;
  border-radius: 2px;
  background: var(--color-accent);
  opacity: 0.5;
}

.home-hero-tagline {
  position: relative;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 350;
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 420px;
  margin: 0 auto var(--space-10);
  animation: hp-fade-up var(--duration-slow) 0.12s var(--ease-out) both;
}

.home-hero-actions {
  position: relative;
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  animation: hp-fade-up var(--duration-slow) 0.22s var(--ease-out) both;
}

/* ---- Showcase layout ------------------------------------ */

.home-showcase {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6) var(--space-20);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-6);
}

/* Device frame — shared structure */
.device-frame {
  position: relative;
  overflow: hidden;
  animation: hp-fade-up var(--duration-slow) 0.30s var(--ease-out) both;
}

.device-screenshot {
  display: block;
  width: 100%;
  height: 100%;
}

/* Top bar */
.device-frame::before {
  content: '';
  display: block;
  height: 2rem;
  background: var(--color-border);
  border-bottom: 1px solid var(--color-border-light);
}

/* Three dots */
.device-frame::after {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  box-shadow:
    0.85rem 0 0 var(--color-text-tertiary),
    1.7rem 0 0 var(--color-text-tertiary);
}

/* Desktop frame */
.device-frame--desktop {
  width: min(780px, 72vw);
  flex-shrink: 0;
}

.device-frame--desktop .device-screen {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

/* Mobile frame */
.device-frame--mobile {
  width: min(240px, 32vw);
  aspect-ratio: 9 / 19;
  flex-shrink: 0;
  margin-bottom: -2rem;
  margin-left: -2.5rem;
  z-index: 2;
}

.device-frame--mobile::before {
  height: 2.5rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.device-frame--mobile::after {
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 0.35rem;
  border-radius: 1rem;
  top: 0.65rem;
  background: var(--color-text-tertiary);
  box-shadow: none;
}

.device-frame--mobile .device-screen {
  width: 100%;
  aspect-ratio: 9 / 19;
  overflow: hidden;
}

/* ---- Footer --------------------------------------------- */

.home-footer {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-align: center;
  animation: hp-fade-up var(--duration-slow) 0.38s var(--ease-out) both;
}

/* ---- Animations ----------------------------------------- */

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

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

@media (max-width: 768px) {
  .home-showcase {
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    padding-bottom: var(--space-12);
  }

  .device-frame--desktop {
    display: none;
  }

  .device-frame--mobile {
    width: min(300px, 82vw);
    margin-left: 0;
    margin-bottom: 0;
    margin-top: 0;
  }

  .home-hero {
    padding-top: clamp(3rem, 8vw, 5rem);
    padding-bottom: clamp(2rem, 5vw, 3rem);
  }
}

@media (max-width: 480px) {
  .home-hero-title {
    font-size: 2.4rem;
  }

  .home-hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .home-hero-actions .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .device-frame--mobile {
    width: min(280px, 88vw);
  }
}
