/* greek */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/literata-italic-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/literata-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/literata-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/literata-normal-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/literata-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/literata-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Noto Serif Display';
  font-style: italic;
  font-weight: 400 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/noto-serif-display-italic-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Noto Serif Display';
  font-style: italic;
  font-weight: 400 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/noto-serif-display-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Noto Serif Display';
  font-style: italic;
  font-weight: 400 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/noto-serif-display-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Noto Serif Display';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/noto-serif-display-normal-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Noto Serif Display';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/noto-serif-display-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Noto Serif Display';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/noto-serif-display-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Night in Warsaw: navy from the curtains, gold from the bar lamps, a dusty rose for her side of the story. */
:root {
  --night: #0b1120;
  --night-2: #0f1729;
  --bubble: #1d2740;
  --line: rgba(240, 232, 220, .14);
  --ivory: #f3ece1;
  --text: #e4ddd1;
  --muted: #a8a296;
  --gold: #e8b96c;
  --rose: #eeb3a8;
  --lamp: #ffd38a;
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --display: 'Noto Serif Display', 'Literata', Georgia, serif;
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 40px);
  --measure: 35rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.125rem/1.75 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1.05em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Reading progress along the top edge. */
.progress { position: fixed; inset: 0 0 auto; z-index: 10; height: 3px; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--rose)); transform: scaleX(0); transform-origin: 0 50%; }

/* Opening: the courtyard at night, title over it. */
.hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: 100svh; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 17, 32, .45) 0%, rgba(11, 17, 32, .15) 30%, rgba(11, 17, 32, .82) 62%, var(--night) 100%);
}
.hero-copy { max-width: 38rem; padding: 0 var(--gutter) clamp(44px, 9vh, 88px); }
.kicker { margin-bottom: 18px; font: 600 .875rem/1.5 var(--ui); letter-spacing: .02em; color: var(--gold); }
h1 { margin: 0 0 22px; font: italic 500 clamp(3.75rem, 18vw, 7.5rem)/.95 var(--display); letter-spacing: -.015em; color: var(--ivory); }
.gloss { max-width: 25rem; font-size: 1.125rem; color: var(--text); text-wrap: pretty; }
.byline { margin: 26px 0 28px; font: 500 1.375rem/1.3 var(--display); color: var(--ivory); }
.byline span, .footer-names span { font-style: italic; color: var(--rose); }
.cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 600 .9375rem/1 var(--ui);
  text-decoration: none;
  color: var(--ivory);
}
.cue-time { font-weight: 400; color: var(--muted); }
.cue svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(5px); } }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 44vw); align-items: center; }
  .hero-photo { position: relative; grid-area: 1 / 2; z-index: 0; height: 100svh; }
  .hero::after { z-index: 1; background: linear-gradient(90deg, var(--night) 0 56%, rgba(11, 17, 32, 0) 74%), linear-gradient(0deg, var(--night) 0, rgba(11, 17, 32, 0) 22%); }
  .hero-copy { position: relative; z-index: 2; grid-area: 1 / 1; padding: 0 var(--gutter) 0 max(var(--gutter), 8vw); }
}

/* Prologue: 02:14 in the courtyard. */
.prologue { width: min(100%, calc(var(--measure) + 2 * var(--gutter))); margin: 0 auto; padding: clamp(80px, 14vh, 150px) var(--gutter) 0; text-align: center; }
.clock { margin-bottom: 36px; font: 500 clamp(3.75rem, 16vw, 5.75rem)/1 var(--display); font-variant-numeric: tabular-nums; color: var(--lamp); }
.prologue p:not(.clock, .rewind) { font-size: 1.25rem; text-wrap: balance; }
.rewind { display: flex; align-items: center; gap: 16px; margin: 72px 0 0; font: 600 .75rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rewind::before, .rewind::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Chapters: one reading column, wider moments break out of it. */
.chapter { padding-top: clamp(96px, 15vh, 160px); }
.chapter > :where(*) { width: min(100%, calc(var(--measure) + 2 * var(--gutter))); margin-inline: auto; padding-inline: var(--gutter); }
.chapter-head { margin-bottom: 40px; }
.chapter-no { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; font: 600 .75rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pov { padding: 7px 11px; border-radius: 999px; letter-spacing: .1em; }
.pov-ilias { color: var(--gold); background: rgba(232, 185, 108, .12); }
.pov-dasha { color: var(--rose); background: rgba(238, 179, 168, .12); }
h2 { margin: 0; font: 500 clamp(2.375rem, 10vw, 3.75rem)/1.04 var(--display); letter-spacing: -.012em; color: var(--ivory); text-wrap: balance; }
h2 em { font-weight: 400; color: var(--gold); }
[data-pov="dasha"] h2 em, .epilogue h2 em { color: var(--rose); }
.chapter p { text-wrap: pretty; }
.chapter .line { margin-bottom: .45em; }
.beat { margin-top: 1.6em; font: italic 500 1.375rem/1.45 var(--display); color: var(--ivory); }
.said { font-weight: 500; color: var(--ivory); }
.aside-line { font-style: italic; color: var(--muted); }

.photo { margin-block: 48px; }
.photo img { width: auto; max-height: 82vh; margin-inline: auto; border-radius: 4px; box-shadow: 0 34px 80px -34px rgba(0, 0, 0, .9); }
.photo figcaption, .night-window figcaption { max-width: 28rem; margin: 16px auto 0; font: italic 400 .9375rem/1.55 var(--serif); text-align: center; color: var(--muted); text-wrap: balance; }
@media (max-width: 599px) {
  .chapter > .photo { padding-inline: 0; }
  .photo img { width: 100%; max-height: none; border-radius: 0; }
  .photo figcaption { padding-inline: var(--gutter); }
}

.avatar { display: grid; place-items: center; flex: none; width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(140deg, var(--rose), var(--gold)); font: 500 1.75rem/1 var(--display); color: #22140c; }
.avatar.sm { width: 30px; height: 30px; font-size: .9375rem; }
.avatar.big { width: 88px; height: 88px; margin: 0 auto 16px; font-size: 2.25rem; }

/* The contact she saved in his phone. */
.chapter > .contact {
  width: min(calc(100% - 2 * var(--gutter)), 20rem);
  margin-block: 40px 8px;
  padding: 28px 22px 26px;
  text-align: center;
  font-family: var(--ui);
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 26px;
}
.contact .avatar { margin: 0 auto 14px; }
.contact-label { margin-bottom: 18px; font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-name { margin-bottom: 4px; font: italic 500 1.75rem/1.2 var(--display); color: var(--ivory); }
.contact-number { margin-bottom: 20px; letter-spacing: .12em; color: var(--muted); }
.translate, .signal, .reveal-btn {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  font: 600 .9375rem/1 var(--ui);
  color: var(--gold);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.translate:hover, .signal:hover, .reveal-btn:hover { background: var(--gold); color: var(--night); }
.translation { margin: 16px 0 0; font: italic 400 1.1875rem/1.4 var(--serif); color: var(--rose); }

/* Message threads. */
.chapter > .chat {
  width: min(calc(100% - 2 * var(--gutter)), 24rem);
  margin-block: 40px 44px;
  padding: 0 0 16px;
  overflow: hidden;
  font: 400 .96875rem/1.4 var(--ui);
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 28px;
}
.chat-top { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 18px; font-weight: 600; color: var(--ivory); border-bottom: 1px solid var(--line); }
.chat-day { margin: 14px 0 8px; font-size: .75rem; text-align: center; color: var(--muted); }
.msg { display: flex; flex-direction: column; max-width: 80%; margin: 3px 14px; }
.msg > span { padding: 9px 14px; border-radius: 20px; }
.msg time { margin: 3px 8px 5px; font-size: .6875rem; color: var(--muted); }
.msg.them { align-items: flex-start; }
.msg.them > span { background: var(--bubble); color: var(--ivory); border-bottom-left-radius: 6px; }
.msg.me { align-items: flex-end; margin-left: auto; }
.msg.me > span { background: var(--gold); color: #21160a; border-bottom-right-radius: 6px; }
.chat-dasha .msg.me > span { background: var(--rose); color: #2b1411; }
.seen { margin: 2px 18px 0; font-size: .6875rem; text-align: right; color: var(--muted); }
.typing { display: inline-flex; gap: 5px; margin: 3px 14px; padding: 13px 15px; background: var(--bubble); border-radius: 20px 20px 20px 6px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dots 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.chat .wait { display: none; }
.chat .pop { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* Zosia's three questions. */
.interrogation { margin-block: 30px 34px; list-style: none; counter-reset: q; }
.interrogation li { position: relative; padding: 18px 0 16px 50px; border-top: 1px solid var(--line); }
.interrogation li:last-child { border-bottom: 1px solid var(--line); }
.interrogation li::before {
  content: counter(q);
  counter-increment: q;
  position: absolute;
  top: 19px;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font: 600 .875rem/1 var(--ui);
  color: var(--rose);
  border: 1px solid var(--rose);
  border-radius: 50%;
}
.q { margin-bottom: .25em; font-style: italic; color: var(--ivory); }
.a { margin-bottom: .25em; font-weight: 500; color: var(--gold); }
.aside { margin: 0; font-size: .9375rem; color: var(--muted); }

/* The notification that lit up on the kitchen counter. */
.chapter > .notice {
  width: min(calc(100% - 2 * var(--gutter)), 22rem);
  margin-block: 34px;
  padding: 14px 16px 12px;
  font: 400 .9375rem/1.4 var(--ui);
  background: rgba(243, 236, 225, .09);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}
.notice-app { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.notice-from { margin-bottom: 2px; font-weight: 600; color: var(--ivory); }
.notice-text { margin: 0; color: var(--text); }
.blur { filter: blur(5px); user-select: none; }

/* The courtyard facade: her window answers. */
.chapter > .night-window { width: min(calc(100% - 2 * var(--gutter)), 24rem); margin-block: 44px; }
.facade {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 11px 8px;
  padding: 22px 18px 30px;
  background: linear-gradient(180deg, #252c39 0%, #1b212d 100%);
  border-radius: 6px;
  box-shadow: inset 0 -26px 0 #121823, 0 34px 80px -34px rgba(0, 0, 0, .9);
}
.facade:empty { display: none; }
.facade span { aspect-ratio: 3 / 4; border-radius: 2px; background: #0e131d; cursor: pointer; transition: background .2s; }
/* A lamp behind a curtain: brightest at the middle of the pane, warmer at the frame. */
.facade span.on { background: radial-gradient(70% 60% at 50% 45%, #fff0cf 0%, var(--lamp) 55%, #d9a45a 100%); }
.facade span.panel { background: #7a4a2c; cursor: default; }
.facade span.her.found { outline: 2px solid var(--rose); outline-offset: 3px; }
.night-window .signal { display: block; margin: 18px auto 0; }

/* The 7:40 call. */
.chapter > .call {
  width: min(calc(100% - 2 * var(--gutter)), 22rem);
  margin-block: 40px 44px;
  padding: 34px 24px 28px;
  text-align: center;
  font-family: var(--ui);
  background: radial-gradient(120% 80% at 50% 0%, #2a3352 0%, var(--night-2) 72%);
  border: 1px solid var(--line);
  border-radius: 32px;
}
.call-label { margin-bottom: 20px; font-size: .8125rem; color: var(--muted); }
.call-name { margin-bottom: 4px; font: italic 500 1.875rem/1.2 var(--display); color: var(--ivory); }
.call-state { margin: 0; font-size: .875rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.call[data-state="ringing"] .avatar { animation: ring 1.6s var(--ease) infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(238, 179, 168, .5); } 100% { box-shadow: 0 0 0 22px rgba(238, 179, 168, 0); } }
.call-actions { display: flex; justify-content: space-around; margin-top: 30px; }
.call-btn { display: grid; justify-items: center; gap: 9px; padding: 0; font-size: .8125rem; color: var(--text); background: none; border: 0; cursor: pointer; }
.call-btn b { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; transition: transform .15s; }
.call-btn:active b { transform: scale(.94); }
.call-btn svg { width: 28px; height: 28px; fill: #fff; }
.decline b { background: #e5484d; }
.accept b { background: #30a46c; }
.call-toast { margin: 18px 0 0; font: italic 400 1rem/1.4 var(--serif); color: var(--rose); }
.call.nope .call-actions { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.call-talk { margin-top: 26px; padding-top: 22px; font: 400 1.0625rem/1.65 var(--serif); text-align: left; border-top: 1px solid var(--line); }
.call-talk p:last-child { margin-bottom: 0; }

/* Epilogue: what Zosia whispered. */
.reveal { margin-block: 36px 8px; text-align: center; }
.reveal-text { transition: filter .9s var(--ease), opacity .9s var(--ease); }
.reveal.closed .reveal-text { filter: blur(14px); opacity: .55; user-select: none; }
.reveal-pl { margin-bottom: 10px; font: italic 500 clamp(3rem, 13vw, 4.75rem)/1 var(--display); color: var(--rose); }
.reveal-gr { font-size: 1.3125rem; color: var(--ivory); }
.reveal-btn { margin-bottom: 26px; }
.finale { margin-top: 72px; font: italic 500 clamp(1.625rem, 6.4vw, 2.25rem)/1.3 var(--display); text-align: center; color: var(--ivory); text-wrap: balance; }
.tbc { font: 600 .75rem/1 var(--ui); letter-spacing: .22em; text-transform: uppercase; text-align: center; color: var(--gold); }

.footer { padding: clamp(100px, 16vh, 160px) var(--gutter) 56px; font: 400 .875rem/1.6 var(--ui); text-align: center; color: var(--muted); }
.footer p { margin: 0 0 6px; }
.footer-names { font: 500 1.25rem/1.4 var(--display); color: var(--ivory); }

/* Blocks ease in as you reach them. */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (min-width: 600px) {
  body { font-size: 1.1875rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
