/* ---
--- 1. Base & Variables
--- */

:root {
  --light-bg: #f9f9f9;
  --light-text: #1d1d1f;
  --dark-bg: #121212;
  --dark-text: #eaeaea;
  --accent-color: #007aff;
  --spacing-unit: 8px;
  --max-width: 1100px;
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

/* Dark Mode Color Scheme */
@media (prefers-color-scheme: dark) {
  :root {
    --light-bg: #121212; /* In dark mode, 'light-bg' becomes the dark background */
    --light-text: #eaeaea; /* In dark mode, 'light-text' becomes the light text */
  }
  .hero-image img {
    opacity: 0.9;
  }
}

/* ---
--- 2. General Styles & Typography
--- */

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  line-height: 1.6;
  background-color: var(--light-bg);
  color: var(--light-text);
  margin: 0;
  padding: 0;
  font-size: 16px;
  transition:
    background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: calc(var(--spacing-unit) * 2);
  font-weight: 600;
}

h1 {
  font-size: 2.5rem; /* 40px */
  line-height: 1.2;
}

h2 {
  font-size: 2rem; /* 32px */
  line-height: 1.3;
}

p {
  margin-top: 0;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

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

a:hover {
  opacity: 0.8;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
}

/* ---
--- 3. Header & Footer
--- */

.main-header,
.main-footer {
  padding: calc(var(--spacing-unit) * 2) 0;
}

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

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--light-text);
}

.nav-link {
  margin-left: calc(var(--spacing-unit) * 3);
  font-weight: 500;
}

.nav-link.active {
  color: var(--accent-color);
  font-weight: 600;
}

.main-footer {
  text-align: center;
  margin-top: calc(var(--spacing-unit) * 8);
  color: #888;
}

@media (prefers-color-scheme: dark) {
  .main-footer {
    color: #666;
  }
}

/* ---
--- 4. Sections
--- */

section {
  padding: calc(var(--spacing-unit) * 8) 0;
}

/* Hero Section */
.hero-section .container {
  text-align: center;
}

.hero-content {
  max-width: 750px;
  margin: 0 auto calc(var(--spacing-unit) * 5);
}

.subtitle {
  font-size: 1.25rem;
  color: #555;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

@media (prefers-color-scheme: dark) {
  .subtitle {
    color: #aaa;
  }
}

.cta-button {
  background-color: var(--accent-color);
  color: #fff;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-block;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Features Section */
.features-section .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--spacing-unit) * 4);
  text-align: center;
}

.feature h2 {
  font-size: 1.5rem; /* 24px */
}
.feature p {
  color: #555;
}
@media (prefers-color-scheme: dark) {
  .feature p {
    color: #aaa;
  }
}

/* FAQ Section */
.faq-section .container {
  max-width: 750px;
}
.faq-section h2 {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 5);
}

.faq-item {
  border-bottom: 1px solid #e5e5e5;
}
@media (prefers-color-scheme: dark) {
  .faq-item {
    border-bottom-color: #333;
  }
}
.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: calc(var(--spacing-unit) * 2.5) 0;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--light-text);
}

.faq-icon {
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform var(--transition-speed) ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.faq-answer p {
  padding-bottom: calc(var(--spacing-unit) * 2);
  color: #555;
}
@media (prefers-color-scheme: dark) {
  .faq-answer p {
    color: #aaa;
  }
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* ---
--- 5. Responsive
--- */

@media (max-width: 1100px) {
  .features-section .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  .hero-content {
    margin-bottom: calc(var(--spacing-unit) * 4);
  }
  section {
    padding: calc(var(--spacing-unit) * 6) 0;
  }
  .features-section .container {
    grid-template-columns: 1fr;
  }
}
