/* The Niconomist — front page */

:root {
  --pink: #E3106E;
  --off-air: #22262A;
  --paper: #FAECE6;
  --white: #FFFFFF;
  --grey: #9BA3A9;
  --hairline: rgba(155, 163, 169, .35);
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Inter', system-ui, -apple-system, sans-serif;
  --wonk-on: "opsz" 144, "SOFT" 0, "WONK" 1;
  --wonk-off: "opsz" 144, "SOFT" 0, "WONK" 0;
  --gpad: max(24px, calc(50vw - 570px));
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--off-air);
  color: var(--white);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; transition: color .15s ease; }
:focus-visible { outline: 1px solid var(--pink); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  a, button { transition: none; }
  .cover-word { animation: none !important; }
}

.cap { font-size: 13px; line-height: 1.45; letter-spacing: .02em; color: var(--grey); }

.eyebrow {
  font-size: 11px; line-height: 1; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 600; color: var(--grey);
}

/* ---------- cover ---------- */

.cover {
  background: var(--pink); color: var(--white);
  min-height: 100svh; display: flex; flex-direction: column;
  padding: clamp(18px, 3vh, 32px) clamp(20px, 4vw, 56px) clamp(24px, 4.5vh, 52px);
}
.cover-mast { margin-top: auto; }
.cover-the {
  font-family: var(--display); font-variation-settings: var(--wonk-on); font-weight: 600;
  font-size: clamp(22px, 4vw, 56px); line-height: 1; display: block; margin-bottom: .35em;
}
.cover-word { display: block; width: 100%; height: auto; animation: rise .7s ease both; }
.cover-word text {
  font-family: var(--display); font-variation-settings: var(--wonk-on); font-weight: 600; fill: var(--white);
}
.strap {
  margin: clamp(22px, 4vh, 44px) 0 0;
  max-width: 40ch;
  font-family: var(--text);
  font-weight: 400;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.4;
  animation: rise .7s .12s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- front matter ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 1px minmax(300px, 420px);
  column-gap: clamp(32px, 4vw, 60px);
  padding: clamp(56px, 9vh, 96px) var(--gpad);
  width: 100%;
}
.colrule { background: var(--hairline); }

.circ .eyebrow { display: block; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.circ a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: clamp(18px, 2.6vh, 26px) 0; border-bottom: 1px solid var(--hairline);
  transition: border-color .2s ease;
}
.circ a:hover { border-color: var(--pink); }
.circ .pl {
  font-family: var(--display); font-variation-settings: var(--wonk-off); font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; color: var(--white); transition: color .15s ease;
}
.circ .handle {
  color: var(--grey); font-size: 14px; text-align: right; overflow-wrap: anywhere;
  transition: color .2s ease, transform .2s ease;
}
.circ a:hover .handle, .circ a:focus-visible .handle { transform: translateX(-6px); }
.circ a:hover .pl, .circ a:focus-visible .pl,
.circ a:hover .handle, .circ a:focus-visible .handle { color: var(--pink); }

.side { display: flex; flex-direction: column; gap: clamp(40px, 6vh, 64px); align-self: start; }

.reach .eyebrow, .work .eyebrow {
  display: block; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); margin-bottom: 22px;
}
.reach .row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.reach .mail {
  font-family: var(--display); font-variation-settings: var(--wonk-off); font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; color: var(--pink); overflow-wrap: anywhere;
  background: linear-gradient(var(--pink), var(--pink)) no-repeat 0 100% / 0 2px;
  transition: background-size .25s ease;
}
.reach .mail:hover, .reach .mail:focus-visible { background-size: 100% 2px; }
.reach p, .work p { margin: 14px 0 0; font-size: 15px; max-width: 40ch; color: rgba(255,255,255,.88); }
.work p a { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }
.work p a:hover { color: var(--white); }
.copy-btn {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font-family: var(--text); font-size: 13px; letter-spacing: .02em; color: var(--grey);
  text-decoration: underline; text-underline-offset: 3px; transition: color .15s ease;
}
.copy-btn:hover { color: var(--pink); }

.page > * { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.page.in > * { opacity: 1; transform: none; }
.page.in .side { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) { .page > * { opacity: 1; transform: none; transition: none; } }

/* ---------- colophon ---------- */

footer { margin-top: auto; border-top: 1px solid var(--hairline); position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 1px; background: var(--hairline); }
.colophon {
  display: flex; justify-content: space-between; align-items: baseline; gap: 32px; flex-wrap: wrap;
  padding: clamp(36px, 6vh, 56px) var(--gpad);
}
.wordmark {
  font-family: var(--display); font-variation-settings: var(--wonk-on); font-weight: 600;
  font-size: 24px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; color: var(--pink);
}

/* ---------- mobile ---------- */

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; row-gap: clamp(44px, 7vh, 64px); }
  .colrule { display: none; }
}
