/* Happy Hounds Hotel - Daycare Viewer. Typography and palette match www.happyhoundshotel.com
   (Squarespace theme: headings "Happy Monkey", body "Poppins", accent #df7726, dark #4c2912, light #f6daa7). */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/Poppins-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/Poppins-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/Poppins-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Happy Monkey"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/HappyMonkey-400-latin.woff2") format("woff2"); }

:root {
  --accent: #df7726;
  --accent-dark: #c4631a;
  --brown: #4c2912;
  --brown-deep: #2e180a;
  --cream: #f6daa7;
  --cream-soft: #fbefd9;
  --ink: #241409;
  --muted: #6b5443;
  --white: #fff;
  --head: "Happy Monkey", "Poppins", system-ui, sans-serif;
  --body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--cream-soft);
}
img, svg, video { display: block; }
a { color: var(--accent); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }

/* buttons: square corners like the main site */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border: 0; border-radius: 0; font: 500 15px/1.2 var(--body); letter-spacing: .02em;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: var(--cream); color: var(--brown); }
.btn-light:hover { background: var(--white); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.site-header { background: var(--brown); padding-top: env(safe-area-inset-top); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand img { width: 220px; height: auto; }
.header-cta .cta-short { display: none; }

/* intro band (cream, like the site's "I'm looking for..." band) */
.intro { background: var(--cream); padding: 26px 0 22px; }
.intro h1 { margin: 0; font: 400 clamp(34px, 6vw, 52px)/1.1 var(--head); color: var(--brown); }
.lede { margin: 6px 0 14px; color: var(--muted); font-size: 16px; }
.notices { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.notices li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  background: rgba(255,255,255,.65); color: var(--brown); font-size: 14px; line-height: 1.35;
  border-left: 4px solid var(--accent);
}
.notices strong { font-weight: 600; }
.notices .ico { color: var(--accent); }

/* viewer layout: mobile-first, player full width */
.viewer { flex: 1; display: grid; gap: 22px; padding-top: 22px; padding-bottom: 32px; align-items: start; }
.stage {
  width: 100%; margin: 0 auto; background: var(--brown-deep);
  box-shadow: 0 10px 30px rgba(46,24,10,.18);
  /* keep the whole picture on screen on short/wide displays */
  max-width: max(320px, calc((100vh - 300px) * 4 / 3));
  transition: max-width .2s ease-out;
}
.stage.wide { max-width: max(320px, calc((100vh - 300px) * 16 / 9)); }
.stage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px; color: var(--cream); font-weight: 500; font-size: 15px;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--white); background: rgba(255,255,255,.12); opacity: 0; transition: opacity .2s;
}
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #e53935; box-shadow: 0 0 0 0 rgba(229,57,53,.6);
  animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229,57,53,.6); } 70% { box-shadow: 0 0 0 7px rgba(229,57,53,0); } 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); } }
.stage.is-live .live-pill { opacity: 1; }

/* player box: 4:3 by default (Daycare 1-5), 16:9 for Daycare 6-9 / autoplay */
.player { position: relative; width: 100%; height: 0; padding-top: 75%; background: #000; overflow: hidden;
  transition: padding-top .2s ease-out; }
.stage.wide .player { padding-top: 56.25%; }
.player video { position: absolute; inset: 0; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* 16:9 cameras whose substream is only 4:3 (640x480): stretch the frame back to 16:9 */
.player video.stretch { object-fit: fill; }

/* overlays (one per state) */
.ov {
  position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 20px; text-align: center; color: var(--cream-soft);
  background: radial-gradient(ellipse at center, rgba(76,41,18,.92), rgba(36,20,9,.96));
}
.player[data-state="loading"] .ov-loading,
.player[data-state="idle"] .ov-idle,
.player[data-state="paused"] .ov-paused,
.player[data-state="error"] .ov-error,
.player[data-state="closed"] .ov-closed { display: flex; }
.ov-loading { background: rgba(20,11,5,.55); }
.ov-title { margin: 0; font: 400 clamp(20px, 3.6vw, 30px)/1.2 var(--head); color: var(--white); }
.ov-sub { margin: 0 0 8px; font-size: clamp(13px, 2.4vw, 15px); color: var(--cream); max-width: 34em; }
.ov-ico { width: clamp(36px, 8vw, 60px); height: auto; fill: var(--accent); margin-bottom: 4px; }
.ov-closed .ov-ico { fill: var(--cream); }
.ov .btn { margin-top: 4px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(246,218,167,.3);
  border-top-color: var(--accent); animation: spin .9s linear infinite; margin-bottom: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* camera selector */
.cams h2 { margin: 0 0 10px; font: 400 24px/1.2 var(--head); color: var(--brown); }
.cams ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cam {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 6px;
  background: var(--white); color: var(--brown); border: 2px solid var(--cream);
  font: 500 15px/1.2 var(--body); text-decoration: none; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.cam:hover { border-color: var(--accent); color: var(--accent-dark); }
.cam.active, .cam.active:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.cam.disabled { opacity: .45; pointer-events: none; }

/* footer */
.site-footer { background: var(--brown); color: var(--cream); font-size: 14px; padding-bottom: env(safe-area-inset-bottom); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 16px; padding-bottom: 16px; }
.site-footer a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--white); }

/* phones: full-bleed player */
@media (max-width: 599px) {
  .wrap { padding: 0 16px; }
  .header-inner { min-height: 64px; }
  .brand img { width: 168px; }
  .header-cta { padding: 9px 14px; font-size: 14px; }
  .header-cta .cta-long { display: none; }
  .header-cta .cta-short { display: inline; }
  .intro { padding: 20px 0 18px; }
  .lede { font-size: 15px; margin-bottom: 12px; }
  .notices { gap: 8px; }
  .notices li { font-size: 13px; padding: 6px 12px; }
  .viewer { padding: 0 0 26px; gap: 18px; }
  .stage { max-width: none; box-shadow: none; }
  .cams { padding: 0 16px; }
  .footer-inner { flex-direction: column; justify-content: center; text-align: center; gap: 2px; padding-top: 18px; padding-bottom: 20px; }
}
/* desktop: camera list beside the player */
@media (min-width: 960px) {
  .viewer { grid-template-columns: minmax(0, 1fr) 230px; gap: 28px; padding-top: 28px; }
  .cams ul { grid-template-columns: 1fr; gap: 8px; }
  .cam { justify-content: flex-start; padding-left: 18px; min-height: 44px; }
  .cam::before { content: ""; width: 8px; height: 8px; margin-right: 12px; background: var(--cream); flex: none; transition: background-color .15s; }
  .cam.active::before { background: var(--white); }
  .brand img { width: 260px; }
  .intro { padding: 24px 0; }
  .intro .wrap { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "h n" "l n"; column-gap: 32px; align-items: center; }
  .intro h1 { grid-area: h; }
  .lede { grid-area: l; margin-bottom: 0; }
  .notices { grid-area: n; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
