/* Base Styles for AI 연애 오답노트 */

/* 1. CSS Variables (Design Tokens) */
:root {
  --color-primary: #5a7d7c; /* Deep Teal */
  --color-secondary: #e0b4a4; /* Soft Rose Gold */
  --color-accent: #f0c987; /* Muted Gold */
  --color-text-dark: #333333;
  --color-text-light: #ffffff;
  --color-bg-light: #f9f9f9;
  --color-bg-dark: #2c3e50; /* Dark Blue-Gray for contrast */
  --color-border: #dddddd;

  --font-family-body: 'Noto Sans KR', sans-serif;
  --font-family-heading: 'Playfair Display', serif;

  --spacing-unit: 8px;
  --container-max-width: 1200px;
}

/* 2. Basic Reset & Box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  color: var(--color-primary);
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.2;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-text-light); /* Adjusted for header background */
}

h2 {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 5);
}

h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

p {
  margin-bottom: calc(var(--spacing-unit) * 2.5);
  font-size: 1.1rem;
}

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

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

/* 4. Utility Classes */
.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(var(--spacing-unit) * 2.5);
  padding-right: calc(var(--spacing-unit) * 2.5);
}

/* 5. Header */
.main-header {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: calc(var(--spacing-unit) * 3) 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.main-header .logo {
  margin: 0;
  font-size: 1.8rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: calc(var(--spacing-unit) * 4);
}

.main-nav a {
  color: var(--color-text-light);
  font-weight: 400;
  font-size: 1.1rem;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* 6. Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-bg-dark) 100%);
  color: var(--color-text-light);
  padding: calc(var(--spacing-unit) * 10) 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh; /* Make it visually prominent */
}

.hero-section h2 {
  color: var(--color-text-light);
  font-size: 2.8rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-section p {
  font-size: 1.25rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: calc(var(--spacing-unit) * 5);
}

/* 7. Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--color-secondary);
  color: var(--color-text-dark);
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 5);
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 8. Section General Styling */
section {
  padding: calc(var(--spacing-unit) * 8) 0;
}

.assessment-section,
.results-section {
  background-color: var(--color-bg-light);
  text-align: center;
}

/* 9. Footer */
.main-footer {
  background-color: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: calc(var(--spacing-unit) * 5) 0;
  font-size: 0.9rem;
  text-align: center;
}

.main-footer .footer-links {
  margin-top: calc(var(--spacing-unit) * 2);
}

.main-footer .footer-links a {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 calc(var(--spacing-unit) * 2);
}

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

/* 10. Responsive Adjustments */
@media (max-width: 768px) {
  .main-header .container {
    flex-direction: column;
    text-align: center;
  }

  .main-nav ul {
    margin-top: calc(var(--spacing-unit) * 3);
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }

  .hero-section h2 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .btn-primary {
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .main-header .logo {
    font-size: 1.5rem;
  }

  .main-nav a {
    font-size: 1rem;
  }

  .hero-section {
    min-height: 60vh;
    padding: calc(var(--spacing-unit) * 8) 0;
  }

  .hero-section h2 {
    font-size: 1.8rem;
  }

  .hero-section p {
    font-size: 0.9rem;
  }

  .main-footer .footer-links {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
  }

  .main-footer .footer-links a {
    margin: 0;
  }
}