/* Watch page — implements Claude Design "Watch.dc.html" on the Healthee DS tokens. */

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--color-primary-surface);
}

body {
  color: var(--color-neutral-text-inverse);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-white); text-decoration: underline; }
a:hover { color: var(--c-orange-100); }

[hidden] { display: none !important; }

/* ── Layout ─────────────────────────────────────────────────────────── */

.page {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  padding: var(--space-xl) var(--space-xxxl);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  text-decoration: none;
}

.brand-logo { height: 32px; display: block; }

.brand-divider {
  width: 2px;
  height: 24px;
  background: var(--c-white);
  opacity: 0.5;
}

.brand-product {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-medium);
  font-size: 26px;
  line-height: 1;
  color: var(--c-white);
}

.main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-l);
  padding: var(--space-s) 0;
}

.intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: clamp(28px, 3.4vh, 44px);
  line-height: 1.1;
  color: var(--c-white);
  text-wrap: pretty;
}

.title em { font-style: italic; }

.subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--c-white);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-white);
}

.footer-nav { display: flex; gap: var(--space-l); }

/* ── Player ─────────────────────────────────────────────────────────── */

.player-frame {
  position: relative;
  width: min(1600px, 100%, calc((100vh - 300px) * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--c-black);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

@supports (height: 100dvh) {
  .player-frame { width: min(1600px, 100%, calc((100dvh - 300px) * 16 / 9)); }
}

.player,
.player-embed {
  border: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--c-black);
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  cursor: pointer;
  background: var(--overlay-light);
}

.overlay--message {
  cursor: default;
  gap: var(--space-xxs);
  padding: var(--space-l);
  text-align: center;
}

.duration {
  font-size: 16px;
  color: var(--c-white);
  min-height: 1.2em;
}

.message-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: 24px;
  line-height: 29px;
}

.message-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

/* ── Button (mirrors HealtheeDesignSystem Button) ───────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xxs);
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  line-height: 1;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--motion-press);
  -webkit-tap-highlight-color: transparent;
}

.button:focus-visible {
  outline: 2px solid var(--c-white);
  outline-offset: 2px;
}

.button--md { min-height: 48px; padding: 0 20px; font-size: 16px; }
.button--lg { min-height: 60px; padding: 0 24px; font-size: 18px; }

.button--primary {
  background: var(--color-primary-surface);
  color: var(--color-primary-text-inverse);
}
.button--primary:active { background: var(--color-primary-surface-pressed); }

.button--secondary,
.button--secondary:hover {
  background: var(--color-neutral-surface-solid);
  color: var(--color-neutral-text-inverse);
}
.button--secondary:active { background: var(--color-neutral-surface-solid-pressed); }

/* ── Small screens (not in the design; keeps the layout usable on phones) ── */

@media (max-width: 640px) {
  .page { padding: var(--space-l) var(--space-s); }
  .brand { gap: var(--space-xs); }
  .brand-logo { height: 22px; }
  .brand-divider { height: 18px; }
  .brand-product { font-size: 20px; }
  .header .button { display: none; } /* logo already links to healthee.com */
  .subtitle { font-size: 16px; }
  .player-frame { width: 100%; border-radius: var(--radius-l); }
  .button--lg { min-height: 48px; padding: 0 20px; font-size: 16px; }
  .footer { flex-direction: column; gap: var(--space-xxs); font-size: 12px; }
}
