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

:root {
  --bg: #f5f3ef;
  --ink: #1a1814;
  --accent: #c02f39;
  --accent-light: #fde8e9;
  --muted: #6b6860;
  --card: #ffffff;
  --border: #e5e2dc;
  --green: #16a34a;
  --green-light: #dcfce7;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

/* ── BACKGROUND CANVAS ── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

nav, .hero, section, .divider, footer {
  position: relative;
  z-index: 1;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(245,243,239,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  animation: fadeDown 0.6s ease both;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex; align-items: center; gap: 0.5rem;
}

.nav-logo span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: var(--accent);
  color: white; border-radius: 8px; font-size: 0.85rem;
}

.nav-cta {
  background: var(--ink); color: white;
  padding: 0.55rem 1.25rem; border-radius: 100px;
  font-size: 0.875rem; font-weight: 500;
  text-decoration: none; letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 8rem 2rem 4rem;
  max-width: 1100px; margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--green-light); color: var(--green);
  padding: 0.4rem 1rem; border-radius: 100px;
  font-size: 0.8rem; font-weight: 500;
  margin-bottom: 2rem;
  animation: fadeUp 0.7s 0.1s ease both;
}
.hero-badge::before {
  content: ''; width: 7px; height: 7px;
  background: var(--green); border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 14ch;
  animation: fadeUp 0.7s 0.2s ease both;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin-top: 1.75rem;
  font-size: 1.15rem; font-weight: 300;
  color: var(--muted); max-width: 44ch;
  line-height: 1.65;
  animation: fadeUp 0.7s 0.3s ease both;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  animation: fadeUp 0.7s 0.4s ease both;
}

.btn-primary {
  background: var(--ink); color: white;
  padding: 0.85rem 2rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192,47,57,0.25);
}

.btn-ghost {
  background: transparent; color: var(--ink);
  padding: 0.85rem 2rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; letter-spacing: 0.01em;
  border: 1.5px solid var(--border);
  transition: border-color 0.2s, transform 0.15s;
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.hero-stats {
  margin-top: 4rem;
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  animation: fadeUp 0.7s 0.5s ease both;
}

.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2rem; font-weight: 800; letter-spacing: -0.03em;
}
.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

/* floating math symbols */
.hero-deco {
  position: absolute; right: 5%; top: 50%;
  transform: translateY(-50%);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  opacity: 0.07; pointer-events: none;
  animation: fadeUp 0.7s 0.6s ease both;
}
@media (max-width: 768px) { .hero-deco { display: none; } }

.deco-sym {
  font-family: 'Syne', sans-serif;
  font-size: 5rem; font-weight: 800; color: var(--ink);
  line-height: 1;
}

/* ── SECTIONS ── */
section { padding: 6rem 2rem; max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.03em;
  max-width: 22ch; line-height: 1.15;
}

/* ── HOW IT WORKS ── */
.steps {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.step:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.07); }

.step-num {
  font-family: 'Syne', sans-serif;
  font-size: 3rem; font-weight: 800;
  color: var(--accent-light);
  line-height: 1; margin-bottom: 1rem;
}

.step h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 0.6rem; letter-spacing: -0.01em;
}

.step p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; font-weight: 300; }

/* ── TOPICS ── */
#themen { background: var(--ink); color: white; border-radius: 28px; }
#themen .section-label { color: #f5a0a5; }
#themen .section-title { color: white; }

.topics-grid {
  margin-top: 3rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}

.topic-tag {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  padding: 0.6rem 1.25rem; border-radius: 100px;
  font-size: 0.875rem; font-weight: 400;
  transition: background 0.2s, color 0.2s;
}
.topic-tag:hover { background: var(--accent); color: white; border-color: transparent; }

/* ── PRICING ── */
.pricing-cards {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 24px; padding: 2.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.pricing-card.featured {
  background: var(--ink); color: white;
  border-color: var(--ink);
}

.pricing-card .tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 100px;
  margin-bottom: 1.5rem;
  background: var(--accent-light); color: var(--accent);
}
.pricing-card.featured .tag { background: rgba(255,255,255,0.12); color: #f5a0a5; }

.price-amount {
  font-family: 'Syne', sans-serif;
  font-size: 3.2rem; font-weight: 800; letter-spacing: -0.04em;
  line-height: 1;
}
.price-amount span { font-size: 1.1rem; font-weight: 400; color: var(--muted); }
.pricing-card.featured .price-amount span { color: rgba(255,255,255,0.5); }

.price-desc {
  margin-top: 0.75rem;
  font-size: 0.875rem; color: var(--muted); line-height: 1.6; font-weight: 300;
}
.pricing-card.featured .price-desc { color: rgba(255,255,255,0.6); }

.price-features {
  margin-top: 1.75rem; list-style: none;
  display: flex; flex-direction: column; gap: 0.75rem;
}

.price-features li {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.875rem; font-weight: 400;
}
.pricing-card.featured .price-features li { color: rgba(255,255,255,0.85); }

.price-features li::before {
  content: '✓';
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; min-width: 18px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 50%; font-size: 0.65rem; font-weight: 700;
}
.pricing-card.featured .price-features li::before {
  background: rgba(255,255,255,0.15); color: white;
}

/* ── CONTACT ── */
.contact-wrapper {
  margin-top: 3.5rem;
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 3rem; align-items: start;
}

.contact-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.contact-info p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; font-weight: 300; }

.contact-detail {
  margin-top: 1.75rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.contact-detail span {
  font-size: 0.875rem; color: var(--muted);
  display: flex; align-items: center; gap: 0.6rem;
}
.contact-detail span strong { color: var(--ink); font-weight: 500; }

form { display: flex; flex-direction: column; gap: 1rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label { display: flex; flex-direction: column; gap: 0.4rem; }

label span {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}

input, textarea, select {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; color: var(--ink);
  outline: none; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,47,57,0.1);
}
textarea { resize: vertical; min-height: 110px; }

/* custom select */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6860' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c02f39' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
select option {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--card);
  padding: 0.5rem;
}

.form-submit {
  margin-top: 0.5rem;
  background: var(--ink); color: white;
  border: none; border-radius: 100px;
  padding: 0.9rem 2rem; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 500; cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  align-self: flex-start;
}
.form-submit:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192,47,57,0.25);
}

.form-submit.pending {
  background: #854d0e;
  color: #fef08a;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.form-submit.pending:hover {
  background: #854d0e;
  transform: none;
  box-shadow: none;
}

.form-submit.error {
  background: var(--accent);
  cursor: not-allowed;
  transform: none;
}

/* success message */
.form-success {
  display: none;
  background: var(--green-light); color: var(--green);
  border-radius: 12px; padding: 1rem 1.25rem;
  font-size: 0.9rem; font-weight: 500;
  margin-top: 0.5rem;
}
.form-success.show { display: block; }

/* error message */
.form-error {
  display: none;
  background: #fde8e9; color: var(--accent);
  border-radius: 12px; padding: 1rem 1.25rem;
  font-size: 0.9rem; font-weight: 500;
  margin-top: 0.5rem;
}
.form-error.show { display: block; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.8rem; color: var(--muted);
  display: flex; flex-direction: column; gap: 0.4rem;
}
footer strong { color: var(--ink); font-weight: 500; }

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
footer a:hover { border-bottom-color: var(--accent); }

.footer-credit {
  font-size: 0.7rem;
  color: var(--border);
}

/* ── DIVIDER ── */
.divider {
  height: 1px; background: var(--border);
  max-width: 1100px; margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .contact-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
  .pricing-cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  nav { padding: 1rem 1.25rem; }
  .nav-logo { font-size: 1rem; }
  .nav-cta { padding: 0.45rem 1rem; font-size: 0.8rem; }

  .hero { padding: 7rem 1.25rem 3rem; }
  .hero-sub { font-size: 1rem; max-width: 100%; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn-primary, .btn-ghost { text-align: center; width: 100%; }
  .hero-stats { gap: 1.5rem; }
  .stat-num { font-size: 1.6rem; }

  section { padding: 4rem 1.25rem; }
  .steps { grid-template-columns: 1fr; }
  #themen { border-radius: 16px; }
  .pricing-cards { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .section-title { font-size: clamp(1.5rem, 6vw, 2rem); }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* scroll-reveal */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
