/* ============================================
   Teenysofts — Landing Page Styles
   Dark-first, responsive, pure CSS
   ============================================ */

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

:root {
  --accent: #3898FF;
  --accent-light: #5aadff;
  --accent-glow: rgba(56, 152, 255, 0.15);
  --accent-subtle: rgba(56, 152, 255, 0.08);
  --bg: #0a0a0f;
  --bg-card: #14141f;
  --bg-card-hover: #1a1a2a;
  --surface: #1c1c2e;
  --border: #2a2a3e;
  --border-subtle: #1e1e30;
  --text: #e8e8ef;
  --text-muted: #8888a0;
  --text-dim: #5c5c72;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 40px rgba(56, 152, 255, 0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f8fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4ff;
    --surface: #eeeef4;
    --border: #dddde8;
    --border-subtle: #e8e8f0;
    --text: #1a1a2e;
    --text-muted: #6e6e80;
    --text-dim: #9999aa;
    --accent-glow: rgba(56, 152, 255, 0.08);
    --accent-subtle: rgba(56, 152, 255, 0.05);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 40px rgba(56, 152, 255, 0.1);
  }
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

@media (prefers-color-scheme: light) {
  .nav {
    background: rgba(248, 248, 252, 0.85);
  }
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  color: var(--text);
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-contact {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color var(--transition), color var(--transition);
}

.nav-contact:hover {
  border-color: var(--accent);
}

/* --- Hero --- */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 24px;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.hero-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(56, 152, 255, 0.35);
  background: var(--accent-light);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

/* --- Apps Section --- */
.apps-section {
  padding-bottom: 100px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 460px;
  margin: 0 auto;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* --- App Card --- */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  /* Fade-in animation (driven by IntersectionObserver) */
  opacity: 0;
  transform: translateY(24px);
}

.app-card.visible {
  animation: fadeUp 0.6s ease-out forwards;
}

.app-card.visible:nth-child(1) { animation-delay: 0s; }
.app-card.visible:nth-child(2) { animation-delay: 0.08s; }
.app-card.visible:nth-child(3) { animation-delay: 0.16s; }
.app-card.visible:nth-child(4) { animation-delay: 0.24s; }
.app-card.visible:nth-child(5) { animation-delay: 0.32s; }
.app-card.visible:nth-child(6) { animation-delay: 0.4s; }
.app-card.visible:nth-child(7) { animation-delay: 0.48s; }

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}

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

/* Featured card */
.app-card.featured {
  border-color: rgba(56, 152, 255, 0.3);
  background: linear-gradient(180deg, var(--accent-subtle) 0%, var(--bg-card) 40%);
}

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

.app-card.featured:hover {
  border-color: rgba(56, 152, 255, 0.5);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-live {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-ready {
  background: rgba(56, 152, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 152, 255, 0.25);
}

.badge-soon {
  background: rgba(251, 146, 60, 0.1);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.15);
}

.app-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.app-card .description {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}

.card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.card-link {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.card-link:hover {
  color: var(--accent);
}

/* Card accent colors */
.app-card[data-accent="blue"] { --card-accent: #3898FF; }
.app-card[data-accent="green"] { --card-accent: #22c55e; }
.app-card[data-accent="orange"] { --card-accent: #fb923c; }
.app-card[data-accent="red"] { --card-accent: #ef4444; }
.app-card[data-accent="purple"] { --card-accent: #a78bfa; }
.app-card[data-accent="green-alt"] { --card-accent: #2ECC71; }
.app-card[data-accent="cyan"] { --card-accent: #22d3ee; }

/* More card (dashed placeholder) */
.more-card {
  border-style: dashed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.more-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--accent);
}

.more-inner {
  text-align: center;
}

.more-icon {
  font-size: 2rem;
  opacity: 0.4;
  margin-bottom: 8px;
  line-height: 1;
}

.more-card h3 {
  color: var(--text-muted);
  font-weight: 600;
}

.more-card .description {
  margin-bottom: 0;
}

/* --- About Section --- */
.about-section {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-content {
  opacity: 0;
  transform: translateY(24px);
}

.about-content.visible {
  animation: fadeUp 0.6s ease-out forwards;
}

.about-content h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  line-height: 1.2;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-content p:last-of-type {
  margin-bottom: 0;
}

/* Stats */
.stats-bar {
  display: flex;
  gap: 48px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateY(24px);
}

.stats-bar.visible {
  animation: fadeUp 0.5s ease-out 0.2s forwards;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 2px;
}

/* Philosophy Cards */
.philosophy-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition);
  opacity: 0;
  transform: translateY(24px);
}

.philosophy-card.visible {
  animation: fadeUp 0.5s ease-out forwards;
}

.philosophy-card.visible:nth-child(1) { animation-delay: 0.1s; }
.philosophy-card.visible:nth-child(2) { animation-delay: 0.2s; }
.philosophy-card.visible:nth-child(3) { animation-delay: 0.3s; }

.philosophy-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.philosophy-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.philosophy-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.philosophy-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.footer-brand span {
  color: var(--accent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-privacy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-privacy-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
}

.footer-privacy .footer-links {
  gap: 16px;
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-made {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: if JS is disabled, show everything */
@media (scripting: none) {
  .app-card,
  .philosophy-card,
  .about-content,
  .stats-bar {
    opacity: 1;
    transform: none;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero::before {
    width: 500px;
    height: 500px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-contact {
    padding: 4px 12px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .stats-bar {
    gap: 32px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-privacy {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-made {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 100px 0 48px;
  }

  .hero::before {
    width: 350px;
    height: 350px;
  }

  .nav-links {
    gap: 12px;
  }

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

  .nav-contact {
    font-size: 0.82rem;
  }

  .app-card {
    padding: 24px 20px;
  }

  .stats-bar {
    flex-wrap: wrap;
    gap: 24px;
  }

  .philosophy-card {
    padding: 20px;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .app-card,
  .philosophy-card,
  .about-content,
  .stats-bar {
    opacity: 1;
    transform: none;
  }
}
