/* Undercurrents — A Journal of Jungian Thought
   Rebuilt static site. Layout, palette and fonts mirror the original Squarespace design. */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..700;1,6..72,200..600&family=Crimson+Pro:ital,wght@0,300..600;1,300..600&display=swap');

:root {
  --paper:   hsl(42, 36%, 95%);   /* header + light sections   */
  --band:    hsl(37, 31%, 90%);   /* greige alternating band   */
  --ink:     hsl(30, 14%, 20%);   /* headings, buttons, text   */
  --ink-2:   hsl(30, 10%, 34%);   /* softer text / nav         */
  --maroon:  hsl(6, 38%, 31%);    /* product backdrop accent   */
  --rule:    hsl(33, 16%, 78%);

  --serif-head: 'Newsreader', Georgia, 'Times New Roman', serif;
  --serif-body: 'Crimson Pro', Georgia, 'Times New Roman', serif;

  --wide: 78rem;
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 1.25rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif-head);
  font-weight: 400;
  line-height: 1.12;
  color: var(--ink);
  margin: 0;
}
p { margin: 0 0 1.4rem; }
em, i { font-style: italic; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid hsla(33,16%,70%,0.35);
}
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.4rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.nav-left { display: flex; gap: 2.4rem; align-items: center; justify-self: start; }
.nav-left a {
  font-family: var(--serif-head);
  text-decoration: none;
  font-size: 1.15rem;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.nav-left a:hover { color: var(--ink); }
.nav-left a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.logo {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  height: 26px;
  width: auto;
  display: block;
}

.header-right { display: flex; gap: 1.4rem; align-items: center; justify-self: end; }
.header-right a { color: var(--ink-2); display: inline-flex; transition: color 0.2s ease; }
.header-right a:hover { color: var(--ink); }
.header-right svg { width: 20px; height: 20px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.3rem; color: var(--ink); }

/* ---------- Layout helpers ---------- */
.section { padding: 5.5rem 2.5rem; }
.container { max-width: var(--wide); margin: 0 auto; }
.band { background: var(--band); }

.eyebrow {
  font-family: var(--serif-head);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-2);
  margin: 0 0 0.8rem;
}

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero img { width: 100%; height: clamp(380px, 64vh, 660px); object-fit: cover; display: block; }
.hero .tagline {
  position: absolute;
  top: 1.4rem;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--serif-head);
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--ink);
  margin: 0;
}

/* ---------- Two-column issue feature ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; }
.feature .content { max-width: 30rem; }
.feature h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: 1.6rem; }
.feature .media img { width: 100%; }

/* ---------- Buttons (pill) ---------- */
.btn {
  display: inline-block;
  font-family: var(--serif-head);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  padding: 1rem 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 2rem; }

.text-link {
  color: var(--ink);
  text-underline-offset: 4px;
  text-decoration-color: var(--ink-2);
}

/* ---------- Product / edition page ---------- */
.product { display: grid; grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: start; }
.gallery-main { background: var(--maroon); border-radius: 4px; overflow: hidden; }
.gallery-main img { width: 100%; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; margin-top: 0.8rem; }
.thumbs button { padding: 0; border: 1px solid var(--rule); background: var(--band); cursor: pointer; border-radius: 3px; overflow: hidden; aspect-ratio: 3/4; }
.thumbs button.active { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); margin-bottom: 1.4rem; }
.product-info ul { margin: 1.4rem 0; padding-left: 1.2rem; }
.product-info li { margin-bottom: 0.8rem; }
.product-info .who { font-style: normal; }
.specs {
  font-size: 1.05rem;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin: 1.8rem 0;
}
.print-cta { text-align: center; margin-top: 4.5rem; }
.print-cta p { font-size: 1.5rem; font-family: var(--serif-head); }

/* Contributors bios */
.bios { display: grid; gap: 2.4rem; max-width: var(--measure); }
.bios h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); margin-bottom: 2.4rem; text-align: center; }
.bio h3 { font-size: 1.7rem; margin-bottom: 0.5rem; }

/* ---------- Generic text pages ---------- */
.page-narrow { max-width: var(--measure); }
.page-title { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 2rem; }
.text-col { max-width: 30rem; }
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start; }
.signoff { font-family: var(--serif-head); font-style: italic; margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--band); padding: 4.5rem 2.5rem; }
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr auto 1fr;
  gap: 3rem;
  align-items: start;
}
.footer-mission h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 1.2rem; max-width: 16ch; }
.footer-mission p { font-size: 1.1rem; max-width: 44ch; margin: 0; }
.footer-social { display: flex; gap: 1.2rem; justify-content: center; padding-top: 0.4rem; }
.footer-social a { color: var(--ink-2); }
.footer-social a:hover { color: var(--ink); }
.footer-social svg { width: 22px; height: 22px; }
.footer-links { display: flex; flex-direction: column; gap: 1rem; text-align: right; padding-top: 0.4rem; }
.footer-links a {
  font-family: var(--serif-head);
  font-size: 1.15rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--ink-2);
  color: var(--ink);
}
.footer-links a:hover { text-decoration-color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  body { font-size: 1.18rem; }
  .section { padding: 3.5rem 1.5rem; }
  .header-inner { padding: 1.1rem 1.5rem; grid-template-columns: auto 1fr auto; }
  .logo { justify-self: start; }
  .logo img { height: 20px; }
  .header-right { display: none; }

  .nav-left {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(80vw, 320px);
    z-index: 70;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
    background: var(--paper);
    border-left: 1px solid var(--rule);
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -20px 0 60px -30px hsla(30,20%,15%,0.5);
  }
  .nav-left.open { transform: translateX(0); }
  .nav-left a { font-size: 1.4rem; }
  .nav-toggle { display: inline-flex; justify-self: end; z-index: 60; }

  .feature, .product, .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .feature .content, .text-col { max-width: none; }
  .about-grid .about-media { order: -1; max-width: 360px; }

  .footer-inner { grid-template-columns: 1fr; gap: 2.4rem; }
  .footer-social { justify-content: flex-start; }
  .footer-links { text-align: left; align-items: flex-start; }
  .footer-mission p { max-width: none; }
}

@media (max-width: 480px) {
  .hero img { height: 46vh; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
}
