/**
 * Fun AI Class - BMW Motorsport inspired styling
 * Colors: BMW blue, M red, dark blue/grey, light grey
 */

:root {
  --bmw-blue: #0066B3;
  --bmw-blue-light: #1C69D4;
  --bmw-m-red: #E7222E;
  --bmw-dark-blue: #16588E;
  --bmw-oxford: #031E49;
  --bmw-indigo: #2D4046;
  --bmw-jet: #B8CAD1;
  --white: #FFFFFF;
  --black: #0a0a0a;
  --font-heading: 'Oswald', 'Rajdhani', sans-serif;
  --font-body: 'Rajdhani', 'Segoe UI', sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(3, 30, 73, 0.15);
  --max-width: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.5;
  color: var(--bmw-oxford);
  background: var(--white);
  min-height: 100vh;
}

a {
  color: var(--bmw-blue);
  text-decoration: none;
}

a:hover {
  color: var(--bmw-m-red);
  text-decoration: underline;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); }

/* Layout */
.site-header {
  background: var(--bmw-oxford);
  color: var(--white);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow);
}

.site-header a {
  color: var(--white);
}

.site-header a:hover {
  color: var(--bmw-jet);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-lg);
}

.site-nav a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.hero {
  text-align: center;
  padding: var(--space-2xl) 0;
  border-bottom: 4px solid var(--bmw-m-red);
  margin-bottom: var(--space-2xl);
}

.hero h1 {
  color: var(--bmw-oxford);
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.125rem;
  color: var(--bmw-indigo);
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

.topics {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 640px) {
  .topics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .topics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.topic-card {
  background: var(--white);
  border: 2px solid var(--bmw-jet);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.topic-card:hover {
  border-color: var(--bmw-blue);
  box-shadow: 0 4px 12px rgba(0, 102, 179, 0.2);
}

.topic-card h3 {
  color: var(--bmw-dark-blue);
  margin-bottom: var(--space-sm);
}

.topic-card h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--bmw-m-red);
  margin-right: var(--space-sm);
  vertical-align: middle;
}

.topic-card p {
  margin: 0;
  color: var(--bmw-indigo);
}

.site-footer {
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bmw-oxford);
  color: var(--bmw-jet);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--bmw-jet);
}

.site-footer a:hover {
  color: var(--white);
}

/* Buttons (shared with survey) */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--bmw-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--bmw-dark-blue);
  color: var(--white);
  text-decoration: none;
}

.btn-accent {
  background: var(--bmw-m-red);
  color: var(--white);
}

.btn-accent:hover {
  background: #c41e28;
  color: var(--white);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--bmw-blue);
  border: 2px solid var(--bmw-blue);
}

.btn-outline:hover {
  background: var(--bmw-blue);
  color: var(--white);
  text-decoration: none;
}

/* Survey form */
.survey-page {
  max-width: 640px;
  margin: 0 auto;
}

.survey-form .field {
  margin-bottom: var(--space-lg);
}

.survey-form label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--bmw-oxford);
}

.survey-form input[type="text"],
.survey-form textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--bmw-jet);
  border-radius: var(--radius);
}

.survey-form input:focus,
.survey-form textarea:focus {
  outline: none;
  border-color: var(--bmw-blue);
}

.survey-form textarea {
  min-height: 100px;
  resize: vertical;
}

.survey-form .radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.survey-form .radio-group label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
  cursor: pointer;
}

.survey-form input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--bmw-blue);
}

.survey-qr {
  text-align: center;
  padding: var(--space-lg);
  background: var(--bmw-jet);
  border-radius: var(--radius);
  margin-bottom: var(--space-xl);
}

.survey-qr img {
  max-width: 200px;
  height: auto;
}

.survey-thank-you {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--bmw-dark-blue);
}

.no-active-survey {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--bmw-indigo);
}
