:root {
  --ink: #17231f;
  --muted: #5a6a63;
  --paper: #fbfbf7;
  --surface: #ffffff;
  --line: #dce4df;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --gold: #d89b36;
  --danger: #a63831;
  --ok: #237647;
  --shadow: 0 24px 70px rgba(22, 35, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 54px);
  color: #fff;
  background: rgba(11, 31, 27, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border-radius: 8px;
  font-weight: 800;
}

.brand small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  text-decoration: none;
}

nav a:hover {
  color: #fff;
}

.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: flex-end;
  padding: 130px clamp(18px, 4vw, 54px) 38px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(9, 27, 23, 0.86), rgba(9, 27, 23, 0.6) 54%, rgba(9, 27, 23, 0.24)),
    url("https://images.unsplash.com/photo-1556910103-1c02745aae4d?auto=format&fit=crop&w=1800&q=80")
      center / cover;
}

.hero-content {
  width: min(1120px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 34px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.service-button {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.service-button:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.48);
}

.service-button span {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 750;
}

.service-button strong {
  color: #f7c876;
  font-size: 13px;
  text-transform: uppercase;
}

.info-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.info-band div {
  padding: 26px clamp(18px, 4vw, 54px);
  background: #f4f7f2;
}

.metric {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 28px;
  font-weight: 850;
}

.info-band p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
}

.content-section {
  padding: 76px clamp(18px, 4vw, 54px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.process-grid article {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.process-grid span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 20px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 800;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: 0;
}

.process-grid p,
.knowledge-list p {
  margin: 0;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  background: #eef4ef;
}

.knowledge-list {
  display: grid;
  gap: 18px;
  padding-top: 8px;
  font-size: 18px;
}

.knowledge-list a {
  color: var(--accent-strong);
  font-weight: 750;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 4vw, 54px);
  color: #e3ece8;
  background: #10231f;
}

.flow-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.flow-dialog::backdrop {
  background: rgba(7, 20, 17, 0.72);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.close-button {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  color: var(--muted);
  background: #f3f6f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 16px 68px 16px 20px;
  background: #ecf2ee;
  border-bottom: 1px solid var(--line);
}

.step {
  min-width: 0;
  padding: 10px 12px;
  color: var(--muted);
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.step.active {
  color: #fff;
  background: var(--accent);
}

.flow-panel {
  display: none;
  padding: 30px;
}

.flow-panel.active {
  display: block;
}

.panel-copy {
  max-width: 720px;
  margin: 12px 0 24px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #273831;
  font-size: 14px;
  font-weight: 750;
}

.wide {
  grid-column: 1 / -1;
}

.hidden {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cdd9d3;
  border-radius: 8px;
  outline: 0;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.checkbox-row {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 600;
}

.checkbox-row input {
  min-height: 18px;
  margin-top: 3px;
}

.legal-note,
.quiz-result {
  margin-top: 18px;
  padding: 14px 16px;
  color: #50625a;
  background: #f2f5f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legal-note.error {
  color: var(--danger);
  background: #fff4f2;
  border-color: rgba(166, 56, 49, 0.3);
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.primary,
.secondary {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-strong);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #10231f;
  border-radius: 8px;
}

.video-frame video,
.video-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-frame canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-frame.ready canvas {
  display: none;
}

.video-loader {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  border-radius: 8px;
  font-weight: 750;
}

.video-start-button {
  min-height: 38px;
  padding: 0 14px;
  color: #10231f;
  background: #f7c876;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.video-start-button:hover {
  background: #ffd890;
}

.progress-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 750;
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--accent);
}

.quiz-list {
  display: grid;
  gap: 14px;
}

.quiz-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quiz-card legend {
  padding: 0;
  color: var(--ink);
  font-weight: 850;
}

.quiz-card label {
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 650;
}

.quiz-card input {
  min-height: 18px;
  margin-top: 3px;
}

.quiz-card.invalid {
  border-color: rgba(166, 56, 49, 0.5);
  background: #fff8f6;
}

.quiz-result.success {
  color: var(--ok);
  background: #eef8f1;
  border-color: rgba(35, 118, 71, 0.3);
}

.quiz-result.error {
  color: var(--danger);
  background: #fff4f2;
  border-color: rgba(166, 56, 49, 0.3);
}

.certificate-preview {
  min-height: 250px;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), rgba(216, 155, 54, 0.12)),
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.certificate-preview h3 {
  margin-top: 0;
  font-size: 28px;
}

.certificate-preview dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px 16px;
  margin: 20px 0;
}

.certificate-preview dt {
  color: var(--muted);
  font-weight: 750;
}

.certificate-preview dd {
  margin: 0;
  font-weight: 750;
}

@media (max-width: 920px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 112px;
  }

  .hero-actions,
  .process-grid,
  .info-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-bottom: 24px;
  }

  .hero-actions,
  .process-grid,
  .info-band,
  .form-grid,
  .stepper {
    grid-template-columns: 1fr;
  }

  .service-button {
    min-height: 96px;
  }

  .flow-panel {
    padding: 22px;
  }

  .stepper {
    padding-right: 64px;
  }

  .panel-actions {
    flex-direction: column-reverse;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .progress-line,
  .certificate-preview dl {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
  }
}
