/* herr-cm.com: mobile first, written for 360px and widened once at 768px.
   One page in two views: day stands for 15 Uhr Check-in, night for 3 Uhr Nachtlauf.
   The view follows the device until the visitor picks one (data-theme on <html>). */

:root {
  --paper: #fff;
  --ink: #000;
  --muted: #5f5f5f;
  --line: #e2e2e2;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    --paper: #000;
    --ink: #fff;
    --muted: #a3a3a3;
    --line: #2b2b2b;
    color-scheme: dark;
  }
}

:root[data-theme="night"] {
  --paper: #000;
  --ink: #fff;
  --muted: #a3a3a3;
  --line: #2b2b2b;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

/* Hero */

.hero { margin: 0 0 32px; }

.clock {
  margin: 0 0 6px -0.035em;
  font-size: clamp(128px, 47vw, 240px); /* the numerals span the column */
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.colon { animation: pulse 2.6s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* The explanation of 3:14 is also the switch between the two views. */

.when {
  display: flex;
  flex-wrap: wrap;
  column-gap: 18px;
}

.when button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  cursor: pointer;
}
.when button:hover { color: var(--ink); }
.when button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.when button[aria-pressed="true"]::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
html:not(.js) .when button {
  pointer-events: none;
  text-decoration: none;
}

.clock-note {
  margin: -4px 0 26px;
  color: var(--muted);
  font-size: 15px;
}

.who {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
}

.portrait {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.role {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.lead {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.4;
}

/* Sprachmemo */

.memo-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.memo-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}
.memo-icon svg { width: 11px; height: 11px; fill: currentColor; }

.transcript {
  color: var(--muted);
  font-size: 15px;
}
.transcript summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
}
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 12px 0 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
.transcript[open] summary::before { transform: rotate(45deg); }
.transcript summary:hover { color: var(--ink); }
.transcript p { margin: 0 0 8px; }

/* Sections */

.section { margin: 0 0 36px; }

.label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

/* This week's video */

.feature {
  display: block;
  color: inherit;
  text-decoration: none;
}

.feature-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #000;
}
.play svg { width: 16px; height: 16px; margin-left: 2px; fill: currentColor; }

.feature-body {
  display: block;
  padding: 12px 0 0;
}
.feature-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.feature:hover .feature-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.feature-sub {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

/* Links: what you do on the left, where it leads on the right */

.links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  border-top: 1px solid var(--line);
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}
.dest {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}
.link-row:hover .dest { color: var(--ink); }

/* Facts */

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 3px 0;
  font-size: 16px;
  line-height: 1.45;
}

/* The one primary action */

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin: 0 0 28px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.cta:hover { opacity: 0.85; }

/* Footer */

.footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}
.footer nav { display: flex; gap: 20px; }
.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--muted);
  text-decoration: none;
}
.footer a:hover { color: var(--ink); }
.footer p { margin: 0; }

/* Legal pages */

.legal h1 { font-size: 30px; margin-bottom: 24px; }
.legal h2 { font-size: 18px; font-weight: 600; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 16px; }
.legal p { margin: 0 0 14px; }
.legal a { color: var(--ink); }
.legal .footer { margin-top: 40px; }
.legal .footer a { color: var(--muted); }
.back {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}
.legal .back { color: var(--muted); }
.back:hover { color: var(--ink); }
.notice {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 15px;
}
.legal .notice { color: var(--ink); }

/* Motion and width */

@media (prefers-reduced-motion: reduce) {
  .colon { animation: none; }
}

@media (min-width: 768px) {
  .page {
    max-width: 540px;
    padding: 56px 24px 64px;
  }
  h1 { font-size: 36px; }
  .clock { font-size: 264px; }
}
