@charset "UTF-8";

/* Six four-hour scenes. One shared photograph per scene on every device. */
.hero--timed {
  --hero-base: #f6f1e9;
  --hero-copy-color: var(--text);
  --hero-image: url("../images/hero/dawn-v1.jpg");
  --hero-overlay: linear-gradient(90deg, rgba(255,255,255,.66) 0%, rgba(255,255,255,.28) 34%, rgba(255,255,255,.06) 65%, rgba(255,255,255,.35) 100%);
}
.hero--timed[data-hero-phase="midnight"] { --hero-image: url("../images/hero/midnight-v1.jpg"); }
.hero--timed[data-hero-phase="morning"] {
  --hero-image: url("../images/hero/morning-v1.jpg");
}
.hero--timed[data-hero-phase="afternoon"] { --hero-image: url("../images/hero/afternoon-v1.jpg"); }
.hero--timed[data-hero-phase="morning"][data-hero-season="spring"] { --hero-image: url("../images/hero/morning-spring-v1.jpg"); }
.hero--timed[data-hero-phase="morning"][data-hero-season="autumn"] { --hero-image: url("../images/hero/morning-autumn-v1.jpg"); }
.hero--timed[data-hero-phase="morning"][data-hero-season="winter"] { --hero-image: url("../images/hero/morning-winter-v1.jpg"); }
.hero--timed[data-hero-phase="afternoon"][data-hero-season="spring"] { --hero-image: url("../images/hero/afternoon-spring-v1.jpg"); }
.hero--timed[data-hero-phase="afternoon"][data-hero-season="autumn"] { --hero-image: url("../images/hero/afternoon-autumn-v1.jpg"); }
.hero--timed[data-hero-phase="afternoon"][data-hero-season="winter"] { --hero-image: url("../images/hero/afternoon-winter-v1.jpg"); }
.hero--timed[data-hero-phase="sunset"] {
  --hero-image: url("../images/hero/sunset-v1.jpg");
  --hero-overlay: linear-gradient(90deg, rgba(255,248,238,.68) 0%, rgba(255,248,238,.26) 34%, rgba(255,248,238,.03) 65%, rgba(255,248,238,.18) 100%);
}
.hero--timed[data-hero-phase="night"] { --hero-image: url("../images/hero/night-v1.jpg"); }
.hero--timed[data-hero-theme="dark"] {
  --hero-base: #1f2d2a;
  --hero-overlay: linear-gradient(90deg, rgba(10,20,24,.32) 0%, rgba(10,20,24,.12) 34%, rgba(10,20,24,.02) 65%, rgba(10,20,24,.14) 100%);
}
.hero--timed .hero-inner {
  background:
    var(--hero-overlay),
    var(--hero-image) no-repeat var(--hero-desktop-position, center center) / auto 100%,
    var(--hero-base);
}
.hero--timed .hero-intro { display: contents; }
.hero--timed .hero-intro > p { color: var(--hero-copy-color); }

/* Reveal more of the laptop beside the topics card on smaller desktop screens.
   Ease back to the original centered photograph at 1600px; move only the photo. */
@media (min-width: 861px) and (max-width: 1600px) {
  .hero--timed .hero-inner {
    --hero-laptop-shift: clamp(0px, min(calc(1200px - 75vw), calc(50vw - 400px)), 160px);
    background-position: left top, calc(50% - var(--hero-laptop-shift)) center;
  }
}

/* Match the left-hand reading area to each photograph on laptop-sized screens.
   Paint across the full hero so the fade has no clipped vertical edge. */
@media (min-width: 861px) and (max-width: 1440px) {
  .hero--timed[data-hero-theme] {
    --hero-readability-rgb: 248,244,237;
    --hero-overlay: linear-gradient(90deg,
      rgba(var(--hero-readability-rgb),.78) 0%,
      rgba(var(--hero-readability-rgb),.74) 24%,
      rgba(var(--hero-readability-rgb),.64) 38%,
      rgba(var(--hero-readability-rgb),.30) 50%,
      rgba(var(--hero-readability-rgb),.06) 60%,
      rgba(var(--hero-readability-rgb),0) 66%,
      rgba(var(--hero-readability-rgb),0) 100%);
  }
  .hero--timed[data-hero-phase="morning"] { --hero-readability-rgb: 242,232,220; }
  .hero--timed[data-hero-phase="morning"][data-hero-season="spring"] { --hero-readability-rgb: 243,237,226; }
  .hero--timed[data-hero-phase="morning"][data-hero-season="autumn"] { --hero-readability-rgb: 241,230,216; }
  .hero--timed[data-hero-phase="morning"][data-hero-season="winter"] { --hero-readability-rgb: 238,235,229; }
  .hero--timed[data-hero-phase="afternoon"] { --hero-readability-rgb: 240,229,213; }
  .hero--timed[data-hero-phase="afternoon"][data-hero-season="spring"] { --hero-readability-rgb: 242,234,220; }
  .hero--timed[data-hero-phase="afternoon"][data-hero-season="autumn"] { --hero-readability-rgb: 239,225,207; }
  .hero--timed[data-hero-phase="afternoon"][data-hero-season="winter"] { --hero-readability-rgb: 238,232,222; }
  .hero--timed[data-hero-phase="sunset"] { --hero-readability-rgb: 248,233,219; }
  .hero--timed[data-hero-theme="dark"] { --hero-readability-rgb: 20,29,34; }
  .hero--timed[data-hero-phase="midnight"] { --hero-readability-rgb: 17,28,40; }
}

/* Coordinate the tablet/mobile headline and introduction with each photograph. */
@media (max-width: 860px) {
  /* Pale desk and light tones, selected together with each photograph. */
  .hero--timed {
    --hero-mobile-inset: 22px;
    --hero-intro-rgb: 242,234,228;
    --hero-intro-bg: rgb(var(--hero-intro-rgb));
    --hero-photo-top-rgb: var(--hero-intro-rgb);
  }
  .hero--timed[data-hero-theme="dark"] { --hero-photo-top-rgb: 31,45,42; }
  .hero--timed[data-hero-phase="midnight"] { --hero-intro-rgb: 231,235,238; }
  .hero--timed[data-hero-phase="morning"] { --hero-intro-rgb: 242,232,220; }
  .hero--timed[data-hero-phase="morning"][data-hero-season="spring"] { --hero-intro-rgb: 243,237,226; }
  .hero--timed[data-hero-phase="morning"][data-hero-season="autumn"] { --hero-intro-rgb: 241,230,216; }
  .hero--timed[data-hero-phase="morning"][data-hero-season="winter"] { --hero-intro-rgb: 238,235,229; }
  .hero--timed[data-hero-phase="afternoon"] { --hero-intro-rgb: 240,229,213; }
  .hero--timed[data-hero-phase="afternoon"][data-hero-season="spring"] { --hero-intro-rgb: 242,234,220; }
  .hero--timed[data-hero-phase="afternoon"][data-hero-season="autumn"] { --hero-intro-rgb: 239,225,207; }
  .hero--timed[data-hero-phase="afternoon"][data-hero-season="winter"] { --hero-intro-rgb: 238,232,222; }
  .hero--timed[data-hero-phase="sunset"] { --hero-intro-rgb: 239,223,210; }
  .hero--timed[data-hero-phase="night"] { --hero-intro-rgb: 236,228,218; }

  .hero--timed .hero-inner { background: #fff; }
  .hero--timed .hero-copy h1 {
    margin-bottom: 0;
    place-items: start;
    padding: clamp(24px, 4.2vw, 34px) clamp(20px, 4.2vw, 34px);
    text-align: left;
    background: var(--hero-image) no-repeat var(--hero-mobile-position, 52% center) / cover;
  }
  .hero--timed .hero-intro {
    display: block;
    width: calc(100% + var(--hero-mobile-inset) + var(--hero-mobile-inset));
    margin-inline: calc(-1 * var(--hero-mobile-inset));
    padding: 26px var(--hero-mobile-inset) 28px;
    background: var(--hero-intro-bg);
  }
  .hero--timed .hero-intro .hero-actions { margin-top: 24px; }

  /* Keep the daytime photograph clear, with light only behind the upper-left copy. */
  .hero--timed[data-hero-theme="light"] .hero-copy h1::before {
    background: radial-gradient(
      ellipse 560px 240px at top left,
      rgba(255,255,255,.72) 0%,
      rgba(255,255,255,.44) 46%,
      rgba(255,255,255,0) 100%
    );
  }
  .hero--timed .hero-copy h1 span {
    width: max-content;
    max-width: 100%;
    padding: 0;
    text-align: left;
  }
  .hero--timed[data-hero-theme="light"] .hero-copy h1 span::before {
    content: none;
  }
}

@media (max-width: 520px) {
  .hero--timed { --hero-mobile-inset: 16px; }
  .hero--timed .hero-intro { padding-block: 24px 26px; }
  .hero--timed .hero-intro > p { font-size: 16px; }
  .hero--timed .hero-copy h1 { background-position: var(--hero-phone-position, 52% 44%); }
}

/* Quiet time-of-day guide, beneath the main actions. Labels are not controls. */
.hero--timed .hero-time {
  max-width: 480px;
  margin-top: 30px;
  color: var(--hero-copy-color);
}
.hero-time__row { display: flex; align-items: center; gap: 14px; }
.hero-time__clock {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  color: inherit;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-time__phases {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-time__phases li {
  padding: 7px 3px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: center;
  color: inherit;
  line-height: 1.4;
}
.hero-time__phases span { display: block; font-size: 13px; }
.hero-time__phases small {
  display: block;
  margin-top: 2px;
  font: 10px/1.5 "Yu Gothic", sans-serif;
  letter-spacing: .015em;
  white-space: nowrap;
}
.hero-time__phases [aria-current="time"] {
  border-color: #b9c9b9;
  background: rgba(255,255,255,.45);
  color: var(--text);
}
.hero-time__current { display: none; }
.hero-time__note-disclosure { display: none; }
.hero-time__note-text { display: none; }
.hero-time__caption-toggle,
.hero-time__arrow { display: none; }
.hero--timed .hero-time__quote {
  min-block-size: 3.8em;
  margin: 13px 0 0;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: .025em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.hero--timed .hero-time__note {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 8px 0 0;
  color: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .015em;
}
.hero-time__note-label {
  flex: 0 0 auto;
  color: inherit;
  font-family: Georgia, serif;
  font-weight: 600;
  letter-spacing: .04em;
}

@media (min-width: 861px) {
  .hero--timed[data-hero-theme="dark"] { --hero-copy-color: #fffdf7; }
  .hero--timed[data-hero-theme="dark"] .hero-copy > h1,
  .hero--timed[data-hero-theme="dark"] .hero-intro > p { color: var(--hero-copy-color); }
  .hero--timed[data-hero-theme="dark"] .hero-time__phases [aria-current="time"] {
    border-color: #d2ddd0;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .hero--timed .hero-intro > p br { display: initial; }
  /* Keep the six labels in the left-hand space beside the laptop. */
  .hero--timed .hero-time__row {
    max-width: 310px;
    align-items: flex-start;
    gap: 10px;
  }
  .hero--timed .hero-time__clock {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    margin-top: 12px;
  }
  .hero--timed .hero-time__phases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 8px;
  }
  .hero-time__phases li { padding-inline: 1px; }
  .hero-time__phases span { font-size: 12px; }
  .hero--timed .hero-time__quote { font-size: 14px; }
}

@media (max-width: 860px) {
  .hero--timed[data-hero-theme="dark"] .hero-copy h1 { color: #fffdf7; }
  .hero--timed[data-hero-theme="dark"] .hero-copy h1::before {
    /* Preserve the dark photograph's shading, but leave the pale caption clear. */
    background: linear-gradient(180deg,
      rgba(8,18,24,.35) 0,
      rgba(8,18,24,.35) calc(var(--hero-photo-end) - 112px),
      rgba(8,18,24,0) calc(var(--hero-photo-end) - 6px));
  }
  .hero--timed[data-hero-theme="dark"] .hero-copy h1 span::before {
    background: radial-gradient(ellipse at center, rgba(12,25,24,.78) 0%, rgba(12,25,24,.58) 42%, rgba(12,25,24,.20) 68%, transparent 100%);
  }
  .hero--timed .hero-time {
    max-width: none;
    margin-top: 22px;
    padding-top: 0;
    border-top: 0;
    text-align: left;
  }
  .hero-time__row { justify-content: flex-start; gap: 10px; }
  .hero-time__clock { flex-basis: 24px; width: 24px; height: 24px; }
  .hero-time__phases { display: none; }
  .hero-time__current { display: flex; align-items: baseline; gap: 10px; }
  .hero-time__current span { font-size: 15px; font-weight: 500; }
  .hero-time__current small { color: inherit; font: 12px/1.6 "Yu Gothic", sans-serif; }
  .hero--timed .hero-time__quote {
    max-width: 540px;
    margin: 12px 0 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.9;
    text-align: left;
  }
  .hero--timed .hero-time__note { display: none; }
  .hero-time__note-disclosure {
    position: relative;
    display: block;
    flex: 0 0 44px;
    margin-left: auto;
    z-index: 3;
  }
  .hero-time__note-disclosure > summary {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-block: -4px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #617a65;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .hero-time__note-disclosure > summary::-webkit-details-marker { display: none; }
  .hero-time__note-disclosure > summary::marker { content: ""; }
  .hero-time__note-disclosure > summary svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .hero-time__note-disclosure[open] > summary { color: #304d3e; }
  .hero-time__note-disclosure > summary:focus-visible {
    outline: 2px solid #7b947e;
    outline-offset: 2px;
  }
  .hero-time__note-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 32px));
    padding: 18px 20px;
    border: 1px solid #d7dfd5;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(40,62,47,.12);
    color: #3f5748;
    text-align: left;
  }
  .hero-time__note-popover .hero-time__note-label { font-size: 12px; }
  .hero--timed .hero-time__note-popover > p {
    margin: 7px 0 0;
    color: #526452;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: .015em;
  }
  .hero--timed .hero-time__note-popover br { display: initial; }
  /* Let the small explanation sit above the following topics card. */
  .hero--timed .hero-copy { z-index: 2; }
}

/* Shared tablet/phone layout for every time of day and season. */
@media (max-width: 860px) {
  .hero--timed .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero--timed .hero-copy > h1 {
    --hero-photo-height: clamp(370px, 50vw, 430px);
    --hero-photo-offset: 80px;
    --hero-photo-end: calc(var(--hero-photo-height) + var(--hero-photo-offset));
    /* Paint the fade with the photo, and make it opaque before the photo edge.
       This avoids a seam between separately rasterized layers at fractional sizes. */
    --hero-photo-fade: linear-gradient(180deg,
      rgba(var(--hero-intro-rgb),0) calc(var(--hero-photo-end) - 112px),
      rgba(var(--hero-intro-rgb),.04) calc(var(--hero-photo-end) - 92px),
      rgba(var(--hero-intro-rgb),.17) calc(var(--hero-photo-end) - 72px),
      rgba(var(--hero-intro-rgb),.44) calc(var(--hero-photo-end) - 50px),
      rgba(var(--hero-intro-rgb),.76) calc(var(--hero-photo-end) - 28px),
      rgba(var(--hero-intro-rgb),.96) calc(var(--hero-photo-end) - 12px),
      rgba(var(--hero-intro-rgb),1) calc(var(--hero-photo-end) - 6px),
      rgba(var(--hero-intro-rgb),1) 100%);
    grid-area: 1 / 1;
    /* Extend below the photograph without enlarging the laptop into the caption. */
    min-height: calc(var(--hero-photo-end) + 60px);
    background-image:
      linear-gradient(180deg,
        rgba(var(--hero-photo-top-rgb),1) var(--hero-photo-offset),
        rgba(var(--hero-photo-top-rgb),0) calc(var(--hero-photo-offset) + 48px)),
      var(--hero-photo-fade),
      var(--hero-image);
    background-position: left top, left top, 60% var(--hero-photo-offset);
    background-size: 100% 100%, 100% 100%, auto var(--hero-photo-height);
    background-repeat: no-repeat;
    background-color: var(--hero-intro-bg);
  }
  .hero--timed .hero-intro {
    grid-area: 2 / 1;
    position: relative;
    padding-top: 22px;
  }
  .hero--timed .hero-intro::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--hero-mobile-inset);
    right: var(--hero-mobile-inset);
    border-top: 1px solid rgba(115,119,96,.28);
  }
  .hero--timed .hero-time {
    grid-area: 1 / 1;
    align-self: end;
    position: relative;
    z-index: 2;
    width: calc(100% + var(--hero-mobile-inset) + var(--hero-mobile-inset));
    max-width: none;
    margin: 0 calc(-1 * var(--hero-mobile-inset));
    padding: 40px var(--hero-mobile-inset) 16px;
    background: transparent;
    color: var(--hero-copy-color);
  }
  .hero--timed .hero-time__row { gap: 8px; }
  .hero--timed .hero-time__clock {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
    color: inherit;
  }
  .hero--timed .hero-time__current { gap: 8px; }
  .hero--timed .hero-time__current span { font-size: 12px; }
  .hero--timed .hero-time__current small {
    color: inherit;
    font-size: 11px;
  }
  .hero--timed .hero-time__caption-toggle {
    display: block;
    position: absolute;
    z-index: 1;
    inset: 12px var(--hero-mobile-inset) 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    appearance: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .hero--timed .hero-time__caption-toggle:focus-visible {
    outline: 1px solid #879680;
    outline-offset: 3px;
  }
  .hero--timed .hero-time__arrow {
    display: block;
    flex: 0 0 6px;
    width: 6px;
    height: 8px;
    align-self: center;
    fill: currentColor;
  }
  .hero--timed .hero-time__caption-toggle:hover ~ .hero-time__row .hero-time__current,
  .hero--timed .hero-time__caption-toggle:focus-visible ~ .hero-time__row .hero-time__current {
    text-decoration: underline;
    text-decoration-color: #89947b;
    text-underline-offset: 4px;
  }
  .hero--timed .hero-time__caption-toggle:hover ~ .hero-time__row .hero-time__arrow { transform: translateX(2px); }
  .hero--timed .hero-time__caption-toggle[aria-expanded="true"] ~ .hero-time__row .hero-time__arrow { transform: rotate(90deg); }
  .hero--timed .hero-time__note-disclosure {
    position: static;
    flex: 0 0 0;
    margin: 0;
    z-index: auto;
  }
  .hero--timed .hero-time__note-disclosure > summary,
  .hero--timed .hero-time__note-popover > .hero-time__note-label { display: none; }
  .hero--timed .hero-time__quote {
    max-width: none;
    min-block-size: 0;
    margin-top: 5px;
    color: inherit;
    font-size: 15px;
    line-height: 1.75;
  }
  .hero--timed .hero-time__note-popover {
    top: auto;
    bottom: calc(100% - 16px);
    left: var(--hero-mobile-inset);
    right: auto;
    z-index: 3;
  }
  .hero--timed .hero-time__note-popover > p { margin-top: 0; }
  /* These photographs already have more open space above the laptop. */
  .hero--timed[data-hero-phase="sunset"] .hero-copy > h1,
  .hero--timed[data-hero-phase="midnight"] .hero-copy > h1 {
    --hero-photo-offset: 45px;
  }
}

@media (max-width: 520px) {
  .hero--timed .hero-time__quote {
    /* All 30 quotes fit in one line: at most 24 full-width characters,
       with room for letter spacing inside the existing 16px side insets. */
    font-size: min(13px, calc((100vw - 32px) / 25));
    white-space: nowrap;
    text-wrap: nowrap;
    overflow-wrap: normal;
  }
  .hero--timed .hero-copy > h1 {
    --hero-photo-height: clamp(320px, 82vw, 370px);
    --hero-photo-offset: 40px;
    /* Retain the phone's approved offset, image size and 100px extra height. */
  }
  .hero--timed[data-hero-phase="sunset"] .hero-copy > h1,
  .hero--timed[data-hero-phase="midnight"] .hero-copy > h1 {
    --hero-photo-offset: 15px;
  }
  .hero--timed[data-hero-phase="dawn"] .hero-copy > h1 {
    background-position: left top, left top, calc(60% + 45px) var(--hero-photo-offset);
  }
}
