/* The story homepage: night (snooze-hell) -> dawn -> day (the app) -> the icon's blue.
   Two voices: Young Serif tells the story, the system sans states the facts. */

@font-face {
  font-family: "Young Serif";
  src: url("fonts/YoungSerif-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  /* the same values as style.css (which this page does not load) */
  --blue: #2f6bf6;
  --indigo: #5a3df0;
  --navy: #101a4a;
  --green: #3ddc74;
  --paper: #ffffff;
  /* the night */
  --night: #120d33;
  --dusk: #2a1d6b;
  --lull: #b9a8ff;   /* Snooze's lavender */
  --moon: #ffe9a8;
  /* deadlines, as in the app */
  --today: #f59a23;
  --overdue: #e5484d;

  --story: "Young Serif", ui-serif, "New York", Georgia, serif;
  --fact: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--navy);
  font: 400 1.125rem/1.6 var(--fact);
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.1em; }
strong { font-weight: 650; }
h1, h2 { font-family: var(--story); font-weight: 400; margin: 0; text-wrap: balance; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.col { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--paper); color: var(--navy); padding: .5rem .9rem; border-radius: 8px; z-index: 2;
}
.skip:focus { top: .75rem; }

/* ---------- night ---------- */
.night {
  color: #e9e5ff;
  background: linear-gradient(180deg, #0c0826 0, var(--night) 40rem);
  padding-bottom: clamp(5rem, 12vw, 9rem);
  overflow: hidden;
}
.bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem var(--gutter);
}
.wordmark { font-family: var(--story); font-size: 1.35rem; color: #fff; text-decoration: none; }
.get {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: .5rem 1rem; border-radius: 999px; border: 1.5px solid rgb(255 255 255 / .35);
}
.get:hover { border-color: #fff; }

.hero {
  position: relative;
  max-width: 68rem; margin-inline: auto;
  padding: clamp(3rem, 10vh, 7rem) var(--gutter) 0;
  display: grid; column-gap: clamp(1.5rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-areas: "title rai" "ledes rai";
  align-items: start;
}
.hero h1 { grid-area: title; }
.ledes { grid-area: ledes; }
.sinking {
  grid-area: rai; align-self: center; justify-self: center;
  width: min(100%, 28rem); height: auto; aspect-ratio: 1;
  /* the clip sits on the night colour; fading its edge hides the seam */
  -webkit-mask-image: radial-gradient(closest-side, #000 68%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 68%, transparent 100%);
}
.moon {
  position: absolute; right: var(--gutter); top: clamp(1rem, 5vh, 3rem);
  width: clamp(3.5rem, 9vw, 6rem); aspect-ratio: 1; border-radius: 50%;
  background: var(--moon);
  /* a crescent: the night takes a bite */
  box-shadow: inset -1.1em .35em 0 0 var(--night), 0 0 5rem rgb(255 233 168 / .25);
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  transform: rotate(-18deg);
}
h1 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  color: #fff;
  max-width: 12ch;
  margin-bottom: 2.5rem;
}
.nb { white-space: nowrap; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); color: #cfc8f5; max-width: 32rem; }
.lede + .lede { color: #fff; }

/* the pit: snoozed emails, sinking out of sight */
.pit {
  list-style: none; margin: clamp(3rem, 8vw, 5rem) auto; padding: 0 var(--gutter);
  max-width: 56rem;
  display: grid; gap: .85rem;
}
.pit li {
  display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr auto; gap: 1rem; align-items: baseline;
  padding: .95rem 1.2rem;
  border: 1px solid rgb(185 168 255 / .28);
  background: rgb(185 168 255 / .07);
  border-radius: 14px;
  width: min(100%, 40rem);
  font-size: 1rem;
}
.pit b { font-weight: 650; color: #fff; }
.pit span { color: #cfc8f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pit i { font-style: normal; font-size: .875rem; color: var(--lull); white-space: nowrap; }
/* each one a step deeper and a step fainter */
.pit li:nth-child(1) { margin-left: 0;    opacity: .95; }
.pit li:nth-child(2) { margin-left: 6%;   opacity: .75; }
.pit li:nth-child(3) { margin-left: 13%;  opacity: .55; }
.pit li:nth-child(4) { margin-left: 21%;  opacity: .38; }
.pit .contract { margin-left: 30%; opacity: .26; }
.pit .contract i { color: var(--moon); }

.says {
  font-family: var(--story); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2;
  color: var(--lull); margin-bottom: 1.5rem;
}
.verdict {
  font-size: clamp(2rem, 5.5vw, 3.5rem); line-height: 1.08; color: #fff;
  margin: clamp(3rem, 8vw, 5rem) 0 1rem;
}
.after { color: var(--lull); font-size: 1.25rem; margin: 0; }

/* ---------- dawn ---------- */
.dawn {
  background: linear-gradient(180deg,
    var(--night) 0, var(--dusk) 18%, var(--indigo) 42%, var(--blue) 64%, #a9c3ff 86%, var(--paper) 100%);
  min-height: 115vh;
  display: grid; align-content: center; justify-items: center; gap: 2rem;
  padding: 6rem var(--gutter) 0;
  text-align: center;
}
.dawn h2 { color: #fff; font-size: clamp(2.5rem, 8vw, 5.5rem); line-height: 1.02; max-width: 12ch; }
.rai { width: clamp(11rem, 26vw, 17rem); align-self: end; margin-bottom: -1.5rem; }

/* ---------- day ---------- */
.day { background: var(--paper); padding-top: 3rem; }
.beat { padding-block: clamp(4rem, 10vw, 8rem); }
.beat h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.1; margin-bottom: 1.5rem; }
.beat p { max-width: var(--measure); }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2rem, 6vw, 5rem); align-items: center;
  max-width: 68rem; margin-inline: auto; padding-inline: var(--gutter);
}
.split.flip { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
.split.flip .words { order: 2; }

figure { margin: 0; }
.phone img {
  border-radius: 2.4rem;
  border: 1px solid #d9def0;
  box-shadow: 0 2rem 4rem -1.5rem rgb(16 26 74 / .35);
}
.mac {
  max-width: 68rem; margin: clamp(2.5rem, 6vw, 4rem) auto; padding-inline: var(--gutter);
}
.mac img { border-radius: 14px; box-shadow: 0 2.5rem 5rem -2rem rgb(16 26 74 / .5); }
figcaption { margin-top: 1rem; font-size: 1rem; color: #56608f; }
.pair p { margin-bottom: .6em; }

.send { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.5rem; }
.chip {
  font-size: 1rem; font-weight: 600; padding: .45rem .9rem; border-radius: 999px;
  background: #eef1fb; color: var(--navy);
}
.chip.due { background: #fff1dc; color: #9a5800; }
.chip.go { background: var(--blue); color: #fff; }

.demons dl {
  max-width: 68rem; margin: 2rem auto 0; padding-inline: var(--gutter);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 6vw, 5rem);
}
.demons dl div { padding-block: 1.5rem; border-top: 1.5px solid var(--navy); }
.demons dt { font-family: var(--story); font-size: 1.5rem; margin-bottom: .25rem; }
.demons dd { margin: 0; color: #2c3566; }

.plain { background: #f3f5fd; }
.plain ul { list-style: none; margin: 0; padding: 0; }
.plain li { padding-block: 1rem; max-width: var(--measure); }
.plain li + li { border-top: 1px solid #d5daee; }

/* ---------- the end: the icon's blue ---------- */
.end {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  padding-block: clamp(6rem, 16vw, 11rem);
}
.time { font-size: 1.25rem; color: #dfe6ff; margin-bottom: 1rem; }
.end h2 { font-size: clamp(2.4rem, 7vw, 4.75rem); line-height: 1.04; margin-bottom: 1.5rem; }
.tea { font-family: var(--story); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 3rem; }
.cta {
  display: inline-block; background: #fff; color: var(--navy); text-decoration: none;
  font-weight: 650; font-size: 1.15rem; padding: .9rem 1.7rem; border-radius: 999px;
}
.cta:hover { background: var(--green); }
.fine { font-size: 1rem; color: #dfe6ff; margin-top: 1rem; }

/* ---------- small screens ---------- */
@media (max-width: 46rem) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "title" "rai" "ledes"; }
  .sinking { width: min(72vw, 17rem); margin-block: -1.5rem .5rem; }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip .words { order: 0; }
  .phone { max-width: 17rem; margin-inline: auto; }
  .pit li { grid-template-columns: 1fr; gap: .1rem; }
  .pit li:nth-child(n) { margin-left: 0; }
  .demons dl { grid-template-columns: 1fr; }
  .moon { opacity: .9; }
}
