/* ---------------- PAGE TRANSITIONS (CLEAN SLIDE) ---------------- */

/* Default: visible immediately */
body {
  opacity: 1;
  transform: none;
}

/* When page first loads (JS adds this instantly, then removes it next frame) */
body.vt-enter {
  opacity: 0;
  transform: translateX(14px);
}

/* Animate into place */
body.vt-ready {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.22s ease-out, transform 0.22s ease-out;
}

/* Animate out before navigation */
body.vt-leave {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.16s ease-in, transform 0.16s ease-in;
}

@media (prefers-reduced-motion: reduce) {
  body.vt-enter,
  body.vt-ready,
  body.vt-leave {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ---------------- FONTS ---------------- */

@font-face {
  font-family: "QECaroline";
  src: url("fonts/QECaroline.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "ITC New Baskerville";
  src: url("ITC New Baskerville Roman.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------------- VARIABLES ---------------- */

:root {
  --cream: #fbf7ef;
  --cream-dark: #f2edde;

  --brand: #2f6b4a;
  --ink: #1c1a17;
  --grey: rgba(28, 26, 23, 0.62);
  --line: rgba(28, 26, 23, 0.14);

  --hl: rgba(47, 107, 74, 0.22);
}

/* ---------------- BASE ---------------- */

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "ITC New Baskerville", serif;
  color: var(--ink);
  background: var(--cream);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- SPLASH ---------------- */

.page-splash {
  background: var(--cream);
}

.splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.splash-center {
  width: min(700px, 100%);
  text-align: center;
}

.splash-logo {
  margin: 0 0 18px;
  font-weight: 400;
  letter-spacing: 0.1px;
  font-size: clamp(70px, 8vw, 118px);
  line-height: 0.92;
  color: var(--brand);
}

.splash-copy {
  margin-top: 6px;
}

.splash-copy p {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--grey);
}

.hl {
  color: var(--brand);
  text-decoration: none;
  background: var(--hl);
  padding: 0.06em 0.28em;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hl:hover {
  background: rgba(47, 107, 74, 0.36);
}

/* ---------------- BLOG ---------------- */

.page-blog {
  background: var(--cream-dark);
}

.shell {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(242, 237, 222, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.logo {
  text-decoration: none;
  color: rgba(28, 26, 23, 0.86);
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.blog-main {
  padding: 110px 0 48px;
}

.blog-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.input {
  font-family: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 8px 12px;
  outline: none;
  min-width: 210px;
}

.input:focus {
  border-color: rgba(28, 26, 23, 0.25);
}

.posts-list {
  display: grid;
  gap: 18px;
}

.post-card {
  text-decoration: none;
  color: inherit;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.35);
}

.post-card:hover {
  background: rgba(255, 255, 255, 0.55);
}

.post-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--grey);
  font-size: 14px;
  margin-bottom: 10px;
}

.post-title {
  font-size: 28px;
  line-height: 1.05;
  margin: 0 0 10px;
  font-weight: 600;
}

.post-excerpt {
  margin: 0;
  color: var(--grey);
  line-height: 1.65;
}

/* ---------------- POST PAGE ---------------- */

.post-main {
  padding: 64px 0 56px;
}

.shell-post {
  width: min(1180px, calc(100% - 56px));
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(360px, 520px);
  gap: 52px;
  align-items: start;
}

.post-article {
  max-width: 680px;
}

.post h1 {
  font-family: "QECaroline", "ITC New Baskerville", serif;
  color: var(--brand);
  font-size: 72px;
  line-height: 0.95;
  font-weight: 400;
  margin: 0 0 28px;
  letter-spacing: 0.4px;
}

.post .content {
  color: var(--brand);
  font-size: 21px;
  line-height: 1.9;
  margin-top: 10px;
}

.post .content p {
  margin: 0 0 18px;
}

.post .signature {
  margin-top: 22px;
  color: rgba(47, 107, 74, 0.85);
}

.post .signature {
  font-family: "QECaroline", "ITC New Baskerville", serif;
  font-size: 42px;
  line-height: 1;
  color: rgba(47, 107, 74, 0.9);
  display: inline-block;
}



.post-media {
  position: sticky;
  top: 64px;
  align-self: start;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

.media-stack {
  display: grid;
  gap: 14px;
}

.media-stack img,
.media-stack video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}

.media-placeholder {
  border: 1px dashed rgba(28, 26, 23, 0.22);
  border-radius: 12px;
  padding: 16px;
  color: rgba(28, 26, 23, 0.62);
  font-size: 14px;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .post-media {
    position: static;
  }

  .media-stack img,
  .media-stack video {
    max-height: none;
  }
}

/* ---------------- NOTE PAGE ---------------- */

.page-note {
  background: var(--cream);
  color: var(--brand);
}

.note {
  min-height: 100vh;
  display: block;
  padding: 60px 28px;
}

.note-inner {
  width: min(680px, 100%);
  margin: 0 auto;
}

.note-logo {
  font-size: 44px;
  line-height: 0.92;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--brand);
  margin-bottom: 28px;
}

.note-body {
  font-size: 22px;
  line-height: 1.8;
  color: rgba(47, 107, 74, 0.9);
}

.note-p {
  margin: 0;
}

.note-link {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.note-link:hover {
  opacity: 0.85;
}

@media (max-width: 720px) {
  .note {
    padding: 48px 22px;
  }

  .note-logo {
    font-size: 38px;
  }

  .note-body {
    font-size: 21px;
  }
}
