:root {
  --paper: #fffaf2;
  --paper-deep: #f5eadc;
  --ink: #2f2926;
  --muted: #766b64;
  --wine: #7a3243;
  --wine-dark: #54202d;
  --rose: #c98f9b;
  --gold: #b68a52;
  --line: rgba(84, 32, 45, .18);
  --shadow: 0 22px 60px rgba(56, 38, 30, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(201,143,155,.16), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(182,138,82,.12), transparent 30rem),
    var(--paper-deep);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.72;
}

a { color: var(--wine); }
a:hover { color: var(--wine-dark); }

.site-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(255, 250, 242, .92);
  border-bottom: 1px solid var(--line);
}
.site-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-name {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  color: var(--wine-dark);
}
.site-actions {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 5.2rem 1.25rem 3.1rem;
  text-align: center;
}
.eyebrow {
  margin: 0 0 .8rem;
  font-family: Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .77rem;
  font-weight: 700;
  color: var(--wine);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.035em;
  color: var(--wine-dark);
}
.hero .subtitle {
  max-width: 760px;
  margin: 1.35rem auto 0;
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  color: var(--muted);
}
.hero-quote {
  max-width: 760px;
  margin: 2rem auto 0;
  padding: 1.4rem 1.8rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-style: italic;
  font-size: 1.18rem;
}
.hero-quote cite {
  display: block;
  margin-top: .55rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .78rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255, 250, 242, .86);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.55rem;
  box-shadow: 0 12px 38px rgba(56, 38, 30, .07);
}
.card.featured {
  grid-column: span 2;
  background: linear-gradient(145deg, rgba(122,50,67,.97), rgba(84,32,45,.98));
  color: white;
  border: 0;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; line-height: 1.15; }
.card h2 { font-size: 2rem; }
.card h3 { font-size: 1.35rem; color: var(--wine-dark); }
.card.featured h2 { color: white; }
.card.featured p { color: rgba(255,255,255,.87); }
.card p:last-child { margin-bottom: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: .65rem;
  padding: .8rem 1.05rem;
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.36);
  color: white;
  background: rgba(255,255,255,.1);
}
.button:hover { background: rgba(255,255,255,.18); color: white; }
.button.light {
  color: var(--wine-dark);
  background: white;
  border-color: white;
}
.button.light:hover { color: var(--wine); background: #fff8f0; }
.button.secondary {
  color: var(--wine-dark);
  background: transparent;
  border: 1px solid var(--line);
}
.button.secondary:hover { background: rgba(122,50,67,.06); color: var(--wine-dark); }

.story-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 6rem;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.story-nav {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 100px);
  overflow: auto;
  padding: 1.2rem;
  border-radius: 18px;
  background: rgba(255,250,242,.82);
  border: 1px solid var(--line);
}
.story-nav h2 {
  margin: 0 0 .8rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .78rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.story-nav a {
  display: block;
  padding: .38rem .25rem;
  text-decoration: none;
  line-height: 1.25;
  font-size: .93rem;
}
.story-nav .small-link {
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .8rem;
}

.story-paper {
  background: #fffdf8;
  border: 1px solid rgba(84,32,45,.13);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 4.5rem);
  overflow: hidden;
}
.story-title {
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2.1rem;
  margin-bottom: 3rem;
}
.story-title .lockline {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--muted);
}
.story-title h1 {
  margin: .55rem 0 .4rem;
  color: var(--wine-dark);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
}
.story-title p {
  margin: .8rem auto 0;
  max-width: 680px;
  color: var(--muted);
  font-style: italic;
}

.chapter {
  scroll-margin-top: 100px;
  margin: 0 0 3.9rem;
}
.chapter-kicker {
  margin: 0 0 .3rem;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
}
.chapter h2 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.06;
  color: var(--wine-dark);
}
.chapter p {
  margin: 0 0 1.18rem;
  font-size: 1.08rem;
}
.chapter p:first-of-type::first-letter {
  float: left;
  margin: .08rem .11rem 0 0;
  font-size: 3.65rem;
  line-height: .82;
  color: var(--wine);
}

.memory-note {
  margin: 2rem 0;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--rose);
  background: rgba(201,143,155,.09);
  color: var(--muted);
  font-size: .96rem;
}

.poem {
  margin: 2rem auto;
  max-width: 720px;
  padding: 2.25rem clamp(1rem, 4vw, 3rem);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(245,234,220,.55), rgba(255,253,248,.85));
}
.poem h3 {
  margin: 0 0 1.4rem;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--wine-dark);
}
.poem p {
  margin: 0;
  white-space: pre-line;
  font-size: 1rem;
  line-height: 1.65;
}
.poem .byline {
  margin-top: 1.1rem;
  font-style: italic;
  color: var(--muted);
}

.private-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.login-card {
  width: min(560px, 100%);
  border-radius: 24px;
  padding: clamp(1.6rem, 5vw, 3rem);
  background: #fffdf8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card .lock {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(122,50,67,.09);
  font-size: 1.8rem;
}
.login-card h1 {
  margin: 0;
  color: var(--wine-dark);
  font-size: 2.25rem;
}
.login-card p { color: var(--muted); }
.login-form {
  display: grid;
  gap: .8rem;
  margin-top: 1.25rem;
}
.login-form label {
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .86rem;
  font-weight: 700;
  color: var(--wine-dark);
}
.login-form input {
  width: 100%;
  padding: .95rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(84,32,45,.25);
  background: white;
  color: var(--ink);
  font: inherit;
}
.login-form button {
  border: 0;
  cursor: pointer;
  padding: .95rem 1rem;
  border-radius: 12px;
  background: var(--wine);
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.login-form button:hover { background: var(--wine-dark); }
.error {
  margin: .9rem 0 0;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: #fff0f1;
  border: 1px solid #e5b5bc;
  color: #7c2636;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .9rem;
}

.footer {
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .82rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
  .card.featured { grid-column: auto; }
  .story-shell { grid-template-columns: 1fr; }
  .story-nav { position: static; max-height: none; }
}

@media (max-width: 540px) {
  .site-bar-inner { align-items: flex-start; }
  .story-paper { border-radius: 16px; }
  .hero { padding-top: 3.6rem; }
}

/* Context links added to Simone's memoir */
.story-link {
  color: var(--wine-dark);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  text-decoration-color: rgba(122, 50, 67, .48);
  font-weight: 600;
}
.story-link:hover,
.story-link:focus-visible {
  color: var(--wine);
  text-decoration-style: solid;
  text-decoration-color: currentColor;
}
.photo-link {
  display: inline-block;
  margin-left: .08rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .8em;
  line-height: 1;
  text-decoration: none;
  vertical-align: .08em;
  opacity: .72;
}
.photo-link:hover,
.photo-link:focus-visible { opacity: 1; transform: translateY(-1px); }
.context-note {
  margin: -.15rem 0 1.35rem !important;
  padding: .8rem 1rem;
  border-left: 3px solid var(--gold);
  background: rgba(182, 138, 82, .08);
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .88rem !important;
  line-height: 1.55;
}
.context-note::first-letter { float: none !important; margin: 0 !important; font-size: inherit !important; line-height: inherit !important; color: inherit !important; }
.context-note a { font-weight: 700; }
.link-legend {
  margin-top: 1rem !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .82rem !important;
  font-style: normal !important;
  letter-spacing: .01em;
  color: var(--muted);
}
