/* ============================================
   오늘사주 Landing Page — style.css
   "밤하늘의 달빛과 별" 다크모드 테마
   ============================================ */

/* --- 1. CSS Reset & Variables --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 앱 다크모드 토큰 — 밝기 보정 v3 */
  --bg-primary: hsl(230, 30%, 18%);
  --bg-card: hsl(232, 26%, 26%);
  --bg-muted: hsl(232, 22%, 23%);
  --bg-secondary: hsl(232, 24%, 20%);
  --color-primary: hsl(248, 74%, 76%);
  --color-accent: hsl(43, 60%, 66%);
  --text-primary: hsl(258, 30%, 97%);
  --text-muted: hsl(258, 19%, 69%);
  --text-secondary: hsl(255, 23%, 86%);
  --border-color: hsl(234, 19%, 35%);
  --color-destructive: hsl(0, 60%, 56%);
  --color-success: hsl(172, 55%, 54%);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;

  /* Typography */
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* --- 2. Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}

/* --- 3. Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav-scrolled {
  background: rgba(18, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-color);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- 4. Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 80px;
  background:
    radial-gradient(ellipse at 50% 0%, hsla(248, 65%, 30%, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, hsla(43, 50%, 30%, 0.1) 0%, transparent 50%),
    var(--bg-primary);
}

.hero-inner {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  gap: 48px;
  width: 100%;
  padding: 0 20px;
}

.hero-content {
  flex: 1;
  text-align: left;
}

.hero-image {
  flex: 0 0 auto;
}

.hero-image img {
  max-height: 580px;
  width: auto;
  border-radius: 24px;
  filter: drop-shadow(0 20px 60px hsla(248, 65%, 40%, 0.3));
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: hsla(248, 65%, 68%, 0.15);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid hsla(248, 65%, 68%, 0.25);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- 5. Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 24px hsla(248, 65%, 68%, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px hsla(248, 65%, 68%, 0.4);
  color: var(--bg-primary);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--text-primary);
}

.btn-store {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  font-size: 0.95rem;
}

.btn-store:hover {
  border-color: var(--color-accent);
  color: var(--text-primary);
}

.btn-store-icon {
  font-size: 1.4rem;
}

/* --- 6. Features --- */
.features {
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- 6.5. App Showcase --- */
.app-showcase {
  background:
    radial-gradient(ellipse at 30% 50%, hsla(248, 65%, 30%, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, hsla(43, 50%, 30%, 0.08) 0%, transparent 50%),
    var(--bg-primary);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.showcase-item {
  text-align: center;
}

.showcase-image {
  margin-bottom: 20px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px hsla(230, 40%, 4%, 0.5);
  transition: transform 0.4s ease;
}

.showcase-image:hover {
  transform: translateY(-8px) scale(1.02);
}

.showcase-image img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-label {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-accent);
}

.showcase-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- 7. How It Works --- */
.steps {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  text-align: center;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: hsla(248, 65%, 68%, 0.15);
  color: var(--color-primary);
  font-size: 1.4rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 2px solid hsla(248, 65%, 68%, 0.3);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-arrow {
  display: flex;
  align-items: center;
  color: var(--color-accent);
  font-size: 1.5rem;
  padding-top: 20px;
}

/* --- 8. Pricing --- */
.pricing {
  background: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 40px hsla(248, 65%, 68%, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--bg-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
}

.pricing-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 8px;
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.pricing-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--color-success);
  font-weight: 700;
}

.pricing-features li.disabled {
  color: var(--text-muted);
  text-decoration: line-through;
}

.pricing-features li.disabled::before {
  content: '\2717';
  color: var(--text-muted);
}

.credits-info {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.credits-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.credits-options {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.credit-option {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 24px;
}

.credit-option strong {
  display: block;
  font-size: 1.1rem;
  color: var(--color-accent);
}

.credit-option span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 9. CTA --- */
.cta-section .hero-buttons {
  justify-content: center;
}

.cta-section {
  text-align: center;
  padding: 80px 20px;
  background:
    radial-gradient(ellipse at 50% 100%, hsla(43, 50%, 30%, 0.15) 0%, transparent 60%),
    var(--bg-primary);
}

.cta-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* --- 10. Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

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

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

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

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

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

/* --- 11. Legal Pages --- */
.legal-hero {
  padding: 120px 0 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, hsla(248, 65%, 30%, 0.2) 0%, transparent 60%),
    var(--bg-primary);
}

.legal-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  color: var(--color-accent);
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 16px 0 8px;
}

.legal-section p,
.legal-section li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-section ul,
.legal-section ol {
  padding-left: 24px;
  margin: 8px 0;
}

.legal-section li {
  margin-bottom: 4px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.legal-table th,
.legal-table td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.legal-table th {
  background: var(--bg-muted);
  font-weight: 600;
  color: var(--text-primary);
}

.legal-table td {
  color: var(--text-secondary);
}

/* --- 12. 404 Page --- */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.not-found-icon {
  font-size: 5rem;
  margin-bottom: 24px;
}

.not-found-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.not-found-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* --- 13. Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.glow {
  animation: glow 2s ease-in-out infinite;
}

/* --- 14. Responsive --- */

/* Tablet (640px+) */
@media (min-width: 640px) {
  .hero-title { font-size: 3.5rem; }
  .section { padding: 100px 0; }
}

/* Desktop (768px+) */
@media (min-width: 768px) {
  .container { padding: 0 40px; }
}

/* Large Desktop (1024px+) */
@media (min-width: 1024px) {
  .hero-title { font-size: 4rem; }
}

/* Mobile (639px-) */
@media (max-width: 639px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(18, 22, 40, 0.98);
    backdrop-filter: blur(12px);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero { padding: 100px 20px 60px; }
  .hero-inner { flex-direction: column-reverse; gap: 32px; padding: 0; }
  .hero-content { text-align: center; }
  .hero-image img { max-height: 400px; }
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-buttons { justify-content: center; }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 320px;
    margin: 0 auto;
  }

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

  .steps { flex-direction: column; align-items: center; }
  .step-arrow { display: none; }

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

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

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }

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

  .credits-options { flex-direction: column; }
}

/* Medium devices - 2 column grid */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-inner { flex-direction: column-reverse; gap: 32px; }
  .hero-content { text-align: center; }
  .hero-image img { max-height: 480px; }
  .hero-buttons { justify-content: center; }

  .showcase-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid .pricing-card:last-child {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
  }
}
