/*
 * Theme stylesheet for Stadtexam Coach landing page
 *
 * This stylesheet defines the look and feel of the landing page, drawing
 * inspiration from modern developer-focused sites like PostHog. It uses
 * gradients and dark backgrounds to create visual depth while preserving
 * readability. The layout is responsive, adapting from a multi‑column
 * layout on larger screens to a single column on smaller devices.
 */

/* Root variables make it easy to tweak colours and spacing across the
   entire site. */
:root {
  /* Updated colour palette: warm and professional. Inspired by parchment and classic law colours. */
  --color-primary: #1c3b57; /* deep blue‑grey primary accent */
  --color-secondary: #5a8f7b; /* muted teal accent */
  --color-bg: #fdf8f3; /* warm cream background */
  --color-surface: #ffffff; /* surface panels */
  --color-text: #1a2b40; /* dark primary text */
  --color-muted: #6d7d8d; /* muted text */
  --spacing-unit: 1rem;
  --max-width: 1200px;
  --radius: 0.75rem;
}

/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Use Open Sans for body text to enhance readability at normal weights. */
  font-family: 'Open Sans', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, transform 0.1s ease;
  cursor: pointer;
  text-align: center;
}

/* Primary button uses solid accent colour on light theme */
/* Primary buttons use a gradient accent to create visual interest */
.btn.primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #ffffff;
}

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

/* Secondary button has subtle outline on light theme */
.btn.secondary {
  background: rgba(19, 39, 67, 0.03);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn.secondary:hover {
  background: rgba(19, 39, 67, 0.08);
}

/* Container for consistent max width */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.navbar .logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.navbar .nav-buttons a {
  margin-left: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--color-primary);
}

.navbar .nav-buttons a.btn.secondary {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero Section */
/* Hero section uses the light abstract background */
/* Hero section uses deep navy & gold gradient background */
/* Hero section with warm light gradient background for a softer, more readable impression */
.hero {
  position: relative;
  min-height: 100vh;
  /* Use a soft parchment gradient instead of a dark background */
  background: linear-gradient(135deg, #fdf8f3 0%, #f4eee6 100%);
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-primary);
  overflow: hidden;
  padding-top: 6rem; /* offset for fixed navbar */
}

/* Dark overlay to improve text legibility */
/* Light overlay with subtle tint to improve legibility on light background */
/* Light overlay with subtle vignette to add depth without compromising readability */
.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 3rem 1rem;
}

/* Use a serif font for headings to convey professionalism */
.hero-title {
  font-family: 'Merriweather', serif;
  font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--color-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-muted);
  gap: 0.5rem;
  opacity: 0.8;
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, 5px);
  }
  60% {
    transform: translate(-50%, 3px);
  }
}

/* Section Titles */
.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  max-width: 600px;
  margin: 0 auto 2rem auto;
  font-size: 1rem;
  color: var(--color-muted);
  text-align: center;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2rem;
}

/* Feature cards on light theme: subtle border and shadow */
.feature {
  /* Each feature card uses a subtle gradient to add depth */
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(19, 39, 67, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Add pastel gradients to each feature card to make the design livelier */
.feature:nth-child(1) {
  background: var(--color-surface);
  border-top: 4px solid var(--color-secondary);
}

.feature:nth-child(2) {
  background: var(--color-surface);
  border-top: 4px solid #8e5a68;
}

.feature:nth-child(3) {
  background: var(--color-surface);
  border-top: 4px solid #5d7690;
}

/* Icon wrapper uses a light tint and icons inherit primary colour */
/* Wrapper for custom feature icons. The circular background uses the
   secondary colour to tie into the hero gradient and emphasise the
   supporting role of each feature. */
.icon-wrapper {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  /* Use a subtle tint of the secondary colour for the circle background */
  background: rgba(90, 143, 123, 0.2);
}

/* Default sizing for inline SVG icons. Ensure our custom feature
   icons are visible within the wrapper and scale appropriately. */
.icon {
  display: inline-block;
  width: 90%;
  height: 90%;
}

/* Custom icon wrapper to host our generated icons */
.feature .custom-icon img {
  width: 65%;
  height: 65%;
  object-fit: contain;
  display: block;
}

/* Stand‑alone feature icons (used in the refined design) */
.feature-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  display: block;
  object-fit: contain;
}

.feature h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* How It Works */
/* How it works section with alternating light tone */
/* How it works section uses a dark, dramatic background inspired by the hero gradient.
   On dark backgrounds, white text improves readability. */
.how-it-works {
  background: linear-gradient(180deg, #132743 0%, #1a3b52 100%);
  padding: 4rem 0;
  color: #ffffff;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Step cards with border and light shadow */
/* On the dark background, step cards use a semi‑transparent surface to stand out.
   A subtle border adds definition without harsh contrast. */
.step {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: left;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Step number circles use primary accent colour */
.step-number {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #ffffff;
  border-radius: 50%;
  /* Gradient using primary and secondary for step indicators */
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  margin-bottom: 1rem;
}

/* Headings inside dark cards should be bright for contrast */
.step h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

/* Paragraph text inside dark cards uses a soft off‑white tone for readability */
.step p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Subscribe section
   The call‑to‑action area uses the same dark gradient as the hero to
   create continuity and draw the eye downward. Text is inverted to
   maintain contrast. */
.subscribe {
  background: linear-gradient(180deg, #132743 0%, #1a3b52 100%);
  padding: 4rem 0;
  text-align: center;
  color: #ffffff;
}

/* Subtitle colour override for dark subscribe section */
.subscribe .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.subscribe-form {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* Input styles for light theme */
/* Input styles for dark background
   Inputs and their placeholder text are styled to be legible against the dark backdrop. */
.subscribe-form input {
  padding: 0.75rem 1rem;
  width: 300px;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1rem;
}

/* Lighter placeholder for dark background */
.subscribe-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.subscribe-form button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Success message uses the secondary accent on dark background */
.success-message {
  margin-top: 1.5rem;
  color: var(--color-secondary);
  font-weight: 500;
}

/* Footer */
.footer {
  background: var(--color-primary);
  padding: 2rem 0;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: #e7e7f0;
}

/* Responsive design */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  .nav-buttons a.btn.secondary {
    padding: 0.5rem 0.75rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .subscribe-form {
    flex-direction: column;
  }
  .subscribe-form input {
    width: 100%;
  }
  .scroll-indicator {
    display: none;
  }
}