/* KaW Family — kawfamily.org
   Plain CSS, no framework. Self-hosted fonts only (no Google Fonts).
*/

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-500i.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --parchment: #f4efe6;
  --paper: #fbf8f1;
  --ink: #2b2419;
  --ink-soft: #5a5246;
  --rule: #c4b081;
  --rule-dark: #8c7344;
  --burgundy: #6f2e32;
  --burgundy-hover: #542328;
  --leather: #3f2a1e;
  --leather-soft: #5a3d2a;
  --gold: #d4c08a;
  --focus: #6f2e32;
  --max: 42rem;
  --max-wide: 58rem;
  --shadow: 0 8px 24px rgba(43, 36, 25, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  background-image: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.5), transparent 58%);
  color: var(--ink);
  font-family: "EB Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.175rem;
  line-height: 1.7;
}

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

a {
  color: var(--burgundy);
  text-underline-offset: 0.15em;
}
a:hover { color: var(--burgundy-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--leather);
  color: var(--parchment);
  padding: 0.4rem 0.8rem;
  z-index: 20;
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }


.site-header {
  padding: 1.75rem 1.25rem 0;
  text-align: center;
}

.wordmark {
  display: inline-block;
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.15;
}
.wordmark:hover { color: var(--burgundy); }

.tagline {
  margin: 0.2rem 0 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem auto 0.25rem;
  max-width: 22rem;
  color: var(--rule-dark);
}
.ornament .rule {
  flex: 1;
  height: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}
.ornament .fleuron {
  flex: none;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--rule-dark);
}
.ornament .cookie-jar-mark {
  flex: none;
  width: 2.15rem;
  height: auto;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  padding: 0.85rem 1.25rem 1.35rem;
  border-bottom: 1px solid var(--rule);
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.88rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--burgundy); }
.site-nav a[aria-current="page"] {
  color: var(--burgundy);
  border-bottom-color: var(--rule-dark);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}
main.wide { max-width: var(--max-wide); }

h1, h2, h3 {
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 2.7rem);
  margin: 0 0 1rem;
  text-align: center;
}
h1 .sub {
  display: block;
  margin-top: 0.45rem;
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  letter-spacing: 0;
}
h2 {
  font-size: 1.7rem;
  margin: 2.25rem 0 0.75rem;
}
h3 { font-size: 1.3rem; margin: 1.5rem 0 0.5rem; }

p { margin: 0 0 1rem; }
.lede {
  font-size: 1.28rem;
  line-height: 1.65;
}

.center { text-align: center; }
.muted { color: var(--ink-soft); }
.fine {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

code {
  font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86em;
  letter-spacing: 0;
  word-spacing: 0;
  font-feature-settings: normal;
  font-variant-ligatures: none;
  background: rgba(43, 36, 25, 0.07);
  padding: 0.05em 0.28em;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--burgundy);
  color: #fbf8f1;
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--burgundy);
  border-radius: 2px;
  letter-spacing: 0.06em;
  font-family: inherit;
  font-size: 1.05rem;
  cursor: pointer;
}
.btn:hover {
  background: var(--burgundy-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--burgundy);
}
.btn-ghost:hover {
  background: rgba(111, 46, 50, 0.08);
  color: var(--burgundy-hover);
}

/* Feature card (home) */
.feature {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 1.15rem;
  margin: 2rem 0 1.5rem;
}
.feature .cover-link {
  display: block;
  text-decoration: none;
}
.feature img {
  width: 100%;
  box-shadow: 0 4px 14px rgba(43, 36, 25, 0.2);
}
.feature h2 { margin: 0 0 0.5rem; text-align: left; }
.feature p { margin-bottom: 0.85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Thumbnails */
.thumbs {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}
.thumbs figure { margin: 0; }
.thumbs a {
  display: block;
  text-decoration: none;
  color: var(--ink-soft);
}
.thumbs img {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.3rem;
  box-shadow: 0 2px 8px rgba(43, 36, 25, 0.08);
}
.thumbs figcaption {
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.35rem;
  font-style: italic;
}

.downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.downloads li {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.6rem 1rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.7rem 0.9rem;
}
.downloads .part-title { font-weight: 600; }
.downloads .part-meta { color: var(--ink-soft); font-size: 0.95rem; }
.part-actions { display: flex; gap: 0.9rem; white-space: nowrap; }
.downloads a { white-space: nowrap; }

/* Form */
form.contact {
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.4rem;
  margin: 1rem 0 1.5rem;
  display: grid;
  gap: 0.9rem;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-weight: 600; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.95rem; }
.field input,
.field textarea,
.field select {
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b7aa8c;
  border-radius: 2px;
  padding: 0.5rem 0.65rem;
  width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-note {
  background: rgba(111, 46, 50, 0.08);
  border-left: 3px solid var(--burgundy);
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 1.02rem;
}
.form-status[hidden] { display: none !important; }
.form-status {
  margin: 0.5rem 0 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule-dark);
  background: #fff;
}

/* Footer */
.site-footer {
  background: var(--leather);
  color: #e8dcc6;
  text-align: center;
  padding: 2rem 1.25rem 2.25rem;
  margin-top: 1rem;
  font-size: 0.98rem;
}
.site-footer a { color: var(--gold); }
.site-footer .wordmark-foot {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  font-size: 1.15rem;
  display: inline-block;
  margin-bottom: 0.4rem;
}
.site-footer p { margin: 0.25rem 0; }
.site-footer .names { color: #c9b79a; }


@media (max-width: 700px) {
  .feature {
    grid-template-columns: 1fr;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .feature h2 { text-align: center; }
  .actions { justify-content: center; }
  .actions .btn { min-width: 11rem; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
  .downloads li {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .downloads .part-title { grid-column: 1; grid-row: 1; }
  .downloads .part-actions { grid-column: 2; grid-row: 1; }
  .downloads .part-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  body { font-size: 1.1rem; }
  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    column-gap: 1.1rem;
    row-gap: 0.2rem;
  }
  .site-nav a { letter-spacing: 0.06em; font-size: 0.8rem; }
}

@media (max-width: 400px) {
  .wordmark { letter-spacing: 0.18em; }
  .site-nav { gap: 0.3rem 1rem; }
}


/* Cookie jar / dedication */
.jar-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.jar-frame img.cookie-jar {
  width: 100%;
  max-width: 14rem;
  height: auto;
  background: #efe8dc;
  border: 1px solid var(--rule);
  padding: 0;
  box-shadow: 0 4px 14px rgba(43, 36, 25, 0.12);
}
.jar-frame figcaption,
.jar-caption {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  max-width: 16rem;
}
.feature.feature-dedication {
  grid-template-columns: 8.5rem 1fr;
}
.feature.feature-dedication img {
  box-shadow: none;
  background: #efe8dc;
  border: 1px solid var(--rule);
  padding: 0;
}
.dedication-hero {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: 1.75rem;
  align-items: start;
  margin: 1.5rem 0 1.75rem;
}
@media (max-width: 700px) {
  .dedication-hero,
  .feature.feature-dedication {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .dedication-hero .jar-frame { margin-bottom: 0.25rem; }
}

/* Transcript */
.page-jump {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.6rem 0.9rem 0.75rem;
  margin: 1.25rem 0 2rem;
}
.page-jump summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--burgundy);
}
.page-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin-top: 0.7rem;
  font-size: 0.92rem;
}
.page-index a {
  text-decoration: none;
  padding: 0.1rem 0.25rem;
  min-width: 1.6rem;
  text-align: center;
}
.page-index a:hover { background: rgba(111, 46, 50, 0.08); }
.book-page {
  margin: 0 0 2rem;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.book-page:last-child { border-bottom: 0; }
.book-page h2 {
  font-size: 1.35rem;
  margin: 0 0 0.7rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}
.book-page h2 a.page-title { color: var(--ink); text-decoration: none; }
.book-page h2 a.page-title:hover { color: var(--burgundy); }
.book-page h2 .view-pdf {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--burgundy);
}
.transcript table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
  margin: 0.6rem 0 1rem;
}
.transcript th, .transcript td {
  border: 1px solid var(--rule);
  padding: 0.3rem 0.45rem;
  vertical-align: top;
  text-align: left;
}
.transcript th { background: rgba(196, 176, 129, 0.18); }
.transcript ul, .transcript ol { margin: 0.4rem 0 0.9rem; padding-left: 1.3rem; }
.transcript .private {
  font-style: italic;
  color: var(--ink-soft);
}
.transcript del { text-decoration: line-through; opacity: 0.8; }
.transcript .ins { font-style: italic; }
.transcript blockquote { margin: 0.5rem 0; }

/* Gallery */
.gallery {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1.1rem;
}
.gallery figure { margin: 0; }
.gallery a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.gallery img {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.3rem;
  box-shadow: 0 2px 8px rgba(43, 36, 25, 0.08);
}
.gallery figcaption {
  font-size: 0.9rem;
  margin-top: 0.4rem;
  color: var(--ink-soft);
}
.gallery .meta { font-size: 0.85rem; font-style: italic; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(43, 36, 25, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox-inner {
  max-width: min(90vw, 56rem);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  background: var(--paper);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.lightbox-caption {
  color: #f4efe6;
  text-align: center;
  font-size: 1.05rem;
  max-width: 40rem;
}
.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  background: none;
  border: 0;
  color: #f4efe6;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.lightbox-nav {
  display: flex;
  gap: 1rem;
}
.lightbox-nav button {
  background: transparent;
  color: #f4efe6;
  border: 1px solid #d4c08a;
  padding: 0.3rem 0.8rem;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}


/* Dedication portrait */
.portrait-hero {
  margin: 0.5rem 0 2rem;
  text-align: center;
}
.portrait-wrap {
  position: relative;
  display: inline-block;
  max-width: 22rem;
  width: 100%;
}
.portrait-hero .portrait-front {
  width: 100%;
  height: auto;
  display: block;
  background: #1a1713;
  border: 1px solid var(--rule);
  box-shadow: 0 6px 20px rgba(43, 36, 25, 0.16);
}
.portrait-hero .portrait-back-link {
  position: absolute;
  width: 32%;
  right: -8%;
  bottom: 7%;
  display: block;
  background: #f7f3ea;
  border: 2px solid #f4efe6;
  box-shadow: 0 3px 12px rgba(43, 36, 25, 0.28);
  transform: rotate(4deg);
}
.portrait-hero .portrait-back {
  width: 100%;
  height: auto;
  display: block;
}
.portrait-hero figcaption {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 1rem auto 0;
  max-width: 26rem;
}
@media (max-width: 700px) {
  .portrait-wrap { max-width: 18.5rem; }
  .portrait-hero .portrait-back-link { right: -4%; width: 30%; }
}

/* Addendum clippings */
.clip {
  margin: 2.75rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.clip h2 { margin-top: 0; }
.clip-figure {
  margin: 0.9rem 0 1rem;
}
.clip-figure a { display: block; }
.clip-figure img {
  width: 100%;
  height: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.35rem;
  box-shadow: 0 2px 10px rgba(43, 36, 25, 0.08);
}
.clip-figure figcaption,
.clip-caption {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0.55rem 0 0;
}
.clip-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.9rem 0 1rem;
}
@media (max-width: 700px) {
  .clip-pair { grid-template-columns: 1fr; }
}
.clip-transcript {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1rem 1.15rem 1.15rem;
  margin: 1rem 0 0;
}
.clip-transcript h3 {
  font-size: 1.15rem;
  margin: 1.1rem 0 0.4rem;
}
.clip-transcript h3:first-child { margin-top: 0; }
.clip-transcript p { margin: 0.45rem 0; }
.clip-transcript del {
  text-decoration: line-through;
  opacity: 0.85;
}
.clip-note, .clip-transcript .note {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--ink-soft);
}
.feature.feature-addendum {
  grid-template-columns: 8.5rem 1fr;
}
@media (max-width: 700px) {
  .feature.feature-addendum { grid-template-columns: 1fr; }
  .feature.feature-addendum .cover-link img { max-width: 14rem; margin: 0 auto; }
}
.feature.feature-addendum img {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0;
}

/* Family photographs */
.family-album {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  margin: 2rem 0 0.5rem;
}
.family-album figure {
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.family-album a.lightbox-link { display: inline-block; max-width: 100%; }
.family-album img {
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  height: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.35rem;
  box-shadow: 0 2px 8px rgba(43, 36, 25, 0.08);
}
.family-album figcaption {
  text-align: left;
  max-width: 42rem;
  margin: 0.7rem auto 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}
.family-album .photo-wide img { width: 100%; max-width: 48rem; }
.family-album .photo-sm img { max-width: min(100%, 14.5rem); }
.family-album .photo-md img { max-width: min(100%, 20rem); }
.family-album .photo-note img { max-width: min(100%, 28rem); }
.family-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 1.75rem 2rem;
  align-items: start;
  justify-items: center;
}
.family-row figure { margin: 0; }
.invite {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0.85rem auto 0;
  max-width: 36rem;
}
.feature.feature-family {
  grid-template-columns: 8.5rem 1fr;
}
.feature.feature-family img {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0;
}
@media (max-width: 700px) {
  .feature.feature-family {
    grid-template-columns: 1fr;
  }
  .family-album { gap: 2.15rem; }
  .family-album .photo-note img { max-width: min(100%, 22rem); }
}
@media (min-width: 701px) {
  .site-nav {
    gap: 0.35rem 1.05rem;
  }
  .site-nav a {
    letter-spacing: 0.07em;
    font-size: 0.84rem;
  }
}

#meadowlark .clip-figure img { max-width: 26rem; margin: 0 auto; display: block; }
#meadowlark .clip-figure figcaption { text-align: center; }
