:root {
  --primary: #597699;
  --primary-dark: #4a6585;
  --primary-light: #597699;
  --primary-soft: #e6ecf3;
  --bg: #f7f5f3;
  --bg-card: #ffffff;
  --bg-card-hover: #e6ecf3;
  --text: #1f2a37;
  --text-muted: #5b6471;
  --border: #e4e0dc;
  --danger: #c62828;
  --danger-bg: #fdecea;
  --success: #16a34a;
  --success-bg: #e7f6ec;
  --radius: 16px;
  --shadow: 0 4px 14px rgba(31, 42, 55, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }

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

section {
  padding: 80px 0;
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

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

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--primary);
}

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(89, 118, 153, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(89, 118, 153, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.15rem;
}

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(89, 118, 153, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(89, 118, 153, 0.15);
  border: 1px solid rgba(89, 118, 153, 0.3);
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.hero h1 {
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

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

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 48px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Flow diagram ── */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 64px 0 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 160px;
  max-width: 200px;
  text-align: center;
}

.flow-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  color: var(--primary);
}

.flow-icon svg {
  width: 28px;
  height: 28px;
}

.flow-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.flow-arrow {
  color: var(--primary);
  font-size: 1.4rem;
  flex: 0 0 auto;
  padding: 0 8px;
  margin-bottom: 24px;
}

/* ── Section header ── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  display: inline-block;
  background: rgba(89, 118, 153, 0.15);
  border: 1px solid rgba(89, 118, 153, 0.3);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 12px auto 0;
}

/* ── Components ── */
.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.component-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.component-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.component-icon {
  margin-bottom: 20px;
  color: var(--primary);
}

.component-icon svg {
  width: 40px;
  height: 40px;
}

.component-card h3 {
  margin-bottom: 8px;
}

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

/* ── Features ── */
.features-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(89, 118, 153, 0.4);
  transform: translateY(-2px);
}

.feature-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.feature-emoji {
  flex-shrink: 0;
  color: var(--primary);
}

.feature-emoji svg {
  width: 28px;
  height: 28px;
}

.feature-header h3 {
  font-size: 1.05rem;
}

.feature-prose {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ── CTA section ── */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Nav link variant ── */
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* ── Registration page ── */
.register {
  padding: 56px 0 96px;
  position: relative;
  overflow: hidden;
}

.register::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(89, 118, 153, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.register-shell {
  max-width: 760px;
  position: relative;
}

.register-progress {
  margin-bottom: 36px;
}

.register-progress-bar {
  height: 6px;
  background: var(--bg-card);
  border-radius: 999px;
  overflow: hidden;
}

.register-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.register-progress.is-done .register-progress-bar span {
  width: 100% !important;
}

.register-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.register-step {
  display: none;
}

.register-step.is-active {
  display: block;
  animation: register-fade 0.35s ease;
}

@keyframes register-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.register-eyebrow {
  display: inline-block;
  background: rgba(89, 118, 153, 0.15);
  border: 1px solid rgba(89, 118, 153, 0.3);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 18px;
}

.register-eyebrow-success {
  background: var(--success-bg);
  border-color: rgba(22, 163, 74, 0.35);
  color: var(--success);
}

.register-step h1 {
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.register-step h1 em {
  font-style: normal;
  color: var(--primary);
}

.register-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
  max-width: 620px;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.field input {
  width: 100%;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.field-date {
  position: relative;
}

.field-date input {
  padding-right: 48px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6471' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4.5' width='18' height='16' rx='2'/><path d='M3 9h18'/><path d='M8 3v3'/><path d='M16 3v3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px 20px;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.register-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.register-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 8px;
}

.register-actions-split {
  justify-content: space-between;
}

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

.register-actions-summary {
  margin-top: 36px;
  justify-content: center;
}

/* ── Option cards (radio) ── */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.option-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  display: block;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card:hover {
  border-color: rgba(89, 118, 153, 0.4);
  transform: translateY(-2px);
}

.option-card input:checked ~ .option-card-body {
  color: var(--text);
}

.option-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  box-shadow: 0 0 24px rgba(89, 118, 153, 0.2);
}

.option-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(89, 118, 153, 0.15);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.option-card-icon svg {
  width: 22px;
  height: 22px;
}

.option-card-body h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.option-card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 14px;
}

.option-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Toggle cards (checkbox) ── */
.toggle-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.toggle-card:hover {
  border-color: rgba(89, 118, 153, 0.4);
}

.toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.toggle-card-text {
  flex: 1;
}

.toggle-card-text h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.toggle-card-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.toggle-card-switch {
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 4px;
}

.toggle-card-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.toggle-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.toggle-card:has(input:checked) .toggle-card-switch {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-card:has(input:checked) .toggle-card-switch::after {
  transform: translateX(20px);
  background: #fff;
}

/* ── Programmplan list ── */
.program-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.program-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 10px;
  align-items: center;
}

.program-row input {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
}

.program-row input.program-time {
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6471' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}

.program-row input:focus {
  outline: none;
  border-color: var(--primary);
}

.program-remove {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.program-remove:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ── Summary ── */
.register-step-summary h1 {
  margin-bottom: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.summary-card-highlight {
  background: linear-gradient(135deg, rgba(89, 118, 153, 0.18), rgba(89, 118, 153, 0.05));
  border-color: rgba(89, 118, 153, 0.4);
  text-align: center;
}

.summary-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.summary-event-code {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--primary-light);
  margin: 12px 0 16px;
  font-family: 'Inter', monospace;
}

.summary-card-highlight p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.summary-card-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-qr {
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  margin: 12px 0 16px;
  display: inline-flex;
  line-height: 0;
}

.summary-qr img,
.summary-qr canvas {
  display: block;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.summary-list li strong {
  color: var(--text);
  font-weight: 600;
}

.summary-card-links {
  grid-column: 1 / -1;
}

.summary-link-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.summary-link-list > li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.summary-link-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.summary-link-list p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.summary-link-list a {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.85rem;
  word-break: break-all;
}

.summary-link-list a:hover {
  text-decoration: underline;
}

.link-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-icon svg {
  width: 28px;
  height: 28px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .flow-arrow {
    display: none;
  }

  .flow {
    gap: 20px;
  }

  section {
    padding: 56px 0;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .register {
    padding: 32px 0 64px;
  }

  .register-actions {
    justify-content: stretch;
  }

  .register-actions .btn,
  .register-actions-right .btn {
    flex: 1;
    justify-content: center;
  }

  .register-actions-split {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .register-actions-right {
    flex-direction: column;
  }

  .program-row {
    grid-template-columns: 1fr;
  }

  .program-row .program-remove {
    justify-self: end;
  }

  .summary-event-code {
    font-size: 1.8rem;
  }
}
