/* ==========================================================
   Between Calls — styles
   Palette: near-black, warm off-white, one amber accent
   (the color of scene lights / station lamps at night).
   ========================================================== */

:root {
  --bg: #0e0e0d;
  --bg-raised: #1a1a18;
  --text: #ecebe6;
  --muted: #8d8b84;
  --accent: #e0a23b;

  --serif: "Iowan Old Style", "Charter", "Georgia", serif;
  --sans:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Menlo", "Consolas", monospace;

  --measure: 38rem; /* max width for reading text */
  --gap: clamp(4rem, 12vh, 9rem); /* vertical space between photos */
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Sticky clock ---------- */
.clock {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--mono);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.clock.is-visible {
  opacity: 1;
}
.clock__time {
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.clock__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media::after {
  /* darken the bottom so the title is readable */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg) 5%,
    rgba(14, 14, 13, 0.4) 55%,
    rgba(14, 14, 13, 0.15)
  );
}
.hero__text {
  position: relative;
  padding: 0 clamp(1.5rem, 6vw, 6rem) 7rem;
  max-width: 60rem;
}
.eyebrow,
.byline {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0;
}
.hero h1 {
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 400;
  line-height: 0.95;
  margin: 0.5rem 0 1rem;
  letter-spacing: -0.02em;
}
.hero__sub {
  font-size: 1.3em;
  margin: 0 0 1.5rem;
  font-style: italic;
}
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.scroll-cue:hover {
  color: var(--text);
}

/* ---------- Intro / closing text ---------- */
.intro,
.closing {
  max-width: var(--measure);
  margin: var(--gap) auto;
  padding: 0 1.5rem;
}
.intro p:first-child {
  font-size: 1.3em;
  line-height: 1.45;
}
.intro__note {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}
.closing {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.closing__end {
  font-family: var(--mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
}

/* ---------- Chapters ---------- */
.chapter {
  margin-bottom: var(--gap);
}
.chapter__title {
  max-width: var(--measure);
  margin: var(--gap) auto calc(var(--gap) * 0.6);
  padding: 0 1.5rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
}
.chapter__title span {
  color: var(--accent);
  margin-right: 0.5em;
}

/* ---------- Photos ---------- */
.shot {
  margin: 0 auto var(--gap);
  padding: 0 1.5rem;
}
.shot--full {
  max-width: none;
  padding: 0;
}
.shot--wide {
  max-width: 78rem;
}
.shot--narrow {
  max-width: 40rem;
}
.shot--left {
  max-width: 52rem;
  margin-left: clamp(1.5rem, 8vw, 8rem);
}
.shot--right {
  max-width: 52rem;
  margin-right: clamp(1.5rem, 8vw, 8rem);
}

/* Two (or more) photos side by side, sharing one caption */
.shot__media {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.shot__media img {
  flex: 1 1 16rem; /* each photo grows to fill the row, wraps below ~16rem */
  min-width: 0;
  aspect-ratio: 3 / 4; /* keeps both the same height; change to match your photos */
  object-fit: cover;
}

.shot figcaption {
  max-width: var(--measure);
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.shot--full figcaption {
  padding: 0 1.5rem;
  margin-left: auto;
  margin-right: auto;
}
.shot figcaption time {
  font-family: var(--mono);
  color: var(--accent);
  margin-right: 0.75em;
  font-size: 0.85em;
}

/* Placeholder shown until a real photo is in /images */
.placeholder {
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 14px,
      rgba(255, 255, 255, 0.025) 14px 28px
    ),
    var(--bg-raised);
  border: 1px dashed #3a3935;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.5;
}
.hero .placeholder {
  height: 100%;
  aspect-ratio: auto;
  border: none;
}
.placeholder strong {
  color: var(--text);
  font-weight: 400;
  display: block;
  margin-bottom: 0.4rem;
}

/* Fade-in as photos scroll into view */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Before / after slider ---------- */
.compare__frame {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-raised);
}
.compare__img,
.compare__frame > .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare__img--after,
.compare__frame > .placeholder.is-after {
  clip-path: inset(0 0 0 var(--pos));
}
/* keep the two placeholder labels from overlapping */
.compare__frame > .placeholder {
  place-items: center start;
  text-align: left;
}
.compare__frame > .placeholder.is-after {
  place-items: center end;
  text-align: right;
}
.compare__frame > .placeholder > div {
  max-width: 40%;
}
.compare__frame::after {
  /* divider line */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: var(--accent);
  transform: translateX(-1px);
  pointer-events: none;
}
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare__tag {
  position: absolute;
  top: 1rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(14, 14, 13, 0.75);
  color: var(--accent);
  pointer-events: none;
}
.compare__tag--before {
  left: 1rem;
}
.compare__tag--after {
  right: 1rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: 3rem 1.5rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid #222;
}

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
  .shot--left,
  .shot--right {
    margin-left: auto;
    margin-right: auto;
  }
  .clock {
    top: 0.75rem;
    right: 1rem;
  }
  .clock__time {
    font-size: 1.15rem;
  }
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
