/* Meditatie-app: huisstijl Inkt in een donkere avondvariant (inkt als vlak, papier als tekst, koraal als enige accent). */

@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/eb-garamond-500.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/eb-garamond-500-cursief.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/instrument-sans.woff2) format('woff2'); }

:root {
  --inkt: #0b1a37;
  --inkt-licht: #152c5c;
  --papier: #eef2f7;
  --papier-72: rgba(238, 242, 247, 0.72);
  --lijn-op-inkt: rgba(238, 242, 247, 0.18);
  --koraal: #ef6855;
  --kop: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --ui: 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--inkt); overscroll-behavior: none; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(172deg, var(--inkt-licht) 0%, var(--inkt) 58%) var(--inkt);
  color: var(--papier);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

section {
  flex: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  text-align: center;
}
section[hidden], [hidden] { display: none !important; }

.label { margin: 0; font-size: 16px; color: var(--papier-72); letter-spacing: 0.01em; }

button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 2px solid var(--papier); outline-offset: 4px; }

/* Teller */
.teller { display: flex; flex-direction: column; align-items: center; }
.teller .dag { font-size: 17px; color: var(--papier-72); }
.teller .nummer {
  font-family: var(--kop);
  font-weight: 500;
  font-size: clamp(104px, 34vw, 144px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-feature-settings: 'lnum';
}
.teller .van { font-family: var(--kop); font-weight: 500; font-size: 27px; color: var(--papier-72); }
.teller .gedaan { font-family: var(--kop); font-style: italic; font-size: 25px; color: var(--koraal); min-height: 1.4em; margin-top: 6px; }

/* Keuze en start */
.bediening { display: flex; flex-direction: column; align-items: center; gap: 28px; }

.keuze { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--lijn-op-inkt); border-radius: 999px; }
.keuze button {
  min-width: 100px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--papier-72);
  font-weight: 500;
  font-size: 16px;
}
.keuze button[aria-pressed="true"] { background: var(--papier); color: var(--inkt); }

.start {
  width: 140px;
  height: 140px;
  border: 0;
  border-radius: 50%;
  background: var(--koraal);
  color: var(--inkt);
  font-size: 21px;
  font-weight: 500;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.start:active { transform: scale(0.97); }
.start:disabled { opacity: 0.4; cursor: default; }

.status { margin: 0; min-height: 2.8em; max-width: 32ch; font-size: 14px; line-height: 1.4; color: var(--papier-72); }

/* Sessie */
.klok { position: relative; width: min(72vw, 290px); aspect-ratio: 1; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 2.5; }
.ring .spoor { stroke: var(--lijn-op-inkt); }
.ring .voortgang { stroke: var(--koraal); stroke-linecap: round; transition: stroke-dashoffset 0.3s linear; }
.rest { font-family: var(--kop); font-weight: 500; font-size: clamp(54px, 17vw, 68px); font-feature-settings: 'lnum', 'tnum'; letter-spacing: -0.01em; }

.sessieknoppen { display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 120px; }
.knop {
  min-width: 168px;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--lijn-op-inkt);
  border-radius: 999px;
  background: none;
  font-size: 17px;
  font-weight: 500;
}
.knop.vol { border-color: var(--koraal); background: var(--koraal); color: var(--inkt); }
.knop.stil { border-color: transparent; color: var(--papier-72); }

@media (prefers-reduced-motion: reduce) {
  .ring .voortgang, .start { transition: none; }
}

@media (max-height: 640px) {
  section { gap: 18px; }
  .teller .nummer { font-size: 96px; }
  .start { width: 120px; height: 120px; }
}
