/**
 * ATERO Cast Receiver — CAST-REDESIGN-1J2A
 * Single-URL root: historical idle splash/landing + official CAF player skin.
 * No custom transport controls. No immersive Cast 2 overlays.
 */

:root {
  /* Canonical Atero brand — historical idle shell (navy / gold). */
  --atero-navy: #0d1326;
  --atero-navy-2: #111827;
  --atero-navy-3: #070b14;
  --atero-gold: #cfb87c;
  --atero-gold-2: #dec98e;
  --atero-text: #f3f4f6;
  --atero-muted: #9ca3af;
  --atero-gold-wash-42: rgba(207, 184, 124, 0.42);
  --overscan-x: clamp(20px, 5.5vw, 80px);
  --overscan-y: clamp(16px, 5vh, 64px);
  --atero-surface-bg: var(--atero-navy);
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--atero-surface-bg);
  color: var(--atero-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  /* CAF playback logo (upper-left while media plays). Set on body per Google docs.
     CAST-BRANDING-1D: transparent icon + "Atero" lockup (idle splash keeps /icon.webp). */
  --playback-logo-image: url("/playback-logo.webp");
}

/* —— Idle splash / landing (historical idle shell; browser + Cast idle) —— */

.atero-idle-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: fixed;
  inset: 0;
  z-index: 2;
  padding:
    max(var(--overscan-y), env(safe-area-inset-top, 0px))
    max(var(--overscan-x), env(safe-area-inset-right, 0px))
    max(var(--overscan-y), env(safe-area-inset-bottom, 0px))
    max(var(--overscan-x), env(safe-area-inset-left, 0px));
  background-color: var(--atero-surface-bg);
  text-align: center;
  pointer-events: none;
}

/* Hide branding while Cast media is active so official CAF owns the viewport. */
html.atero-cast-active .atero-idle-shell {
  display: none;
}

.atero-idle-icon {
  width: clamp(140px, 34vmin, min(42vw, 52vh));
  height: clamp(140px, 34vmin, min(42vw, 52vh));
  object-fit: contain;
  border: none;
  outline: none;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  background-color: var(--atero-surface-bg);
  margin-bottom: 0;
}

.atero-idle-brand {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 48px);
  font-weight: 700;
  color: var(--atero-text);
  letter-spacing: -0.02em;
}

.atero-idle-site {
  margin: clamp(4px, 0.45vh, 8px) 0 0;
  font-size: clamp(14px, 1.8vw, 28px);
  font-weight: 600;
  color: var(--atero-gold);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

.atero-idle-site:link,
.atero-idle-site:visited {
  color: var(--atero-gold);
  text-decoration: none;
}

.atero-idle-site:hover,
.atero-idle-site:focus-visible {
  text-decoration: underline;
}

.atero-idle-site:focus-visible {
  outline: 2px solid var(--atero-gold-wash-42);
  outline-offset: 3px;
}

.atero-idle-tagline {
  margin: clamp(14px, 1.9vh, 24px) 0 0;
  font-size: clamp(13px, 1.65vw, 26px);
  font-weight: 500;
  color: var(--atero-text);
  letter-spacing: 0.01em;
}

/* —— Official CAF player (root entry) —— */

cast-media-player {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  --logo-image: url("/icon.webp");
  --splash-image: url("/icon.webp");
  --splash-size: contain;
  --splash-color: #0b0d10;
  --progress-color: #5aa7e6;
  --theme-hue: 205;
  --metadata-title-color: #f4f6f8;
  --metadata-subtitle-color: rgba(244, 246, 248, 0.82);
}
