/* One working day read as a clock: full-bleed photographs, then a white sheet of hairline rows, each with a large time. */
:root {
  --ink: #192b36;
  --ink-soft: #4b5a60;
  --line: #e6e2d9;
  --sheet: #ffffff;
  --night: #04070c;
  --turn: #f8b500;
  --display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --gutter: max(clamp(20px, 5.55vw, 80px), calc((100vw - 1640px) / 2));
  --time: clamp(3.5rem, 6.1vw, 6rem);
  --head: clamp(1.5rem, 2.1vw, 1.875rem);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html { font-size: 16px; scroll-behavior: smooth; scrollbar-color: #a9a596 var(--sheet); -webkit-text-size-adjust: 100%; }
body { background: var(--sheet); color: var(--ink); font-family: var(--body); line-height: 1.6; letter-spacing: .02em; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .25em; }
::selection { background: var(--turn); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; font-feature-settings: "palt"; letter-spacing: .04em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }

.clock { font-family: var(--display); font-weight: 500; font-size: var(--time); line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--sheet); color: var(--ink); font-size: .9375rem; font-weight: 700; text-decoration: none; transition: background-color .2s ease; }
.pill:hover { background: #e9e4d9; }
.pill:focus-visible { outline-color: var(--sheet); }
.pill-ink { background: var(--ink); color: var(--sheet); }
.pill-ink:hover { background: #2b4250; }
.pill-ink:focus-visible { outline-color: var(--ink); }

.small { font-size: .8125rem; line-height: 1.8; color: var(--ink-soft); }
.say p, .small, .price-head p, .band-body p, .last-body p, .ask dd, .draw-note, .foot p, .words button span:last-child { word-break: auto-phrase; }

/* First view */
.first { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; background: var(--night); color: var(--sheet); overflow: hidden; }
.first-photo, .last-photo, .band-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.first::after, .last::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60%; background: linear-gradient(transparent, rgba(3, 6, 10, .72)); }

.top { position: absolute; z-index: 2; top: 28px; left: 40px; right: 40px; display: flex; align-items: center; justify-content: space-between; font-size: .875rem; }
.top-mark img { height: 30px; width: auto; }
.top nav { display: flex; gap: 28px; }
.top nav a { text-decoration: none; opacity: .88; padding-block: 12px; }
.top nav a:hover { opacity: 1; text-decoration: underline; }

.first-body { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(40px, 8.4vh, 76px); }
.first-line { font-size: min(6rem, max(calc((100vw - 2 * var(--gutter)) / 23.2), min(9.7vw, 2.4rem))); line-height: 1.3; letter-spacing: 0; text-wrap: wrap; }
.first-line span { display: inline-block; white-space: nowrap; }
.first-body .pill { margin-top: clamp(20px, 3.5vh, 32px); }

/* The rows of the day */
.row { display: grid; grid-template-columns: minmax(0, 17fr) minmax(0, 26fr) minmax(0, 43fr); column-gap: clamp(24px, 2.8vw, 40px); align-items: start; padding: clamp(40px, 3.9vw, 56px) var(--gutter); border-top: 1px solid var(--line); }
main > .row:first-child { border-top: 0; }
.say h2 { font-size: var(--head); line-height: 1.5; padding-top: .3em; }
.say p { margin-top: 12px; line-height: 1.9; color: var(--ink-soft); max-width: 32em; text-wrap: pretty; }
.say p.small { margin-top: 10px; line-height: 1.8; }
.pic img { width: 100%; }
.screen { border: 1px solid var(--line); }

/* The row where the time is a position in the recording */
.clock-rec { position: relative; }
.clock-rec span { display: block; }
.replay { all: unset; position: absolute; right: 100%; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 2px 0 0; cursor: pointer; border-radius: 50%; color: var(--ink); transition: background-color .2s ease; }
.replay:hover { background: #f1eee6; }
.replay:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.replay svg { width: 16px; height: 19px; fill: currentColor; }
.row-talk .say { grid-column: 2 / -1; }
.talk { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); gap: clamp(24px, 2.8vw, 40px); margin-top: clamp(24px, 2.8vw, 40px); }
.words { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.words li { border-bottom: 1px solid var(--line); }
.words button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 3.1em minmax(0, 1fr); gap: 4px; width: 100%; min-height: 44px; padding: 10px 2px; font-size: .9375rem; line-height: 1.7; color: var(--ink-soft); cursor: pointer; transition: color .25s ease; }
.words .at { font-variant-numeric: tabular-nums; }
.words button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.words button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.words button[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.draw { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 10fr); gap: clamp(16px, 2vw, 28px); align-content: start; }
.now { display: none; grid-column: 1 / -1; font-family: var(--display); font-weight: 700; font-feature-settings: "palt"; font-size: 1.125rem; line-height: 1.7; letter-spacing: .04em; min-height: 3.4em; word-break: auto-phrase; }
.draw figcaption { font-size: .8125rem; font-weight: 700; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.draw svg { width: 100%; height: auto; margin-top: 16px; }
.draw-note { grid-column: 1 / -1; font-size: .8125rem; line-height: 1.8; color: var(--ink-soft); }
[data-at] { transition: opacity .55s cubic-bezier(.16, 1, .3, 1); }
[data-at].is-later { opacity: 0; }

/* 17:30 */
.band { position: relative; height: clamp(600px, 62vw, 100svh); background: #1d2c3f; color: var(--sheet); overflow: hidden; }
.band::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 58%; background: linear-gradient(rgba(16, 32, 52, .55), transparent); }
.band-body { position: absolute; left: 25vw; top: 0; z-index: 2; padding: clamp(40px, 4.4vw, 64px) var(--gutter) 0 0; }
.band-body h2 { font-size: clamp(1.75rem, 2.9vw, 2.625rem); line-height: 1.45; margin-top: 14px; }
.band-body p { margin-top: 6px; font-size: 1.0625rem; line-height: 1.9; }

/* Price */
.price { border-top: 1px solid var(--line); padding: clamp(64px, 7vw, 104px) var(--gutter) clamp(48px, 5vw, 72px); }
.price-head h2 { font-size: clamp(1.75rem, 2.9vw, 2.625rem); line-height: 1.45; max-width: 26em; }
.price-head p { margin-top: 12px; color: var(--ink-soft); line-height: 1.9; }
.price-row { display: grid; grid-template-columns: minmax(0, 43fr) minmax(0, 43fr); column-gap: clamp(24px, 2.8vw, 40px); align-items: center; padding-block: clamp(24px, 2.4vw, 34px); border-bottom: 1px solid var(--line); }
.price-head + .price-row { margin-top: clamp(32px, 3.4vw, 48px); border-top: 1px solid var(--line); }
.yen { font-size: .34em; margin-left: .18em; font-weight: 500; }
.price-for h3 { font-size: var(--head); line-height: 1.5; }
.price-for p { margin-top: 2px; font-size: .9375rem; color: var(--ink-soft); }
.clock-word { font-size: calc(var(--time) * .62); font-weight: 700; font-feature-settings: "palt"; letter-spacing: .04em; }
.price-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 28px; }

/* Questions */
.ask { border-top: 1px solid var(--line); padding: clamp(56px, 6vw, 88px) var(--gutter); }
.ask h2 { font-size: var(--head); line-height: 1.5; }
.ask dl { margin-top: clamp(20px, 2.4vw, 32px); border-top: 1px solid var(--line); }
.ask dl > div { display: grid; grid-template-columns: minmax(0, 43fr) minmax(0, 43fr); column-gap: clamp(24px, 2.8vw, 40px); padding-block: clamp(18px, 1.8vw, 24px); border-bottom: 1px solid var(--line); }
.ask dt { font-family: var(--display); font-weight: 700; font-size: 1.125rem; line-height: 1.7; font-feature-settings: "palt"; letter-spacing: .04em; }
.ask dd { margin: 0; line-height: 1.9; color: var(--ink-soft); max-width: 36em; text-wrap: pretty; }

/* The same desk, later */
.last { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; background: var(--night); color: var(--sheet); overflow: hidden; }
.last-body { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(40px, 8.4vh, 76px); }
.last-body h2 { font-size: clamp(1.75rem, 2.9vw, 2.625rem); line-height: 1.45; margin-top: 16px; }
.last-body p { margin-top: 10px; line-height: 1.9; }
.last-body .pill { margin-top: clamp(18px, 2.6vh, 24px); }
.last-body .last-mail { margin-top: 12px; font-size: .875rem; opacity: .88; }

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 28px var(--gutter) 36px; }
.foot img { height: 24px; width: auto; }
.foot p { font-size: .8125rem; line-height: 1.8; color: var(--ink-soft); flex: 1 1 24em; }

/* The line writes itself once, when the page opens. It is visible by default, so nothing depends on this. */
@media (prefers-reduced-motion: no-preference) {
  .first-line span { animation: write .7s cubic-bezier(.35, .3, .6, 1) both; }
  .first-line span:nth-child(1) { animation-delay: .25s; }
  .first-line span:nth-child(2) { animation-delay: .9s; animation-duration: .4s; }
  .first-line span:nth-child(3) { animation-delay: 1.25s; }
  @keyframes write { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% -2% -10% 0); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-at], .words button, .pill, .replay { transition: none; }
}

@media (max-width: 1100px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); row-gap: 8px; }
  .row > .clock, .row > .say { grid-column: 1; }
  .row > .pic { grid-column: 2; grid-row: 1 / span 2; }
  .row-talk .say { grid-column: 1 / -1; }
  .talk { grid-template-columns: minmax(0, 1fr); }
  .words { order: 2; }
  .now { display: block; }
  .replay { position: static; margin: 0 0 0 -12px; }
  .clock-rec { display: flex; align-items: center; }
}
/* A phone: comfortable to press, and on a page this long the pill to ask comes round every couple of screens. It stays in the flow: nothing floats over the words. */
.reach { display: none; }
@media (max-width: 767.98px) {
  .top-mark { display: block; padding-block: 9px; margin-block: -9px; }
  .top nav a { padding-inline: 4px; margin-inline: -4px; }
  .last-mail a { display: inline-flex; align-items: center; min-height: 44px; padding-right: 12px; }
  .last-body .last-mail { margin-top: 4px; margin-bottom: -8px; }
  main > .reach { display: block; margin-top: -10px; padding: 0 var(--gutter) 28px; }
  .band-body .reach { display: block; margin-top: 14px; }
  /* The same rows, closer together: on a phone the page is long enough. */
  .row { padding-block: 28px; row-gap: 6px; }
  .say h2 { padding-top: .2em; line-height: 1.45; }
  .say p { margin-top: 8px; line-height: 1.75; }
  .say p.small { margin-top: 6px; line-height: 1.7; }
  .talk { gap: 14px; margin-top: 16px; }
  .words button { min-height: 40px; padding: 6px 2px; line-height: 1.6; }
  .draw { gap: 12px; }
  .draw svg { margin-top: 10px; }
  .draw-note { line-height: 1.7; }
  .band-body h2 { margin-top: 10px; }
  .band-body p { line-height: 1.75; }
  .price { padding-block: 42px 32px; }
  .price-head p { margin-top: 8px; line-height: 1.75; }
  .price-row { padding-block: 16px; }
  .price-head + .price-row { margin-top: 20px; }
  .price-foot { gap: 10px 24px; margin-top: 16px; }
  .ask { padding-block: 40px; }
  .ask dl { margin-top: 14px; }
  .ask dl > div { padding-block: 12px; }
  .ask dt { line-height: 1.6; }
  .ask dd { line-height: 1.75; }
  .last { min-height: 72vh; min-height: 72svh; }
  .last-body { padding-bottom: 34px; }
  .last-body h2 { margin-top: 10px; }
  .last-body p { margin-top: 6px; line-height: 1.75; }
  .foot { gap: 8px 24px; padding-block: 18px 24px; }
  .foot p { line-height: 1.7; }
}
@media (max-width: 720px) {
  .now { min-height: 5.1em; }
  .top { left: 20px; right: 20px; top: 20px; }
  .top-mark img { height: 26px; }
  .top nav { gap: 18px; }
  .first::after, .last::after { height: 58%; background: linear-gradient(transparent, rgba(3, 6, 10, .9) 60%); }
  .band-body { left: 0; padding: 34px var(--gutter) 0; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > .pic { grid-column: 1; grid-row: auto; margin-top: 10px; }
  .price-row, .ask dl > div { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .draw { grid-template-columns: minmax(0, 1fr); }
  .band { height: 66svh; min-height: 440px; }
  .band-photo { object-position: 50% 82%; } /* the one walking home stays in the picture */
}
