/* ============================================================
   Start de Stilte · stijl
   Kleuren: crème #F7F0E7 · bruin #943010 · turquoise #00B5C2 · grijs #67666a
   Lettertype: Open Sans
   ============================================================ */

:root {
  --cream: #F7F0E7;
  --brown: #943010;
  --brown-dark: #7e2a0e;
  --teal: #00B5C2;
  --teal-dark: #009aa6;
  --grey: #67666a;
  --grey-soft: #8d8c90;
  --grey-light: #a9a8ac;
  --card: #FCF8F3;
  --circle: #EFE5D8;
  --track: #E6DCCF;
  --shadow: 0 10px 30px rgba(148, 48, 16, 0.08);
  --radius: 18px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--grey);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

button { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Gedeelde elementen ---------- */

.logo-img {
  display: block;
  height: 20px;
  width: auto;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.t1 { color: var(--brown); display: block; }
.t2 { color: var(--teal); display: block; }

/* ---------- App-kolom ---------- */

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(40px + env(safe-area-inset-bottom, 0px));
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Topbalk ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; }
.topbar .logo-img { height: 18px; margin-right: 2px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 6px 12px 0;
  color: var(--teal);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.back:hover { color: var(--teal-dark); }
.back svg { flex: none; }

/* ---------- Cover (afbeelding) ---------- */

.cover {
  margin-top: 10px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Speler ---------- */

.player { margin-top: 38px; }

.player__title {
  margin: 8px 0 10px;
  color: var(--brown);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  transition: opacity 0.25s ease;
}
.player__desc {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--grey);
  transition: opacity 0.25s ease;
}
.player.is-switching .player__title,
.player.is-switching .player__desc { opacity: 0; }

.player__seek { margin-top: 28px; }

.seek {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  margin: 8px 0;
  border-radius: 3px;
  background: linear-gradient(to right, var(--teal) 0 var(--p), var(--track) var(--p) 100%);
  outline: none;
  cursor: pointer;
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  border: 4px solid var(--cream);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
  border: 4px solid var(--cream);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.seek::-moz-range-track { background: transparent; }
.seek:focus-visible { outline-offset: 8px; }

.player__times {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 52px;
  margin: 30px 0 10px;
}

.skip {
  width: 48px;
  height: 48px;
  border: 0;
  background: none;
  color: var(--grey);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s ease, transform 0.15s ease;
}
.skip svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip:hover { color: var(--brown); }
.skip:active { transform: scale(0.94); }
.skip:disabled { opacity: 0.3; cursor: default; }
.skip:disabled:hover { color: var(--grey); }

.play {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  background: var(--brown);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(148, 48, 16, 0.28);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.play svg { width: 34px; height: 34px; fill: currentColor; }
.play .icon-play { margin-left: 4px; }
.play .icon-pause { display: none; }
.play.is-playing .icon-play { display: none; }
.play.is-playing .icon-pause { display: block; }
.play:hover { background: var(--brown-dark); }
.play:active { transform: scale(0.96); box-shadow: 0 6px 14px rgba(148, 48, 16, 0.25); }
.play.is-loading { animation: pulse 1.2s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(148, 48, 16, 0.28); }
  50% { box-shadow: 0 10px 34px rgba(148, 48, 16, 0.5); }
}

.player__status {
  margin: 0;
  min-height: 1.5em;
  text-align: center;
  font-size: 13.5px;
  color: var(--grey-soft);
}

/* ---------- Lijst met stappen ---------- */

.divider {
  border: 0;
  border-top: 2px solid var(--teal);
  margin: 18px 0 6px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li + li { margin-top: 2px; }
.step {
  display: flex;
  align-items: center;
  gap: 20px;
  width: calc(100% + 20px);
  margin: 0 -10px;
  padding: 10px 12px 10px 10px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s ease;
}
.step:hover { background: rgba(148, 48, 16, 0.045); }
.step__nr {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--circle);
  color: var(--brown);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step__nr svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step.is-done .step__nr { background: var(--teal); color: #fff; }
.step.is-current { background: rgba(148, 48, 16, 0.08); cursor: default; }
.step.is-current .step__nr { background: var(--brown); color: #fff; }
.step.is-current .step__title { color: var(--brown); font-weight: 700; }
.step.is-current .step__dur { color: var(--brown); opacity: 0.75; }
.step__title {
  flex: 1;
  font-size: 18px;
  color: #5f5e62;
}
.step__dur {
  font-size: 15px;
  color: var(--grey-light);
  font-variant-numeric: tabular-nums;
}

.foot {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--grey-light);
  letter-spacing: 0.04em;
}

/* ---------- Overzicht: de vijf stappen ---------- */

.view { animation: fadeIn 0.35s ease both; }
.view.has-mini { padding-bottom: 96px; }

.overview__label { margin: 36px 0 6px; }

.lessons {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lessons li + li { border-top: 1px solid rgba(148, 48, 16, 0.1); }

.lesson {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 14px;
  column-gap: 16px;
  align-items: center;
  padding: 16px 2px 16px 0;
  color: inherit;
  text-decoration: none;
  border-radius: 14px;
  transition: background 0.2s ease;
}
.lesson:hover { background: rgba(148, 48, 16, 0.045); }
.lesson:focus-visible { outline-offset: 0; border-radius: 14px; }

.lesson__nr {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--circle);
  color: var(--brown);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lesson__nr svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lesson.is-done .lesson__nr { background: var(--teal); color: #fff; }
.lesson.is-playing .lesson__nr { background: var(--brown); color: #fff; }

.lesson__body { min-width: 0; }
.lesson__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #4f4e52;
  line-height: 1.25;
}
.lesson__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--grey-soft);
}

.lesson__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 14px;
  color: var(--grey-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lesson__resume {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
}

.lesson__chev svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--grey-light);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Mini-speler ---------- */

.mini {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 10px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(148, 48, 16, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
  z-index: 20;
  animation: slideUp 0.3s ease both;
}

 slideUp {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.mini__open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
}
.mini__nr {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--circle);
  color: var(--brown);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mini__text { min-width: 0; display: flex; flex-direction: column; }
.mini__title {
  font-size: 15px;
  font-weight: 600;
  color: #4f4e52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini__time {
  font-size: 12.5px;
  color: var(--grey-soft);
  font-variant-numeric: tabular-nums;
}
.mini__play {
  flex: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--brown);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}
.mini__play svg { width: 22px; height: 22px; fill: currentColor; }
.mini__play .icon-play { margin-left: 2px; }
.mini__play .icon-pause { display: none; }
.mini__play.is-playing .icon-play { display: none; }
.mini__play.is-playing .icon-pause { display: block; }
.mini__play:hover { background: var(--brown-dark); }
.mini__play:active { transform: scale(0.95); }

/* ---------- Toegangsscherm ---------- */

.gate {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: fadeIn 0.5s ease both;
}

.gate__card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gate__banner img {
  display: block;
  width: 100%;
  height: auto;
}

.gate__body { padding: 28px 28px 30px; text-align: center; }
.gate__body .eyebrow { margin-bottom: 6px; }

.gate__title {
  margin: 0 0 12px;
  font-size: 26px;
  color: var(--grey);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.gate__title .t1, .gate__title .t2 { display: inline; }
.gate__brand { white-space: nowrap; }
.gate__title .t2 { color: var(--brown); }

.gate__intro {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.55;
}

.gate__form input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1.5px solid #DCD2C5;
  border-radius: 12px;
  background: #fff;
  color: var(--brown);
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  transition: border-color 0.2s ease;
}
.gate__form input::placeholder {
  color: #B9AFA3;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}
.gate__form input:focus { border-color: var(--teal); outline: none; }
.gate__form.is-error input { border-color: var(--brown); animation: shake 0.4s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.gate__form button {
  width: 100%;
  height: 56px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--brown);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.gate__form button:hover { background: var(--brown-dark); }
.gate__form button:active { transform: scale(0.98); }
.gate__form button:disabled { opacity: 0.6; cursor: wait; }

.gate__error {
  margin: 12px 0 0;
  min-height: 1.5em;
  font-size: 14px;
  color: var(--brown);
}

.gate__help {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--grey-soft);
}
.gate__help a { color: var(--teal); font-weight: 600; text-decoration: none; }
.gate__help a:hover { text-decoration: underline; }

/* ---------- Groter scherm ---------- */

@media (min-width: 720px) {
  .app { max-width: 520px; padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
