@font-face {
  font-family: "Trickster";
  src: url("fonts/Trickster-Regular.woff2") format("woff2"),
       url("fonts/Trickster-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GENSCO";
  src: url("fonts/GENSCO.woff2") format("woff2"),
       url("fonts/GENSCO.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-top: #ececec;
  --bg-panel: #f4f4f4;
  --ink: #000;
  --ink-on-photo: #fff;
  --weekend: #a82828;
  --pad: 20px;
  --pad-lg: 72px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-panel);
  color: var(--ink);
  font-family: "GENSCO", "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main {
  background: var(--bg-panel);
  min-height: 100dvh;
}

/* "°" + a few other symbols GENSCO is missing → Times New Roman Bold */
.sym {
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
}

/* ------------------------------------------------------------------ HERO */
.hero {
  position: relative;
  background: var(--bg-top);
  aspect-ratio: 393 / 626;
  width: 100%;
  overflow: hidden;
  color: var(--ink-on-photo);
}

.hero-photo {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* scrim for legibility over any photo */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.05) 35%,
    rgba(0,0,0,0.35) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-pre {
  font-family: "GENSCO", "Times New Roman", serif;
  font-size: clamp(18px, 5.5vw, 24px);
  line-height: 1.05;
  margin: 0;
}

.hero-status {
  font-family: "Trickster", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(64px, 22vw, 96px);
  line-height: 0.95;
  margin: 0.05em 0;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.hero-detail {
  font-family: "GENSCO", "Times New Roman", serif;
  font-size: clamp(18px, 5.5vw, 24px);
  line-height: 1.15;
  margin: 0;
  max-width: 22ch;
}

/* ----------------------------------------------------------------- PANEL */
.panel {
  background: var(--bg-panel);
  padding: 20px var(--pad) 40px;
}

.panel-title {
  font-family: "GENSCO", "Times New Roman", serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 5.52px;
  margin: 0 0 24px;
}

/* ---------------------------------------------------------------- WARNING */
.warning {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 36px;
}

.warning-bang {
  font-family: "Trickster", "Times New Roman", serif;
  font-size: clamp(96px, 30vw, 112px);
  line-height: 0.8;
  text-align: center;
  margin-top: -8px;
}

.warning-text {
  font-family: "GENSCO", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.15;
  margin: 6px 0 0;
}

/* ---------------------------------------------------------------- WINDOWS */
.windows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.window {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
}

.window-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -4px;
}

/* Sun glyph as a CSS mask so we can recolour it via `color` */
.window-sun {
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask: url("images/sun.svg") center / contain no-repeat;
          mask: url("images/sun.svg") center / contain no-repeat;
}

.window-body { min-width: 0; }

.window-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 12px;
}

.window-side {
  font-family: "GENSCO", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.2;
}

.window-side--right { text-align: right; }

.window-date { margin: 0 0 7px; }
.window-time { margin: 0; }

.window-arrow {
  position: relative;
  height: 1px;
  background: currentColor;
  margin-bottom: 8px;
  min-width: 40px;
}

.window-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  transform: translateY(-50%);
}

/* Weekends — sun, dates, times, weather, arrow all in red */
.window--weekend { color: var(--weekend); }

.window-weather {
  font-family: "GENSCO", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.2;
  margin: 14px 0 0;
}

.window--placeholder { opacity: 0.4; }

/* ---------------------------------------------------------------- FOOTER */
.foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,0.12);
  font-family: "GENSCO", "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.25;
  opacity: 0.55;
}
.foot p { margin: 0; }

/* ----------------------------------------------------------------- ERRORS */
.error {
  font-family: "GENSCO", "Times New Roman", serif;
  font-size: 16px;
  opacity: 0.7;
  margin: 0;
}

/* ----------------------------------------------------------------- DESKTOP
 * On wide viewports the hero pinned to the left half of the page, the panel
 * scrolls beside it on the right. Caps the visible page area to a comfortable
 * 1200px so the photo isn't blown up to be vast.
 * ------------------------------------------------------------------------ */
@media (min-width: 820px) {
  main {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    aspect-ratio: auto;
    position: sticky;
    top: 0;
    height: 100dvh;
    min-height: 540px;
  }

  .hero-content {
    padding: 0 32px;
  }

  .hero-pre,
  .hero-detail {
    font-size: 26px;
  }

  .hero-status {
    font-size: clamp(96px, 12vw, 140px);
  }

  .panel {
    padding: 88px var(--pad-lg);
  }

  .panel-title {
    font-size: 26px;
    margin-bottom: 32px;
  }

  .warning {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 48px;
  }

  .warning-bang {
    font-size: 120px;
  }

  .warning-text {
    font-size: 19px;
    line-height: 1.25;
  }

  .windows {
    gap: 32px;
  }

  .window {
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 22px;
  }

  .window-icon {
    width: 64px;
    height: 64px;
  }

  .window-side,
  .window-weather {
    font-size: 19px;
  }
}

/* For very wide screens, give the photo a touch more breathing room */
@media (min-width: 1100px) {
  .hero-status {
    font-size: 140px;
  }
}
