/* The Calm Current: design system
   Warm paper, deep sea green, clay accent.
   Newsreader for display, Karla for body and UI. */

:root {
  --paper: #faf8f2;
  --paper-deep: #f2eee3;
  --white: #fffdf9;
  --ink: #22312f;
  --ink-soft: #50605c;
  --mist: #e8efec;
  --sea: #2f6f6a;
  --sea-deep: #1f4b47;
  --clay: #c97e52;
  --clay-soft: #f4e3d3;
  --line: #ddd3bd;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Slim sticky top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 242, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.brand em { font-style: italic; color: var(--sea); }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}
.nav-links a:hover { color: var(--sea-deep); background: var(--mist); text-decoration: none; }
.nav-links a.active { color: var(--sea-deep); background: var(--mist); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 4.5rem 0 0; }

.overline {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 auto 1.25rem;
}
.hero h1 em { font-style: italic; color: var(--clay); }

.hero .lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 46rem;
  margin: 0 auto 2rem;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-bottom: 3rem;
}
.hero-meta b { color: var(--sea-deep); font-weight: 700; }

/* Wave divider */
.wave { line-height: 0; margin-top: 0.5rem; }
.wave svg { width: 100%; height: 72px; display: block; }
.wave path { fill: var(--mist); }
.wave.on-paper path { fill: var(--paper); }
.wave.on-deep path { fill: var(--sea-deep); }

/* ---------- Chapters index ---------- */
.section { padding: 4rem 0; }

.section-head { margin-bottom: 1rem; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  letter-spacing: -0.01em;
}
.section-head p { color: var(--ink-soft); max-width: 40rem; margin-top: 0.5rem; }

.chapter {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
}
.chapters-list .chapter:last-child { border-bottom: 1px solid var(--line); }

.chapter-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 6vw, 4.75rem);
  line-height: 0.9;
  color: var(--sea);
  opacity: 0.32;
}

.chapter.flip { grid-template-columns: 1fr 6.5rem; }
.chapter.flip .chapter-num { order: 2; text-align: right; }

.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sea-deep);
  background: var(--mist);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 0.9rem;
}
.chapter h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.chapter h3 a { color: var(--ink); }
.chapter h3 a:hover { color: var(--sea-deep); text-decoration: none; }
.chapter p.excerpt { color: var(--ink-soft); max-width: 44rem; margin-bottom: 1rem; }

.meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.meta-row .byline { font-weight: 700; color: var(--ink); }

.read-link {
  font-weight: 700;
  color: var(--clay);
  white-space: nowrap;
}
.read-link:hover { color: var(--sea-deep); }

/* ---------- Quote band ---------- */
.quote-band { background: var(--mist); padding: 0 0 4.5rem; text-align: center; }
.quote-band blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 auto 1.25rem;
  color: var(--sea-deep);
}
.quote-band cite { font-style: normal; font-size: 0.9rem; color: var(--ink-soft); letter-spacing: 0.08em; }

/* ---------- Moods grid ---------- */
.moods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.mood-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mood-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 14px 30px rgba(34, 49, 47, 0.08); }
.mood-card .mood-emoji { font-size: 1.9rem; display: block; margin-bottom: 0.75rem; }
.mood-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); margin-bottom: 0.4rem; }
.mood-card p { font-size: 0.92rem; color: var(--ink-soft); }
.mood-card .mood-go { display: inline-block; margin-top: 0.75rem; font-weight: 700; font-size: 0.9rem; color: var(--clay); }

/* ---------- Letter band ---------- */
.letter-band { background: var(--sea-deep); color: #eef4f2; padding: 0 0 4.5rem; }
.letter-inner { text-align: center; max-width: 44rem; margin: 0 auto; }
.letter-inner h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin-bottom: 0.75rem;
}
.letter-inner h2 em { font-style: italic; color: var(--clay-soft); }
.letter-inner p { color: #c9d8d4; margin-bottom: 1.75rem; }

.letter-form { display: flex; gap: 0.75rem; max-width: 30rem; margin: 0 auto; }
.letter-form input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font-size: 1rem;
  font-family: var(--sans);
}
.letter-form input::placeholder { color: #a9beb9; }
.letter-form button {
  border: none;
  cursor: pointer;
  background: var(--clay);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--sans);
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  white-space: nowrap;
}
.letter-form button:hover { background: #b56f44; }
.form-note { font-size: 0.82rem; color: #a9beb9; margin-top: 0.9rem; }
.form-success {
  display: none;
  margin-top: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c6d2cd; padding: 4rem 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer-brand .brand { color: #f4f1e8; }
.footer-brand p { font-size: 0.95rem; margin-top: 1rem; max-width: 26rem; }
.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8fa19b;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: #c6d2cd; font-size: 0.95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #8fa19b;
}

/* ---------- Article pages ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 100%; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sea), var(--clay)); }

.article { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.5rem 4rem; }

.article-head { text-align: center; margin-bottom: 2.5rem; }
.article-head .chapter-tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--sea);
  font-size: 1.05rem;
  margin-bottom: 1rem;
  display: block;
}
.article-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}
.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.article-meta .byline { font-weight: 700; color: var(--ink); }

.article-lede {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--sea-deep);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-body p { margin-bottom: 1.5rem; color: #33423f; }

.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 3.6em;
  float: left;
  line-height: 0.85;
  padding-right: 0.12em;
  padding-top: 0.08em;
  color: var(--sea);
}

.article-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1.3;
  margin: 2.75rem 0 1rem;
  color: var(--ink);
}
.article-body h2 .h2-num {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.5rem;
}

.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.4rem; color: #33423f; }
.article-body li { margin-bottom: 0.65rem; }
.article-body li::marker { color: var(--sea); font-weight: 700; }

.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.5;
  color: var(--sea-deep);
  border-left: 4px solid var(--clay);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2.5rem 0;
}

.slow-notes {
  background: var(--mist);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.75rem 0;
}
.slow-notes h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--sea-deep);
  margin-bottom: 1rem;
}
.slow-notes ul { list-style: none; margin: 0; }
.slow-notes li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.8rem;
  color: #33423f;
}
.slow-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 1.1rem;
  height: 2px;
  background: var(--clay);
}

.tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 2.5rem 0; }
.tags span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  background: var(--white);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.post-nav a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--white);
  display: block;
}
.post-nav a:hover { text-decoration: none; border-color: var(--sea); }
.post-nav .pn-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.5rem;
}
.post-nav .pn-title { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--ink); line-height: 1.35; }
.post-nav .pn-next { text-align: right; }

/* ---------- Narrow content pages ---------- */
.page-narrow { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.5rem 4.5rem; }
.page-narrow h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin-bottom: 1.5rem;
}
.page-narrow h2 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 2.25rem 0 0.75rem; }
.page-narrow p { margin-bottom: 1.25rem; color: #33423f; }
.page-narrow ul { margin: 0 0 1.25rem 1.4rem; color: #33423f; }
.page-narrow li { margin-bottom: 0.5rem; }

.about-card {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.75rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.avatar {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sea), var(--sea-deep));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
}
.about-card h2 { margin: 0 0 0.25rem; }
.about-card .role { color: var(--sea); font-weight: 700; font-size: 0.92rem; margin-bottom: 0.5rem; }
.about-card p { margin-bottom: 0; font-size: 0.95rem; }

/* Contact form */
.contact-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.25rem; margin-top: 1.5rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.45rem; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}
.field textarea { min-height: 9rem; resize: vertical; }
.btn-submit {
  background: var(--sea);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.2rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
}
.btn-submit:hover { background: var(--sea-deep); }

/* 404 */
.notfound { text-align: center; padding: 5rem 1.5rem; }
.notfound .big {
  font-family: var(--serif);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 500;
  color: var(--sea);
  opacity: 0.35;
  line-height: 1;
}
.notfound h1 { font-family: var(--serif); font-weight: 500; font-size: 2rem; margin: 1rem 0 0.75rem; }
.notfound p { color: var(--ink-soft); margin-bottom: 1.75rem; }
.btn-back {
  display: inline-block;
  background: var(--sea);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.85rem 2rem;
}
.btn-back:hover { background: var(--sea-deep); text-decoration: none; }

/* Back to top */
.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: var(--sea);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.2s ease;
  z-index: 55;
}
.to-top.visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--sea-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .moods-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 4.25rem;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.5rem 1.25rem;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0.5rem; }

  .chapter { grid-template-columns: 1fr; gap: 0.75rem; padding: 2rem 0; }
  .chapter.flip { grid-template-columns: 1fr; }
  .chapter.flip .chapter-num { order: 0; text-align: left; }

  .moods-grid { grid-template-columns: 1fr; }
  .letter-form { flex-direction: column; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .pn-next { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; }
  .about-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
