/*
 * One morning, start to finish.
 *
 * The page is a film, so nothing here scrolls in the ordinary sense: the
 * picture (canvas), the wall display (stage) and the words (layers) are all
 * fixed to the screen, and <main> is only a tall empty track whose position
 * is the clock. That is what lets a sentence stay put while the sun rises
 * behind it.
 *
 * Colour follows the app, not the web: the night console's cream on
 * near-black until the sun is up, then ink on paper. `data-tone` on <html>
 * flips at that moment and everything set in --fg follows.
 */

@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}

:root {
  --cream: #f4f1ea;
  --cream72: rgba(244, 241, 234, 0.72);
  --cream50: rgba(244, 241, 234, 0.5);
  --ink: #15171b;
  --ink2: #5f656e;
  --ink3: #6b7078;
  --ground: #f7f6f3;
  --sunken: #f1efea;
  --rule: #e9e7e2;
  --rule2: #dcd9d2;
  --blue: #1b48d4;
  --blue-deep: #153aae;
  --blue-tint: #edf1fe;
  --good: #2c7a4b;
  --bad: #9b2c2c;
  --warn-ink: #a8680c;
  --night: #0c0e13;
  --night-raised: #171a22;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.3, 1.55, 0.5, 1);
  --pad: clamp(20px, 4.4vw, 68px);

  --fg: var(--cream);
  --fg2: var(--cream72);
  --fg3: var(--cream50);
  --hair: rgba(244, 241, 234, 0.26);
  --say-good: #9be3b5;
  --say-bad: #ffa598;
}
html[data-tone="light"] {
  --fg: var(--ink);
  --fg2: #474d56;
  --fg3: var(--ink3);
  --hair: rgba(21, 23, 27, 0.2);
  --say-good: var(--good);
  --say-bad: var(--bad);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  /* The first frame of the film, so the canvas arrives without a flash. */
  background: #04060c;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
[hidden] {
  display: none !important;
}

/* ── the picture ─────────────────────────────────────────────────────── */

#film {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100vw;
  /* The large viewport: a phone's toolbar sliding away must not resize it. */
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
}
/* No WebGL2: the same morning as two flat skies, so the words still land. */
html.no-gl #film {
  display: none;
}
html.no-gl body {
  background: linear-gradient(#04060c 0%, #0c1740 55%, #4a4c8c 82%, #f26a3c 100%) fixed;
}
html.no-gl[data-tone="light"] body {
  background: #ebe8e2;
}

main {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.scene {
  height: calc(var(--len) * 100vh);
}

/* ── words ───────────────────────────────────────────────────────────── */

.layers {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--pad);
  text-align: center;
}
.eyebrow {
  margin: 0;
  font-size: clamp(0.68rem, 0.62rem + 0.25vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg2);
}

.hero {
  display: grid;
  justify-items: center;
  gap: clamp(1rem, 2.6vh, 2rem);
  transform-origin: 50% 60%;
}
.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 10.4vw, 12rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-shadow: 0 0 80px rgba(4, 6, 12, 0.55);
}
.title em {
  font-style: italic;
}
/* Each word rises from behind its own edge; the padding keeps the italic's
   overhang and the descender of the g inside the mask. */
.title__line {
  display: inline-block;
  overflow: hidden;
  padding: 0.1em 0.07em 0.2em;
  margin: -0.1em -0.04em -0.2em;
  vertical-align: top;
}
.title__line > span {
  display: inline-block;
}
.hero__gloss {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.6rem);
  color: var(--fg2);
}
.hero__gloss:empty {
  display: none;
}
.cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(30px, env(safe-area-inset-bottom));
}
.cue__in {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg2);
}
.cue__in i {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--fg), transparent);
  transform-origin: top;
  animation: cue 2.4s var(--out) infinite;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  35% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1) translateY(24px);
    opacity: 0;
  }
}

.statement {
  margin: 0;
  max-width: 19ch;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.1vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
  text-shadow: 0 0 60px rgba(8, 12, 30, 0.5);
}
.statement--sun {
  align-self: start;
  margin-top: clamp(84px, 17vh, 190px);
  max-width: none;
  font-size: clamp(3rem, 9.4vw, 10rem);
  font-style: italic;
  letter-spacing: -0.03em;
  text-shadow: 0 0 70px rgba(30, 20, 60, 0.45);
}
.statement--wall {
  max-width: none;
  font-size: clamp(2.6rem, 7.4vw, 8rem);
  font-style: italic;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-shadow: none;
}

/* ── the kitchen: words beside the display ───────────────────────────── */

.layer--kitchen,
.layer--out {
  display: block;
  padding: 0;
  text-align: left;
}
.layer--kitchen .statement--wall {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}
.scrim {
  display: none;
}
.copy {
  position: absolute;
  left: var(--pad);
  top: 50%;
  width: min(27rem, 29vw);
  transform: translateY(-50%);
  visibility: hidden;
}
.copy > * {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.5s ease,
    transform 0.9s var(--out);
}
.copy.is-active {
  visibility: visible;
}
.copy.is-active > * {
  opacity: 1;
  transform: none;
}
.copy.is-active > :nth-child(2) {
  transition-delay: 0.07s;
}
.copy.is-active > :nth-child(3) {
  transition-delay: 0.14s;
}
/* Leaving, the block goes up and out together — no stagger on the way off. */
.copy:not(.is-active) {
  transition: visibility 0s 0.5s;
}
.copy:not(.is-active) > * {
  transform: translateY(-18px);
}
.copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9em;
  color: var(--blue);
}
.copy .eyebrow::before {
  content: attr(data-n);
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}
.copy .eyebrow:not([data-n])::before {
  display: none;
}
.copy h2 {
  margin: 1.1rem 0 1.2rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 3.5vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.024em;
  color: var(--ink);
  text-wrap: balance;
}
.copy p:not(.eyebrow) {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(0.98rem, 0.9rem + 0.3vw, 1.12rem);
  line-height: 1.62;
  color: var(--ink2);
}

/* ── the way out ─────────────────────────────────────────────────────── */

.out {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(1.1rem, 3vh, 2.2rem);
  padding: clamp(84px, 12vh, 130px) var(--pad) clamp(64px, 9vh, 96px);
  text-align: center;
}
.out__kicker {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.1vw, 2rem);
  color: rgba(21, 23, 27, 0.78);
}
.out__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.7rem, 7vw, 7.4rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
.out__title em {
  font-style: italic;
}
.door {
  width: min(31rem, 100%);
  padding: clamp(20px, 2.4vw, 30px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 4px 8px rgba(21, 23, 27, 0.05),
    0 40px 70px -35px rgba(21, 23, 27, 0.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  backdrop-filter: blur(26px) saturate(1.4);
  text-align: left;
  pointer-events: auto;
}
.door h3 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.door p {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink2);
}
.door .hint {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(21, 23, 27, 0.1);
  font-size: 0.85rem;
  color: var(--ink3);
}
.signin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.1rem;
}
.signin input {
  flex: 1 1 12rem;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 1px solid var(--rule2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 500 1rem var(--sans);
  letter-spacing: -0.01em;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.signin input::placeholder {
  color: #9a9ea5;
}
.signin input:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(27, 72, 212, 0.16);
}
.button {
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 600 1rem var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.35s var(--spring);
}
.button:hover {
  background: var(--blue-deep);
}
.button:active {
  transform: scale(0.96);
}
.button:focus-visible {
  outline: 3px solid rgba(27, 72, 212, 0.35);
  outline-offset: 3px;
}
.button[disabled] {
  opacity: 0.55;
  cursor: default;
}
.say {
  margin: 0;
  font-weight: 600;
}
.say[data-tone="good"] {
  color: var(--say-good);
}
.say[data-tone="bad"] {
  color: var(--say-bad);
}
.door .say {
  margin-top: 1rem;
  font-size: 0.98rem;
}
.door .say:empty,
.door .say:empty + p:empty,
.note:empty {
  display: none;
}
.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: rgba(21, 23, 27, 0.72);
  text-align: center;
}

/* ── chrome ──────────────────────────────────────────────────────────── */

.hud {
  position: fixed;
  z-index: 5;
  color: var(--fg);
  transition: color 0.8s ease;
}
.hud--top {
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) var(--pad) 0;
}
.mark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.mark img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.6);
}
.mark span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.6s ease,
    transform 0.9s var(--out);
}
/* The name is the whole first frame; the small one waits until that is gone. */
html.is-past-title .mark span {
  opacity: 1;
  transform: none;
}
.hud nav {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.2vw, 14px);
}
.hud button,
.hud .pill {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: 600 0.82rem var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.hud .pill {
  box-shadow: inset 0 0 0 1px var(--hair);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    background 0.25s,
    color 0.25s,
    box-shadow 0.8s;
}
.hud .pill:hover {
  background: var(--fg);
  color: #0c0e13;
}
html[data-tone="light"] .hud .pill:hover {
  color: #fff;
}
.hud button {
  opacity: 0.72;
}
.hud button:hover {
  opacity: 1;
}
.hud :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.hud--clock {
  left: var(--pad);
  bottom: max(26px, env(safe-area-inset-bottom));
  display: flex;
  align-items: baseline;
  gap: 14px;
  pointer-events: none;
}
.hud__time {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
}
.hud__act {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  /* Full strength, thinned: it has to read over water as well as plaster. */
  color: var(--fg);
  opacity: 0.74;
  transition: color 0.8s ease;
}
/* The morning as a line up the side: the dot is the sun, and it climbs. */
.hud--rail {
  right: calc(var(--pad) * 0.5);
  top: 50%;
  width: 1px;
  height: clamp(120px, 22vh, 190px);
  transform: translateY(-50%);
  background: var(--hair);
  pointer-events: none;
  transition: background 0.8s ease;
}
.hud--rail i {
  position: absolute;
  left: 50%;
  bottom: calc(var(--p, 0) * 100%);
  width: 7px;
  height: 7px;
  margin: 0 0 -3.5px -3.5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px 2px rgba(255, 190, 110, 0.75);
}

/* ── the opening ─────────────────────────────────────────────────────── */

.loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: #04060c;
  color: var(--cream);
  transition:
    opacity 1.6s ease 0.1s,
    visibility 0s 1.8s;
}
.loader__in {
  display: grid;
  justify-items: center;
  gap: 18px;
  transition:
    opacity 0.5s ease,
    transform 0.9s var(--out);
}
.loader__in span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--cream72);
}
.loader__in i {
  display: block;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cream), transparent);
  animation: horizon 1.6s ease-in-out infinite alternate;
}
@keyframes horizon {
  from {
    transform: scaleX(0.25);
    opacity: 0.35;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
html.is-ready .loader {
  opacity: 0;
  visibility: hidden;
}
html.is-ready .loader__in {
  opacity: 0;
  transform: translateY(-10px);
}

/* ── the display on the wall ─────────────────────────────────────────── */

.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  perspective: 1700px;
  pointer-events: none;
}
.stage__tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.tablet {
  position: absolute;
  left: 0;
  top: 0;
  width: 1220px;
  height: 860px;
  transform-origin: 0 0;
  opacity: 0;
  visibility: hidden;
  font-family: var(--sans);
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
}
.tablet__body {
  position: absolute;
  inset: 0;
  padding: 20px;
  border-radius: 48px;
  background: linear-gradient(145deg, #202126, #08080a 42%, #101013);
  /* Lit from the window, upper left: the long shadow falls down and right. */
  box-shadow:
    0 0 0 1px #000,
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.16),
    0 2px 3px rgba(21, 23, 27, 0.3),
    14px 26px 40px -20px rgba(58, 44, 26, 0.4),
    44px 90px 120px -40px rgba(58, 44, 26, 0.45);
}
.tablet__screen {
  position: relative;
  width: 1180px;
  height: 820px;
  overflow: hidden;
  border-radius: 29px;
  background: var(--ground);
}
.tablet__glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    116deg,
    rgba(255, 255, 255, 0) 34%,
    rgba(255, 246, 224, 0.2) 45%,
    rgba(255, 255, 255, 0.04) 52%,
    rgba(255, 255, 255, 0) 60%
  );
  opacity: 0;
  transform: translateX(-30%);
  transition:
    opacity 1.6s ease,
    transform 2.6s var(--out);
  pointer-events: none;
}
.tablet.is-awake .tablet__glare {
  opacity: 1;
  transform: none;
}

.t-day {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}
.t-head {
  display: flex;
  align-items: center;
  gap: 24px;
}
.t-clockblock {
  display: flex;
  align-items: center;
  gap: 16px;
}
.t-clock {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 104px;
  line-height: 104px;
  letter-spacing: -4.5px;
  font-variant-numeric: lining-nums tabular-nums;
}
.t-date {
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.4px;
}
.t-small {
  display: block;
  font-size: 15px;
  letter-spacing: -0.1px;
  color: var(--ink2);
}
.t-family {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding-left: 4px;
}
.t-family .t-avatar + .t-avatar {
  margin-left: -5px;
}
.t-family__pets {
  margin-left: 14px;
  display: inline-flex;
}
.t-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 16%, #fff);
  color: var(--c);
  font-weight: 700;
  font-size: calc(var(--s) * 0.42);
  line-height: 1;
}
/* A white gap, then the ring: a sticker on the card, not a boxed-in face. */
.t-avatar--ring {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--c);
}
.t-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow:
    0 2px 4px rgba(21, 23, 27, 0.05),
    0 18px 40px -22px rgba(21, 23, 27, 0.28);
}
.t-next {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  /* The butter wash: the one card that says "morning" before a word is read. */
  background: linear-gradient(135deg, #fdf3d6 0%, #fff 55%, #fce6cb 100%);
}
.t-next__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.t-next__body b {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.4px;
}
.t-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--ink3);
}
.t-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow:
    0 1px 2px rgba(21, 23, 27, 0.05),
    0 6px 16px -10px rgba(21, 23, 27, 0.18);
}
.t-weather {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
}
.t-weather__emoji {
  font-size: 40px;
  line-height: 48px;
}
.t-weather b {
  display: block;
  font-weight: 600;
  font-size: 30px;
  line-height: 32px;
  letter-spacing: -1px;
}
.t-columns {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 0;
}
.t-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.t-colhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.t-colhead h4 {
  flex: 1;
  margin: 0;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.7px;
}
.t-meta {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink3);
  white-space: nowrap;
}
.t-gloss {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: #fff;
  background:
    radial-gradient(
      circle at 30% 22%,
      rgba(255, 255, 255, 0.75) 0%,
      rgba(255, 255, 255, 0.16) 38%,
      rgba(255, 255, 255, 0) 62%
    ),
    linear-gradient(135deg, var(--a), var(--b), var(--c));
  box-shadow: 0 6px 12px -6px rgba(27, 35, 64, 0.32);
}
.t-gloss--calendar {
  --a: #8fb6ff;
  --b: #4e7bee;
  --c: #7a4fe0;
}
.t-gloss--shopping {
  --a: #6ee7a8;
  --b: #35c48c;
  --c: #2f7fd4;
}
.t-gloss--tasks {
  --a: #ffd978;
  --b: #f5a93c;
  --c: #e8683f;
}
.t-gloss--family {
  --a: #c9a6ff;
  --b: #9b6bf0;
  --c: #e0619e;
}

.t-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding-right: 4px;
}
.t-row__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.3s;
}
/* The most repeated gesture in the app: the circle dips and springs back full. */
.t-check {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
  border: 1.5px solid var(--rule2);
  border-radius: 50%;
  background: #fff;
  color: #fff;
  transition:
    background 0.22s,
    border-color 0.22s;
}
.t-check svg {
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.2s,
    transform 0.45s var(--spring);
}
.is-done > .t-check,
.t-check.is-done {
  border-color: var(--blue);
  background: var(--blue);
}
.is-done > .t-check svg,
.t-check.is-done svg {
  opacity: 1;
  transform: none;
}
.is-ticked > .t-check {
  animation: dip 0.55s var(--spring);
}
@keyframes dip {
  35% {
    transform: scale(0.78);
  }
}
.t-tick {
  max-height: 52px;
  transition:
    max-height 0.6s var(--out),
    min-height 0.6s var(--out),
    opacity 0.3s ease;
}
.t-tick.is-done .t-row__text {
  color: var(--ink3);
  text-decoration: line-through;
}
/* Shopping only: bought things leave the wall for the basket. */
.t-tick.is-gone {
  max-height: 0;
  min-height: 0;
  opacity: 0;
}
.t-more {
  height: 0;
  opacity: 0;
  transition:
    height 0.5s var(--out),
    opacity 0.4s;
}
.t-more.is-on {
  height: 28px;
  padding-top: 8px;
  opacity: 1;
}

.t-agenda {
  align-items: flex-start;
  min-height: 56px;
  padding: 7px 4px 7px 0;
}
.t-agenda__time {
  width: 58px;
  font-weight: 700;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.t-agenda__body {
  flex: 1;
  min-width: 0;
}
.t-agenda__body b {
  display: block;
  font-weight: 500;
  font-size: 18px;
}
.t-agenda__body small {
  display: block;
  font-size: 14px;
  color: var(--ink2);
}
.t-agenda--new {
  max-height: 0;
  min-height: 0;
  margin: 0 -10px;
  padding: 0 14px 0 10px;
  overflow: hidden;
  border-radius: 14px;
  opacity: 0;
  transition:
    max-height 0.7s var(--out),
    min-height 0.7s var(--out),
    padding 0.7s var(--out),
    opacity 0.5s ease;
}
.t-agenda--new.is-in {
  max-height: 60px;
  min-height: 56px;
  padding-block: 7px;
  opacity: 1;
  animation: fresh 3.2s ease-out both;
}
@keyframes fresh {
  0%,
  45% {
    background: var(--blue-tint);
  }
  100% {
    background: transparent;
  }
}
.t-new {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  vertical-align: 2px;
}

.t-last {
  min-height: 56px;
}
.t-last__tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--sunken);
  font-size: 23px;
}
.t-last__body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.t-last__body b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 18px;
  white-space: nowrap;
}
.t-last__body small {
  font-size: 13px;
  color: var(--ink3);
  white-space: nowrap;
}
.t-last__age {
  font-weight: 600;
  font-size: 18px;
  color: var(--ink2);
  text-align: right;
  white-space: nowrap;
}
/* "It has been a while" — a fact, stated once, in a colour. Never a reminder. */
.t-last__age.is-late > :first-child {
  color: var(--warn-ink);
}
.t-last__age > :last-child {
  color: var(--good);
}
.t-swap {
  display: inline-grid;
}
.t-swap > * {
  grid-area: 1 / 1;
  transition:
    opacity 0.35s ease,
    transform 0.6s var(--out);
}
.t-swap > :last-child {
  opacity: 0;
  transform: translateY(7px);
}
.t-swap.is-on > :first-child,
.is-done > .t-last__age > :first-child,
.is-named .t-last__body .t-swap > :first-child {
  opacity: 0;
  transform: translateY(-7px);
}
.t-swap.is-on > :last-child,
.is-done > .t-last__age > :last-child,
.is-named .t-last__body .t-swap > :last-child {
  opacity: 1;
  transform: none;
}
/* The wall belongs to everyone, so a mark made there asks whose it was. */
.t-who {
  display: flex;
  align-items: center;
  gap: 14px;
  max-height: 0;
  margin-top: 0;
  padding: 0 16px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  opacity: 0;
  transition:
    max-height 0.6s var(--out),
    margin 0.6s var(--out),
    padding 0.6s var(--out),
    opacity 0.35s ease;
}
.t-who span:first-child {
  flex: 1;
}
.t-who .t-avatar {
  box-shadow: 0 0 0 2px var(--ink);
  transition:
    transform 0.45s var(--spring),
    box-shadow 0.3s,
    opacity 0.3s;
}
.is-asking .t-who {
  max-height: 60px;
  margin-top: 8px;
  padding-block: 10px;
  opacity: 1;
}
.is-answered .t-who .t-avatar {
  opacity: 0.35;
}
.is-answered .t-who [data-who="ida"] {
  opacity: 1;
  transform: scale(1.16);
  box-shadow:
    0 0 0 2px var(--ink),
    0 0 0 4px #fff;
}

/* Night console: warm cream on near-black, so the kitchen is not lit by a
   dashboard at midnight. */
.t-night {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--night);
  color: var(--cream);
  transition:
    opacity 1.5s ease,
    transform 2s var(--out);
}
.t-night__clock {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 180px;
  line-height: 180px;
  letter-spacing: -8px;
  font-variant-numeric: lining-nums tabular-nums;
}
.t-night__date {
  font-weight: 500;
  font-size: 22px;
  color: var(--cream72);
}
.t-night__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 460px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: var(--night-raised);
}
.t-night__label {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--cream50);
}
.t-night__row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
}
.t-night__row b {
  width: 64px;
  font-weight: 700;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.t-night__row span:not(.t-avatar) {
  flex: 1;
  font-weight: 500;
  font-size: 18px;
  color: var(--cream72);
}
.t-night .t-avatar {
  background: color-mix(in srgb, var(--c) 24%, var(--night-raised));
}
.t-night__hint {
  position: absolute;
  bottom: 54px;
  font-size: 14px;
  color: var(--cream50);
}
.tablet.is-awake .t-night {
  opacity: 0;
  transform: scale(1.04);
}

/* Waking: the day assembles card by card rather than switching on. */
.t-head,
.t-stack > .t-card {
  transition:
    opacity 0.7s ease,
    transform 1.2s var(--out),
    box-shadow 0.8s ease;
}
.tablet:not(.is-awake) .t-head,
.tablet:not(.is-awake) .t-stack > .t-card {
  opacity: 0;
  transform: translateY(26px);
  transition-duration: 0.3s;
  transition-delay: 0s;
}
.tablet.is-awake .t-head {
  transition-delay: 0.35s;
}
.tablet.is-awake .t-stack:nth-child(1) > .t-card:nth-child(1) {
  transition-delay: 0.5s;
}
.tablet.is-awake .t-stack:nth-child(2) > .t-card {
  transition-delay: 0.6s;
}
.tablet.is-awake .t-stack:nth-child(3) > .t-card {
  transition-delay: 0.7s;
}
.tablet.is-awake .t-stack:nth-child(1) > .t-card:nth-child(2) {
  transition-delay: 0.8s;
}
/* One thing at a time: the card being talked about lifts, the rest recede. */
.tablet[data-focus] .t-head,
.tablet[data-focus] .t-stack > .t-card {
  opacity: 0.4;
  transition-delay: 0s;
}
.stage .tablet[data-focus="calendar"] .t-stack > [data-card="calendar"],
.stage .tablet[data-focus="shopping"] .t-stack > [data-card="shopping"],
.stage .tablet[data-focus="tasks"] .t-stack > [data-card="tasks"],
.stage .tablet[data-focus="lastdone"] .t-stack > [data-card="lastdone"] {
  z-index: 2;
  opacity: 1;
  transform: scale(1.035);
  box-shadow:
    0 4px 8px rgba(21, 23, 27, 0.05),
    0 46px 80px -36px rgba(21, 23, 27, 0.5);
}

/* ── the link pages ──────────────────────────────────────────────────── */

.linkpage {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: var(--pad);
}
.linkpage__card {
  width: min(30rem, 100%);
  padding: clamp(24px, 3vw, 36px);
  border-radius: 28px;
  background: rgba(12, 14, 19, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  backdrop-filter: blur(28px) saturate(1.3);
}
html[data-tone="light"] .linkpage__card {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 40px 70px -35px rgba(21, 23, 27, 0.35);
}
.linkpage h1 {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.025em;
}
.linkpage h1 em {
  font-style: italic;
}
.linkpage .eyebrow {
  margin-bottom: 1.4rem;
}
.linkpage .say {
  font-size: 1.08rem;
  line-height: 1.4;
}
.linkpage .note {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--fg2);
}
.linkpage .button {
  margin-top: 1.2rem;
}
.linkpage .signin .button {
  margin-top: 0;
}
.linkpage .signin input {
  border-color: transparent;
}
.linkpage__home {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--fg2);
  font-size: 0.85rem;
  font-weight: 500;
  text-underline-offset: 4px;
}
html.is-link main,
html.is-link .layers,
html.is-link .stage,
html.is-link .hud--rail,
html.is-link .hud--clock,
html.is-link .hud .pill {
  display: none;
}
html.is-link .mark span {
  opacity: 0;
}

/* ── narrow screens: the display on top, the words underneath ────────── */

@media (max-width: 899px), (orientation: portrait) {
  .title {
    font-size: clamp(3.9rem, 21vw, 8.5rem);
    line-height: 0.84;
  }
  .title__line {
    display: block;
  }
  .statement {
    font-size: clamp(2.1rem, 9.4vw, 4rem);
  }
  .statement--sun {
    font-size: clamp(3rem, 15vw, 6.5rem);
    margin-top: clamp(96px, 20vh, 200px);
  }
  .statement--wall {
    font-size: clamp(2.6rem, 12.5vw, 5.5rem);
    padding: 0 var(--pad);
  }
  .copy {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    transform: none;
    padding: 0 var(--pad) max(84px, calc(env(safe-area-inset-bottom) + 76px));
  }
  /* The wall's own colour, rising: the words sit on plaster, not on the edge
     of a zoomed-in card. One sheet for all the chapters, so it does not blink
     between them. */
  .scrim {
    display: block;
    position: absolute;
    inset: 0;
    background:
      linear-gradient(#e6e3de 0%, rgba(230, 227, 222, 0.9) 7%, rgba(230, 227, 222, 0) 15%),
      linear-gradient(rgba(230, 227, 222, 0) 50%, rgba(230, 227, 222, 0.95) 62%, #e6e3de 74%);
    opacity: 0;
    transition: opacity 0.6s ease;
  }
  /* Zoomed in, the rest of the wall is only clutter behind the words. */
  .tablet[data-focus] .t-head,
  .tablet[data-focus] .t-stack > .t-card {
    opacity: 0.14;
  }
  .mark span {
    display: none;
  }
  .foot {
    bottom: max(70px, calc(env(safe-area-inset-bottom) + 62px));
  }
  .scrim.is-on {
    opacity: 1;
  }
  .copy h2 {
    margin: 0.7rem 0 0.8rem;
    font-size: clamp(1.9rem, 8.2vw, 3rem);
  }
  .hud--rail {
    display: none;
  }
  .hud .pill {
    padding: 0 14px;
  }
  .out {
    align-content: start;
    padding-top: clamp(92px, 15vh, 150px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cue__in i,
  .loader__in i {
    animation: none;
  }
  .copy > *,
  .t-head,
  .t-stack > .t-card,
  .t-night,
  .tablet__glare {
    transition-duration: 0.01s !important;
    transition-delay: 0s !important;
  }
}
