/*
  Village Notes.
  Brand Pack v1.1 tokens, header, footer and button treatment lifted from the
  landing page so Notes reads as the same site. Everything below that is a
  plain reading layout - no animation, no JavaScript, nothing the page needs
  in order to be readable.
*/

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

:root {
  /* Brand palette - v1.1 */
  --navy: #100330;
  --cream: #F2ECE2;
  --off-white: #F5F5F5;
  --red: #B0040D;        /* sparing accent only - never CTA */

  /* Derived tones */
  --navy-soft: #2A1E50;
  --navy-hover: #2A1158;
  --muted: #6B6177;
  --rule: rgba(16, 3, 48, 0.10);

  /* Type */
  --font-heading: 'Epicene Text', Georgia, 'Iowan Old Style', Palatino, serif;
  --font-body: 'Futura', 'Futura PT', 'Avenir Next', 'Trebuchet MS', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  /* Keeps the footer at the bottom on a short page. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.notes-main { flex: 1; }

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 3rem;
  background: rgba(242, 236, 226, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(16, 3, 48, 0.07);
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 1.75rem; }
.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-soft);
  text-decoration: none;
  transition: color 0.18s;
}
.nav-link:hover { color: var(--navy); }
.nav-cta {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--navy);
  border: none;
  padding: 0.55rem 1.3rem;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--navy-hover); transform: translateY(-1px); }

/* PAGE FRAME */
.notes-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 4.5rem 2rem 5rem;
}

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* INDEX */
.notes-masthead { margin-bottom: 3.5rem; }
.notes-masthead h1 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.notes-intro {
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--navy-soft);
  line-height: 1.7;
  margin-top: 1.1rem;
  max-width: 34em;
}

.note-list { list-style: none; }
.note-item {
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}
.note-item:last-child { border-bottom: 1px solid var(--rule); }
.note-date {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.note-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0.5rem 0 0.7rem;
}
.note-title a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s;
}
.note-title a:hover { border-bottom-color: var(--navy); }
.note-summary {
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--navy-soft);
  line-height: 1.7;
  max-width: 36em;
}
.note-author {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.85rem;
}
.notes-empty {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  padding-top: 1rem;
}

/* DETAIL */
/*
  Draft preview banner. Staff-only - never rendered on a published note, so
  this is the one surface where the Brand Pack's Red earns its keep: it has to
  be impossible to mistake a preview for the live page.
*/
.note-draft {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--red);
  background: rgba(176, 4, 13, 0.06);
  border: 1px solid rgba(176, 4, 13, 0.25);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 2rem;
}

.note-headline {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.note-lead {
  font-size: 1.12rem;
  font-weight: 300;
  color: var(--navy-soft);
  line-height: 1.65;
  margin-top: 1.2rem;
  max-width: 34em;
}
.note-byline {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1.6rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.note-body { padding-top: 2.5rem; }
.note-body > * + * { margin-top: 1.4rem; }
.note-body > :first-child { margin-top: 0; }
.note-body p,
.note-body li {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--navy-soft);
}
.note-body h2,
.note-body h3,
.note-body h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-top: 2.6rem;
}
.note-body h2 { font-size: 1.8rem; }
.note-body h3 { font-size: 1.4rem; }
.note-body h4 { font-size: 1.15rem; }
.note-body strong { font-weight: 600; color: var(--navy); }
.note-body em { font-style: italic; }
.note-body a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
.note-body a:hover { color: var(--red); }
.note-body ul, .note-body ol { padding-left: 1.4rem; }
.note-body li + li { margin-top: 0.5rem; }
.note-body blockquote {
  border-left: 2px solid var(--red);
  padding-left: 1.4rem;
  color: var(--navy);
}
.note-body blockquote p { font-style: italic; }
.note-body hr { border: none; border-top: 1px solid var(--rule); margin: 2.6rem 0; }
.note-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
.note-body pre {
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
}
.note-body pre code { background: none; border: none; padding: 0; font-size: 0.86rem; }
.note-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.note-body th, .note-body td { border: 1px solid var(--rule); padding: 0.6rem 0.8rem; text-align: left; }

.note-back { margin-top: 3rem; }
.note-back a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s;
}
.note-back a:hover { color: var(--navy); }

/* CLOSING CTA */
.note-cta {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.note-cta h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -0.02em;
}
.note-cta p {
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--navy-soft);
  margin: 0.9rem 0 1.9rem;
}
.cta-btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.95rem 2.2rem;
  border-radius: 100px;
  background: var(--navy);
  color: var(--cream);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.cta-btn:hover { background: var(--navy-hover); transform: translateY(-2px); }

/* FOOTER */
footer {
  background: var(--cream);
  border-top: 1px solid rgba(16, 3, 48, 0.08);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-left { font-size: 0.78rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--navy); }

@media (max-width: 640px) {
  nav { padding: 1rem 1.25rem; }
  .nav-right { gap: 1rem; }
  .notes-main { padding: 3rem 1.5rem 4rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
}
