/* ============================================================
   RISING VOYAGE — stylesheet
   Tokens derived from the writer's actual journey. Ember is
   reserved for the primary CTA + the passport-stamp signature
   moment only — never decorative.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Tokens ---------- */
:root {
  --indigo: #26324B;
  --tea: #4A5D3F;
  --porcelain: #F6F3EC;
  --clay: #A96F4C;
  --ember: #E0592A;
  --ink: #1D1B17;

  --indigo-ink: #1a2338;
  --porcelain-dim: #ece7db;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max-width: 1180px;
  --pad-inline: clamp(1.25rem, 5vw, 3.5rem);
  --section-pad: clamp(4.5rem, 10vw, 8.5rem);

  --radius: 4px;
}

/* ---------- Base ---------- */
body {
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* paper grain texture, very low opacity */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

p { max-width: 62ch; }

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

section { padding-block: var(--section-pad); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Eyebrows / mono labels ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.eyebrow--on-dark { color: #d9c9b8; }
.eyebrow--on-light { color: var(--clay); }
.eyebrow--on-tea { color: #cfe0c4; }

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 2.5rem;
  max-width: 18ch;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ember);
  color: var(--porcelain);
  border: 1px solid var(--ember);
}
.btn-primary:hover { background: #c94a1f; border-color: #c94a1f; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: currentColor;
  border: 1px solid currentColor;
}
.btn-outline:hover { background: var(--ink); color: var(--porcelain); border-color: var(--ink); }

.btn-outline--on-dark { color: var(--porcelain); border-color: rgba(246,243,236,0.55); }
.btn-outline--on-dark:hover { background: var(--porcelain); color: var(--indigo); border-color: var(--porcelain); }

.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--tea);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, gap 0.2s ease, color 0.2s ease;
}
.btn-arrow:hover { border-color: var(--tea); gap: 0.65rem; color: var(--ember); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: relative;
  z-index: 10;
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.5rem;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  color: var(--porcelain);
}
.wordmark svg { width: 26px; height: 26px; flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.2rem);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a { color: rgba(246,243,236,0.78); transition: color 0.2s ease; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--porcelain); border-color: var(--clay); }

/* ---------- Hero ---------- */
.hero {
  background: var(--indigo);
  color: var(--porcelain);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(224,89,42,0.16), rgba(224,89,42,0.04) 55%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3rem 4rem;
}
.hero-headline {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  max-width: 15ch;
  margin-bottom: 1.75rem;
}
.hero-headline em { font-style: italic; color: #f0c8b0; }
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 56ch;
  color: #d9d4c8;
  margin-bottom: 2.75rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Chapters / Journey ---------- */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
  margin-top: 3rem;
}
.chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem 2.5rem;
  align-items: start;
}
.chapter-stamp-col {
  display: flex;
  justify-content: center;
}
.chapter-body {
  min-width: 0;
}
.chapter-date {
  font-size: 0.78rem;
  color: var(--clay);
  display: block;
  margin-bottom: 0.6rem;
}
.chapter-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-style: italic;
  margin-bottom: 0.85rem;
}
.chapter-text {
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.chapter-stat {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--tea);
}
.chapter-media {
  margin-top: 1.5rem;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 420px;
}

.chapter-media img,
.story-card-media img,
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d9cdb8 0%, #c7b596 45%, #9a8768 100%);
  position: relative;
  color: rgba(29,27,23,0.45);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}
.placeholder-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.18'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.placeholder-frame img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.placeholder-frame span { position: relative; z-index: 2; }

/* ---------- Passport stamps (signature element) ---------- */
.stamp-wrap {
  width: 128px;
  height: 128px;
  flex-shrink: 0;
}
.stamp-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(var(--stamp-tilt, 0deg));
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.4, 1);
}
.stamp {
  --stamp-color: var(--ink);
  color: var(--stamp-color);
}
.stamp .stamp-ring-char,
.stamp .stamp-center-text,
.stamp .stamp-ring-circle,
.stamp .stamp-inner-circle,
.stamp .stamp-mark {
  fill: none;
  stroke: var(--stamp-color);
}
.stamp .stamp-ring-char {
  fill: var(--stamp-color);
  stroke: none;
  font-family: var(--font-mono);
  font-size: 8.4px;
  letter-spacing: 0.02em;
}
.stamp .stamp-center-text {
  fill: var(--stamp-color);
  stroke: none;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}
.stamp .stamp-ring-circle { stroke-width: 2; }
.stamp .stamp-inner-circle { stroke-width: 1; stroke-dasharray: 2 3; }
.stamp .stamp-mark { stroke-width: 1.4; fill: var(--stamp-color); stroke: none; }

.stamp[data-active="true"] { --stamp-color: var(--ember); }
.stamp[data-unstamped="true"] {
  --stamp-color: var(--ink);
  opacity: 0.55;
}
.stamp[data-unstamped="true"] .stamp-ring-circle,
.stamp[data-unstamped="true"] .stamp-inner-circle { stroke-dasharray: 3 4; }

.stamp-svg[data-pressed="true"] {
  animation: stamp-press 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes stamp-press {
  0%   { transform: scale(1.18) rotate(var(--stamp-tilt, 0deg)); opacity: 0; }
  55%  { opacity: 1; }
  100% { transform: scale(1) rotate(var(--stamp-tilt, 0deg)); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp-svg[data-pressed="true"] { animation: none; transform: rotate(var(--stamp-tilt, 0deg)); }
}

/* ---------- Poem / journal pull-quotes ---------- */
.poem {
  max-width: 640px;
  margin-inline: auto;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}
.poem-rule {
  width: 64px;
  height: 1px;
  background: var(--clay);
  margin-inline: auto;
}
.poem-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  line-height: 1.6;
  color: var(--indigo);
  margin-block: 2rem;
  white-space: pre-line;
}
.poem-caption {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}

/* ---------- Manifesto ---------- */
.manifesto-text {
  max-width: 62ch;
}
.manifesto-text p { margin-bottom: 1.4rem; color: var(--ink); }
.manifesto-text p:last-child { margin-bottom: 0; }

/* ---------- Field notes cards ---------- */
.section-intro {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--tea);
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.story-card { display: flex; flex-direction: column; }
.story-card-media { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; margin-bottom: 1.1rem; }
.story-card-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--clay);
  margin-bottom: 0.6rem;
  display: block;
}
.story-card-title { font-size: 1.3rem; margin-bottom: 0.6rem; }
.story-card-hook { color: var(--ink); font-size: 0.98rem; margin-bottom: 1rem; }

/* ---------- Work with me cards ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}
.work-card {
  border: 1px solid rgba(29,27,23,0.14);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.28);
}
.work-card-tag {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  color: var(--tea);
  margin-bottom: 1rem;
}
.work-card-title { font-size: 1.5rem; margin-bottom: 0.9rem; }
.work-card-text { color: var(--ink); margin-bottom: 1.5rem; flex: 1; }

.work-standalone {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  text-align: center;
  max-width: 44ch;
  margin: 3.5rem auto 0;
  color: var(--indigo);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-portrait { aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; }
.about-text p { color: var(--ink); margin-bottom: 1.2rem; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(169,111,76,0.35);
}
.stats-row .stat {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--tea);
}

/* ---------- Fellow travelers (tea bg) ---------- */
.section-tea {
  background: var(--tea);
  color: var(--porcelain);
}
.section-tea .section-title { color: var(--porcelain); }
.section-tea p { color: rgba(246,243,236,0.9); }

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--indigo);
  color: var(--porcelain);
  text-align: center;
}
.final-cta .phoenix-mark { width: 40px; height: 40px; margin-inline: auto; margin-bottom: 2rem; color: var(--ember); }
.final-cta h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); max-width: 20ch; margin-inline: auto; margin-bottom: 1.25rem; }
.final-cta p { max-width: 48ch; margin-inline: auto; margin-bottom: 2.25rem; color: #d9d4c8; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(246,243,236,0.85);
  padding-block: 2.5rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.footer-left { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-left .wordmark { color: rgba(246,243,236,0.85); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: rgba(246,243,236,0.7); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--ember); }
.footer-signoff { font-style: italic; font-family: var(--font-display); font-size: 0.95rem; color: rgba(246,243,236,0.75); }

/* ---------- Reveal-on-scroll (quiet fades) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 280px; }
}

@media (max-width: 700px) {
  .chapter {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .chapter-stamp-col { justify-content: flex-start; }
  .stamp-wrap { width: 104px; height: 104px; }
  .nav-links { font-size: 0.72rem; gap: 0.9rem 1.4rem; }
  .hero-headline { max-width: 100%; }
}

@media (max-width: 480px) {
  section { padding-block: clamp(3rem, 12vw, 5rem); }
  .work-card { padding: 1.75rem 1.4rem; }
}
