/* ==========================================================================
   A Few Minutes With — shared stylesheet
   Used by index.html and every page in /interviews/.
   ========================================================================== */

/* --- Colour -------------------------------------------------------------

   The page sits on a warm plaster texture, so everything is tuned against
   that rather than against white. No dark mode: a fixed light photograph
   can't be inverted, and a dark scrim over it would lose the texture. */

:root {
  --paper:      #f2cf9c;  /* flat stand-in for the texture, and the fallback */
  --ink:        #17150f;  /* near-black body text */
  --ink-quiet:  #4a4438;  /* standfirsts, footer. darkened for the warm ground */
  --ink-q:      #241f16;  /* the questioner's voice */
  --accent:     #7d3123;  /* links only. nothing else is coloured. */
  --hairline:   rgba(23, 21, 15, 0.20);
}

/* --- Reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

body, h1, h2, h3, p, ul, ol, li, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

/* --- Page --------------------------------------------------------------- */

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

/* Fixed layer rather than background-attachment: fixed, which iOS ignores.
   The white wash evens out the darker patches so text stays readable
   wherever it happens to fall over the image. */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.32)),
    url("images/background.jpg") center / cover no-repeat;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Charter, "Iowan Old Style", Georgia,
               "Times New Roman", serif;
  font-size: 1.125rem;      /* 18px */
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.page {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

@media (min-width: 40em) {
  body { font-size: 1.1875rem; }             /* 19px */
  .page { padding: 7.5rem 2rem 9rem; }
}

/* --- Links -------------------------------------------------------------- */

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: text-decoration-color 180ms ease;
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* --- Masthead ----------------------------------------------------------- */

.masthead {
  margin-bottom: 3.25rem;
}

.wordmark {
  font-size: 2.125rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}

@media (min-width: 40em) {
  .wordmark { font-size: 2.625rem; }
}

.wordmark a {
  color: inherit;
  text-decoration: none;
}

.tagline {
  margin-top: 0.75rem;
  color: var(--ink-quiet);
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* Small wordmark at the top of an interview page */
.wordmark--small {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 3.5rem;
}

.wordmark--small a {
  color: var(--ink-quiet);
  text-decoration: none;
}

.wordmark--small a:hover { color: var(--ink); }

/* --- Prose -------------------------------------------------------------- */

.prose p + p { margin-top: 1.35rem; }

.intro {
  margin-bottom: 4rem;
}

.intro p + p { margin-top: 1.35rem; }

/* --- Section headings --------------------------------------------------- */

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 1.5rem;
}

/* Miguel's own profile link, under the intro. Full-strength ink, unlike the
   quieter mark beside an interviewee's name. */

.intro-social {
  margin-top: 2rem;
}

.social-link {
  display: inline-block;
  color: var(--ink);
  line-height: 0;
  text-decoration: none;
  transition: color 180ms ease;
}

.social-link svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--accent);
}

.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* --- The archive -------------------------------------------------------- */

.archive {
  border-top: 1px solid var(--hairline);
  margin-bottom: 4.5rem;
}

.archive li {
  border-bottom: 1px solid var(--hairline);
}

.archive a {
  display: block;
  padding: 1.6rem 0;
  color: inherit;
  text-decoration: none;
}

.archive-name {
  display: inline;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  /* underline draws in on hover */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 260ms ease;
}

@media (min-width: 40em) {
  .archive-name { font-size: 1.625rem; }
}

.archive a:hover .archive-name,
.archive a:focus-visible .archive-name {
  background-size: 100% 1px;
}

.archive-note {
  display: block;
  margin-top: 0.3rem;
  color: var(--ink-quiet);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* --- Closing note + footer ---------------------------------------------- */

.closing {
  /* The archive's own 4.5rem bottom margin collapses with this one, so the
     gap is whichever is larger — not the sum. */
  margin-top: 7rem;
  margin-bottom: 4.5rem;
}

.site-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-quiet);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.site-footer p + p { margin-top: 0.35rem; }

/* --- Article ------------------------------------------------------------ */

.article-header {
  margin-bottom: 3.25rem;
}

.article-title {
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (min-width: 40em) {
  .article-title { font-size: 2.875rem; }
}

/* Profile link beside the title. Sized in em so it tracks the title at every
   breakpoint, and kept in the muted ink so the accent stays reserved for links. */

.profile-link {
  display: inline-block;
  margin-left: 0.34em;
  vertical-align: 0.12em;
  color: var(--ink-quiet);
  line-height: 0;
  text-decoration: none;
  transition: color 180ms ease;
}

.profile-link svg {
  display: block;
  width: 0.4em;
  height: 0.4em;
  fill: currentColor;
}

.profile-link:hover,
.profile-link:focus-visible {
  color: var(--accent);
}

.profile-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.standfirst {
  margin-top: 1rem;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-quiet);
}

.article-date {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--ink-quiet);
}

/* Portrait. Shown at its own aspect ratio and never cropped, so a tall
   photo and a wide one can sit in the same series without face-chopping.
   The height cap stops a portrait from swallowing the screen. */

.portrait {
  margin: 0 0 3.25rem;
}

.portrait img {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 32rem;
}

/* Interview body */

.interview > * + * { margin-top: 1.35rem; }

/* A question / answer pair. The question is distinguished by weight and a
   fractionally darker-than-body colour — no indent, no block, no bubble. */

.qa { margin-top: 2.5rem; }

.qa .q {
  font-weight: 600;
  color: var(--ink-q);
}

.qa .a {
  margin-top: 0.6rem;
}

.qa .a + .a { margin-top: 1.35rem; }

/* Pulled line */

.interview blockquote {
  margin: 2.75rem 0;
  font-size: 1.375rem;
  line-height: 1.45;
  font-style: italic;
  letter-spacing: -0.005em;
  color: var(--ink);
}

@media (min-width: 40em) {
  .interview blockquote { font-size: 1.5rem; }
}

.interview blockquote p + p { margin-top: 0.9rem; }

/* Section break */

.break {
  border: 0;
  height: auto;
  margin: 3rem 0;
  text-align: center;
  color: var(--ink-quiet);
  letter-spacing: 0.6em;
  font-size: 0.9375rem;
  line-height: 1;
}

.break::before { content: "\00b7\00b7\00b7"; }

/* Article foot */

.article-foot {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
}

.article-foot p + p { margin-top: 1.1rem; }

/* --- Utilities ---------------------------------------------------------- */

.placeholder {
  /* Visible marker for copy that has not been pasted in yet.
     Delete this class from the markup once the real text is in. */
  color: var(--ink-quiet);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
