/* VW DSG Mechatronics Awareness Portal - Clean Editorial Theme */

:root {
  --bg-main: #0f172a;
  --bg-surface: #1e293b;
  --bg-alt: #172033;
  --bg-input: #0f172a;
  --border-color: #334155;
  --border-subtle: #1e293b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;

  --accent-blue: #38bdf8;
  --accent-amber: #f59e0b;
  --accent-red: #f87171;
  --accent-green: #34d399;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

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

a:hover {
  text-decoration: underline;
}

code {
  background: #0f172a;
  color: var(--accent-amber);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  border: 1px solid var(--border-color);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tpi-tag {
  background: #334155;
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.brand-logo-stacked {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.4px;
}

.brand-logo-stacked:hover {
  text-decoration: none;
  opacity: 0.95;
}

.logo-line {
  display: block;
}

.logo-gearbox {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
}

.logo-emergency {
  color: var(--accent-red);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo-mode {
  color: var(--accent-blue);
  font-size: 1.2rem;
  font-weight: 800;
}

.domain-badge {
  color: var(--accent-amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

.nav-links a.btn-primary {
  color: #ffffff !important;
}

.nav-links a.btn-primary:hover {
  color: #ffffff !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-family: var(--font-body);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: #fff;
}

.btn-secondary:hover {
  background: #334155;
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 70px 0 60px;
  background: radial-gradient(circle at 50% 10%, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0) 70%);
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  max-width: 900px;
}

.hero-header-block {
  max-width: 850px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 10px;
}

.text-emergency {
  color: var(--accent-red);
}

.hero-subtitle {
  font-size: 1.35rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: -0.2px;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 780px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.highlight-chip {
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 50px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Stats Section */
.stats-section {
  padding: 50px 0;
}

.section-header {
  margin-bottom: 36px;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.subhead {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-blue);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.stat-subtext {
  font-size: 0.8rem;
  color: var(--text-dark);
  margin-top: 2px;
}

.breakdown-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.breakdown-card h3 {
  font-size: 1rem;
  margin-bottom: 14px;
}

.progress-bar-container {
  display: flex;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 14px;
}

.progress-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
}

.bg-green { background-color: var(--accent-green); }
.bg-amber { background-color: var(--accent-amber); }
.bg-red { background-color: var(--accent-red); }

.breakdown-legend {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.key-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Sections */
.section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-alt {
  background-color: var(--bg-alt);
}

.grid {
  display: grid;
}

.grid-2-col { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3-col { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gap-md { gap: 20px; }
.gap-lg { gap: 28px; }

.info-box, .card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.styled-list {
  list-style: none;
  margin-top: 14px;
}

.styled-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.styled-list li::before {
  content: "•";
  color: var(--accent-blue);
  font-size: 1.2rem;
  position: absolute;
  left: 0;
  top: -2px;
}

/* Notice Boxes */
.notice-box {
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 28px;
}

.notice-amber {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.notice-grey {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.notice-box h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #fff;
}

.notice-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

/* Timeline */
.timeline {
  max-width: 760px;
  margin-top: 28px;
}

.timeline-item {
  border-left: 2px solid var(--border-color);
  padding-left: 20px;
  margin-bottom: 24px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.takeaways-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.takeaways-box h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.takeaway-item h4 {
  font-size: 0.9rem;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.takeaway-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Form & Inputs */
.generator-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-dark);
  margin-top: 4px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#email-output-text {
  width: 100%;
  height: 380px;
  background: #0b121e;
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.65;
  padding: 16px;
  border-radius: var(--radius-sm);
  resize: none;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

#email-output-text:focus {
  border-color: var(--accent-blue);
}

.form-container {
  max-width: 760px;
}

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

.full-width {
  grid-column: 1 / -1;
}

.required {
  color: var(--accent-red);
}

.validation-message {
  font-size: 0.8rem;
  margin-top: 4px;
  font-weight: 600;
}

.validation-message.valid { color: var(--accent-green); }
.validation-message.invalid { color: var(--accent-red); }

.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 36px; }

/* Footer */
.footer {
  background: #090d16;
  padding: 36px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-subtext {
  font-size: 0.75rem;
  color: var(--text-dark);
  margin-top: 8px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.toast-success { border-left: 4px solid var(--accent-green); }
.toast-error { border-left: 4px solid var(--accent-red); }

@media (max-width: 900px) {
  .hero h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
}
