/* adriantoren.com. The cover's facade at night, and one lit window. */

@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #000;
  --text: #ECE7DF;
  --reading: #DCD6CD;
  --dim: #9A958E;
  --light: #F2DFB6;   /* the one lit window */
  --rule: rgba(236, 231, 223, .14);
  --gutter: clamp(20px, 4vw, 56px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  background: var(--night);
  color: var(--text);
  font-family: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  font-stretch: 100%;
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; }
a { color: inherit; }
cite { font-style: italic; }
:focus-visible { outline: 2px solid var(--light); outline-offset: 4px; }
::selection { background: var(--light); color: #000; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header: over the photograph on the home page, on black everywhere else */
.site .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; padding-bottom: 26px; }
.site.over { position: absolute; z-index: 3; top: 0; left: 0; right: 0; }
.site:not(.over) { border-bottom: 1px solid var(--rule); }
.wordmark { font-stretch: 125%; font-weight: 500; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.site nav { display: flex; gap: 30px; }
.site nav a { font-size: 15px; text-decoration: none; opacity: .8; }
.site nav a:hover, .site nav a[aria-current] { opacity: 1; box-shadow: 0 1px 0 currentColor; }

/* Hero: one window lights up, once */
.hero { position: relative; min-height: min(100svh, 960px); display: flex; align-items: flex-end; overflow: hidden; }
.facade { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 964 / 860; margin: 0; }
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.facade .dark { filter: brightness(.3) contrast(1.12); }
.facade .lit { clip-path: inset(35.2% 15% 41.6% 74.2%); filter: sepia(.55) saturate(1.5) brightness(1.12); animation: lights-on 1600ms 700ms ease-out both; }
.facade .glow { position: absolute; left: 74.2%; top: 35.2%; width: 10.8%; height: 23.2%; box-shadow: 0 0 140px 60px rgba(242, 223, 182, .16); animation: lights-on 2200ms 900ms ease-out both; }
.facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .75) 16%, rgba(0, 0, 0, 0) 46%), linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 22%); }
@keyframes lights-on { from { opacity: 0; } }

.hero .wrap { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(40px, 8vh, 88px); }
.hero-text { max-width: 30rem; }
.hero h1 { margin: 0; font-stretch: 125%; font-weight: 250; font-size: clamp(56px, 7.4vw, 108px); line-height: .95; letter-spacing: -.015em; }
.series-line { margin: 18px 0 0; font-size: 17px; color: var(--dim); }
.status { margin: 6px 0 0; font-size: 17px; color: var(--light); }
.hook { margin: 36px 0 0; }
.hook p { margin: 0; font-size: 24px; line-height: 1.4; font-weight: 340; }
.hook footer { margin-top: 8px; font-size: 14px; color: var(--dim); }
.actions { margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 14px; }
.button { display: inline-block; padding: 13px 22px; font-size: 16px; font-weight: 500; text-decoration: none; border: 1px solid var(--light); }
.button.solid { background: var(--light); color: #000; }
.button:hover { background: var(--text); color: #000; border-color: var(--text); }

/* Sections on the home page */
.band { border-top: 1px solid var(--rule); padding: clamp(56px, 8vw, 112px) 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); }
.band.centered { align-items: center; }
.band h2 { margin: 0; font-stretch: 112%; font-weight: 300; font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; }
.cover { margin: 0; max-width: 420px; }
.cover img { display: block; width: 100%; height: auto; box-shadow: 0 30px 80px rgba(242, 223, 182, .07); }
.lede { margin: 22px 0 34px; font-size: 20px; line-height: 1.6; max-width: 32em; }
.reading { max-width: 33em; font-size: 20px; line-height: 1.65; font-weight: 360; color: var(--reading); }
.reading p { margin: 0 0 1.1em; }
.more { font-size: 16px; font-weight: 500; text-decoration: none; color: var(--light); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.more:hover { color: var(--text); }
.promise { border-top: 1px solid var(--rule); padding: clamp(56px, 8vw, 104px) 0; }
.promise p { margin: 0; max-width: 18em; font-stretch: 118%; font-weight: 250; font-size: clamp(30px, 4vw, 56px); line-height: 1.15; }

/* The sign-up form */
.notify { scroll-margin-top: 40px; }
.notify label { display: block; font-size: 16px; color: var(--text); margin-bottom: 10px; }
.notify .row { display: flex; border-bottom: 1px solid var(--text); max-width: 30rem; }
.notify .row:focus-within { border-bottom-color: var(--light); }
.notify input[type="email"] { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 18px; padding: 12px 0; }
.notify input[type="email"]::placeholder { color: #7D7871; }
.notify input[type="email"]:focus-visible { outline: none; }
.notify button { border: 0; background: transparent; color: var(--light); font: inherit; font-size: 16px; font-weight: 600; padding: 0 0 0 16px; cursor: pointer; }
.notify button:hover { color: var(--text); }
.notify p { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--dim); max-width: 30rem; }
.notify p a { text-underline-offset: 3px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Inner pages */
.page { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(64px, 8vw, 112px); }
.page h1 { margin: 0; font-stretch: 118%; font-weight: 250; font-size: clamp(44px, 5.6vw, 80px); line-height: 1; letter-spacing: -.012em; }
.page h2 { margin: 2em 0 .6em; font-stretch: 112%; font-weight: 340; font-size: 24px; line-height: 1.2; color: var(--text); }
.page .reading { margin-top: 28px; }
.page .reading a { color: var(--light); text-underline-offset: 3px; }
.book-page { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.book-page .lede { margin-top: 28px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 40px; font-size: 16px; max-width: 32em; }
.details dt { color: var(--dim); }
.details dd { margin: 0; }
.books { margin: 0; padding: 0 0 0 1.4em; font-size: 20px; line-height: 1.65; font-weight: 360; color: var(--reading); }
.books a { color: var(--light); text-underline-offset: 3px; }
.fiction-notice { margin: 32px 0 0; max-width: 42em; font-size: 14px; line-height: 1.55; color: var(--dim); }
.after-chapter { margin-top: clamp(48px, 6vw, 72px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--rule); max-width: 33em; }
.after-chapter .status { margin: 0 0 22px; font-size: 20px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 26px 0 40px; display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14px; color: var(--dim); }
.site-footer a { text-decoration: none; border-bottom: 1px solid currentColor; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  .site .wrap { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 20px; padding-bottom: 20px; }
  .site nav { gap: 18px; }
  .hero { min-height: 0; display: block; }
  .facade { position: relative; width: 100%; height: auto; }
  .facade::after { background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 40%), linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 30%); }
  .hero .wrap { margin-top: -18vw; }
  .band, .book-page { grid-template-columns: 1fr; }
  .cover { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .facade .lit, .facade .glow { animation: none; }
}
