:root {
  --grey: #f4f4f3;
  --white: #ffffff;
  --maroon: #c1093d;
  --ink: #1a1a1a;
  --header-h: 78px;
  --header-h-mobile: 58px;
  --font: 'EB Garamond', Georgia, serif;
  --fluid-heading: clamp(22px, 16px + 0.72vw, 34px);
  --ss-dots-space: 32px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  font-size: 18px;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: var(--white);
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 40px;
  transition: opacity .25s ease;
}

html:not(.skip-intro):not(.intro-done) .site-header {
  opacity: 0;
  pointer-events: none;
}

.logo-link {
  justify-self: start;
  display: block;
  line-height: 0;
}
.logo-img { height: 62px; width: auto; }

.site-title {
  justify-self: center;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  justify-self: end;
  text-align: right;
  line-height: 1.4;
  font-size: 1.05rem;
}
.nav-link { display: block; text-decoration: none; color: inherit; }

main { padding-top: var(--header-h); }

@media (max-width: 700px) {
  .site-header { padding: 8px 20px; }
  .logo-img { height: 38px; }
  .site-title { font-size: 1.05rem; }
  .site-nav { font-size: .8rem; }
  main { padding-top: var(--header-h-mobile); }
}

/* ---------- Generic sections ---------- */
.section { padding: 70px 40px; }
.section.last { padding-bottom: 100px; }
.section.grey { background: var(--grey); }
.section.white { background: var(--white); }

.home-row {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  max-width: 1300px;
  margin: 0 auto;
}
.home-row.reverse { flex-direction: row-reverse; }
.home-row .media { flex: 1 1 55%; min-width: 0; }
.home-row .copy { flex: 1 1 40%; padding-top: 8px; }

@media (min-width: 901px) {
  .home-row.reverse .copy { margin-left: 80px; }
}
.copy p { margin: 0 0 1em; }
.copy h2 { font-size: 1em; font-weight: 700; margin: 0 0 1em; }

.home-row.row-intro { align-items: stretch; gap: 5px; }
.home-row.row-intro .media { flex: 0 1 740px; }
.home-row.row-intro .copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 1 340px;
  max-width: 340px;
  padding-top: 0;
}
.home-row.row-intro .copy .lead {
  font-size: 1em;
  line-height: 1.55;
  margin: 0;
}
.home-row.row-intro .bottom-lines { margin-bottom: var(--ss-dots-space); }
.home-row.row-intro .bottom-lines p { margin: 0 0 .6em; }
.home-row.row-intro .bottom-lines p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .home-row.row-intro { align-items: flex-start; gap: 30px; }
  .home-row.row-intro .media { flex: none; width: 100%; }
  .home-row.row-intro .copy { display: block; max-width: none; flex: none; }
  .home-row.row-intro .bottom-lines { margin-top: 1em; margin-bottom: 0; }
}

@media (max-width: 900px) {
  .section { padding: 40px 20px; }
  .section.last { padding-bottom: 60px; }
  .home-row { flex-direction: column !important; gap: 30px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--grey);
  padding: 60px 40px 40px;
}
.footer-inner {
  max-width: 1325px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}
.footer-credits { font-size: 1rem; opacity: .75; }
.footer-credits p { margin: 2px 0; }
.footer-copy { font-size: 1rem; font-style: italic; opacity: .75; margin: 0; }
.footer-title { font-size: var(--fluid-heading); font-weight: 700; margin: 0 0 10px; }
.footer-address { font-style: normal; font-size: 1.05rem; margin: 0; opacity: .85; }

@media (min-width: 701px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    text-align: left;
  }
  .footer-left {
    order: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .footer-right {
    order: 2;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
  }
}

/* ---------- Slideshow component ---------- */
.slideshow {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 50px var(--ss-dots-space);
  box-sizing: content-box;
}
.slideshow .ss-sizer {
  display: block;
  width: 100%;
  height: auto;
  visibility: hidden;
}
.slideshow .ss-track {
  position: absolute;
  top: 0; left: 50px;
  width: calc(100% - 100px);
  height: calc(100% - 32px);
}
.slideshow .ss-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s ease;
}
.slideshow .ss-slide.active { opacity: 1; }
.slideshow.clickable .ss-slide { cursor: pointer; }

.ss-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.ss-arrow.prev { left: 4px; }
.ss-arrow.next { right: 4px; }
.ss-arrow:hover { background: #fff; }

.ss-dots {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
}
.ss-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .3s ease;
}
.ss-dot.active { background: rgba(0,0,0,.8); }

@media (max-width: 600px) {
  .slideshow { padding-left: 15px; padding-right: 15px; }
  .slideshow .ss-track { left: 15px; width: calc(100% - 30px); }
}

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 150px 40px 100px;
  min-height: calc(100vh - var(--header-h));
}
.about-left { color: var(--maroon); }
.about-left p { margin: 0 0 1.2em; }
.about-left .closed { font-weight: 700; margin-top: 2em; }
.about-right .row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  margin-bottom: 2.2em;
}
.about-right .row p { margin: 0 0 1em; }
.about-right .row p:last-child { margin-bottom: 0; }

@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px 60px; min-height: 0; }
  .about-right .row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Issue 001 page ---------- */
.issue-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 5px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 70px 40px 100px;
  align-items: start;
}
.issue-grid .slideshow { max-width: 1100px; }
.issue-meta h1 { font-size: var(--fluid-heading); margin: 0 0 4px; }
.issue-meta .sub { opacity: .7; margin: 0 0 30px; }
.note-link-line { margin-bottom: 34px; }
.toc h3 {
  font-size: .95rem;
  letter-spacing: .06em;
  margin: 1.8em 0 .7em;
}
.toc h3:first-child { margin-top: 0; }
.toc .entry { margin: 0 0 .5em; }
.toc .entry em { font-style: italic; }

@media (max-width: 900px) {
  .issue-grid { grid-template-columns: 1fr; padding: 40px 20px 60px; gap: 40px; }
}

/* ---------- Editorial Note page ---------- */
.note-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 70px 40px 100px;
  align-items: start;
}
.note-grid img { width: 100%; height: auto; }
.note-body h1 { margin: 0 0 4px; font-size: var(--fluid-heading); }
.note-body .sub { opacity: .7; margin: 0 0 30px; }
.note-body p { margin: 0 0 1.2em; }
.back-line { text-align: right; margin-top: 2em; }

@media (max-width: 900px) {
  .note-grid { grid-template-columns: 1fr; padding: 40px 20px 60px; gap: 30px; }
}

/* ---------- Inline hover-random link component ---------- */
.hover-random { text-decoration: none; cursor: pointer; }

/* ---------- Intro animation ---------- */
.intro-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--white);
  z-index: 9998;
}
.intro-logo {
  position: fixed;
  z-index: 9999;
}
html.skip-intro #introBackdrop,
html.skip-intro #introLogo,
html.skip-intro #introSpacer {
  display: none;
}
