/* ------------------------------------------------------------------
   helindsay.com — shared stylesheet
   A literary, paper-and-ink design for the site of Helen E. Lindsay,
   translator of "Written on the Knee".
   ------------------------------------------------------------------ */

:root {
  --paper: #f6efe2;
  --paper-deep: #eee3cd;
  --card: #fbf7ee;
  --ink: #2b241c;
  --ink-soft: #6a5f4e;
  --aegean: #1f5462;
  --aegean-deep: #143c47;
  --terracotta: #a34a26;
  --gold: #b98a3c;
  --line: #d9cbae;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.18 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

a { color: var(--aegean); text-decoration-color: color-mix(in srgb, var(--aegean) 40%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--terracotta); text-decoration-color: currentColor; }

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

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

/* --- Greek meander (key) divider ------------------------------------ */
.meander {
  border: 0;
  height: 14px;
  margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 13h2V4h9v5H7V7H5v4h8V2H0M28 1h-2v9h-9V5h4v2h2V3h-8v9h13' fill='%23b98a3c'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.85;
}

/* --- Header ---------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 60%, var(--card));
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.4rem;
  padding-bottom: 1.1rem;
}
.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--aegean); }
.brand .amp { color: var(--terracotta); font-style: italic; }
.tagline {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.1rem;
}
.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--terracotta); }
.site-nav a[aria-current="page"] {
  color: var(--aegean-deep);
  border-bottom-color: var(--gold);
}

/* --- Hero (home) ----------------------------------------------------- */
.hero { overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}
.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1.2rem;
}
.hero h1, .hero .hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.hero h1 em, .hero .hero-title em { font-style: italic; color: var(--aegean-deep); }
.hero.alt { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero.flip .wrap { grid-template-columns: 1fr 1.4fr; }
.hero-sub {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.hero p.lede { max-width: 34rem; margin-bottom: 2rem; }
.hero-cover { justify-self: center; position: relative; }
.hero-cover img {
  width: min(19rem, 70vw);
  border: 1px solid var(--line);
  box-shadow:
    0 1px 2px rgba(43, 36, 28, 0.25),
    0 12px 28px -8px rgba(43, 36, 28, 0.45),
    -14px 14px 0 -4px var(--paper-deep),
    -14px 14px 0 -3px var(--line);
  transform: rotate(1.5deg);
  transition: transform 0.4s ease;
}
.hero-cover:hover img { transform: rotate(0deg) scale(1.01); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn {
  display: inline-block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--aegean-deep);
  color: var(--paper);
  background: var(--aegean);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--aegean-deep); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--aegean-deep); }
.btn.ghost:hover { background: var(--aegean); color: var(--paper); }

/* --- Sections --------------------------------------------------------- */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.8rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 3px;
  margin-top: 0.6rem;
  background: var(--gold);
}

.prose { max-width: 44rem; }
.prose p + p { margin-top: 1rem; }
.prose .initial::first-letter {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.4em;
  line-height: 0.8;
  float: left;
  padding: 0.08em 0.12em 0 0;
  color: var(--terracotta);
}

blockquote.pull {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--aegean-deep);
  border-left: 3px solid var(--gold);
  padding-left: 1.4rem;
  margin: 2rem 0;
  max-width: 38rem;
}
blockquote.pull cite {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.7rem;
}

/* --- News / archive --------------------------------------------------- */
.entry {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  scroll-margin-top: 2rem;
}
.entry-date {
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.entry h3 { font-size: 1.6rem; margin: 0.3rem 0 0.8rem; }
.entry p { max-width: 44rem; }
.entry .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.9rem;
  margin-top: 1.2rem;
}
.entry .gallery.solo { grid-template-columns: minmax(0, 30rem); }
.entry .gallery img {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
}
.entry .gallery a { display: block; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 44rem;
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  background: var(--aegean-deep);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Home news preview cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.4rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -12px rgba(43, 36, 28, 0.45);
}
.card .entry-date { display: block; margin-bottom: 0.4rem; }
.card h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.95rem; color: var(--ink-soft); }

/* --- About ------------------------------------------------------------ */
.bio-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: start;
}
.portrait {
  border: 1px solid var(--line);
  padding: 0.5rem;
  background: var(--card);
  box-shadow: 0 8px 20px -10px rgba(43, 36, 28, 0.4);
  transform: rotate(-1.5deg);
}
.portrait img { width: 11rem; image-rendering: auto; }

/* --- Book page -------------------------------------------------------- */
.book-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) 1fr;
  gap: 3rem;
  align-items: start;
}
.book-grid .hero-cover { position: sticky; top: 2rem; }

/* --- Footer ----------------------------------------------------------- */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}
.site-footer .wrap {
  padding-top: 2.2rem;
  padding-bottom: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.site-footer a { color: var(--aegean-deep); }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 46rem) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 3rem; padding-bottom: 3rem; }
  .hero-cover { order: -1; }
  .book-grid { grid-template-columns: 1fr; }
  .book-grid .hero-cover { position: static; justify-self: start; }
  .bio-grid { grid-template-columns: 1fr; }
  .entry { padding: 1.4rem 1.2rem; }
  .site-nav { gap: 1.1rem; }
}
