/* =====================================================
   Kevin — shared styles for sub-pages
   Main landing page (index.html) keeps its own inlined
   styles; this file keeps the rest consistent.
   ===================================================== */

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

:root {
  --bg: #FAF3E7;
  --bg-alt: #F3E9D3;
  --text: #3D2B3B;
  --text-dim: #6B5862;
  --line: #5C3D4F;
  --accent: #D47287;
  --accent-soft: #F5B8C1;
  --blue: #4A6FA5;
  --ink: #26201F;
  --white: #FFFFFF;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  /* Paper grain baked into the background — never sits over content. */
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='360'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.18 0 0 0 0 0.22 0 0 0 0.06 0'/></filter><rect width='360' height='360' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  background-size: 360px 360px;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ---------- layout ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 720px; }

section { padding: 96px 0; }

/* ---------- NAV ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 243, 231, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(92, 61, 79, 0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  z-index: 2;
  /* Kevin's PNG has a few pixels of transparent padding around him.
     Combined with .nav-inner's bottom padding, his feet float a few
     pixels above the nav's bottom border. align-self + the negative
     margin below seat him on the border. */
  align-self: flex-end;
  margin-bottom: -4px;
}
/* No hover transform on the logo — Kevin stays still in the nav. */
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  background: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(38, 32, 31, 0.25); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(92, 61, 79, 0.25);
}
.btn-secondary:hover { background: rgba(92, 61, 79, 0.06); }
.nav-btn { padding: 10px 18px; font-size: 14px; }

/* ---------- typography ---------- */
h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
p { margin-bottom: 14px; }
.lede {
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 28px;
}
.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(212, 114, 135, 0.12);
  border: 1px solid rgba(212, 114, 135, 0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

/* ---------- hero block shared ---------- */
.page-hero {
  padding: 72px 0 48px;
  text-align: center;
}

/* ---------- footer ---------- */
footer {
  padding: 48px 0 36px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-caveat {
  font-family: 'Caveat', cursive;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-bottom-line {
  font-family: 'Caveat', cursive;
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-style: italic;
}
.footer-legal {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }

/* ---------- utility ---------- */
::selection { background: var(--accent-soft); color: var(--text); }
.mono { font-family: 'Courier Prime', 'Courier New', monospace; }
.hand { font-family: 'Caveat', cursive; }

.paper-card {
  background: #FCF7EC;
  border: 1px solid rgba(92, 61, 79, 0.14);
  padding: 22px 24px 20px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  position: relative;
  background-image:
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 25px,
      rgba(92, 61, 79, 0.06) 25px,
      rgba(92, 61, 79, 0.06) 26px
    );
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 14px 30px -18px rgba(92, 61, 79, 0.25);
}

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  section { padding: 56px 0; }
  .page-hero { padding: 40px 0 24px; }
  .nav-inner { padding: 4px 20px; }
  .logo-mark { width: 44px; height: 44px; }
  .container { padding: 0 20px; }
  .nav-btn { padding: 9px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================
   Mobile hamburger menu (installed by shared-nav.js)
   Visible ≤768px only. Contains all sub-page links.
   ===================================================== */

.nav-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
}
.nav-menu-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.32s cubic-bezier(0.65, 0.05, 0.36, 1),
              opacity 0.2s ease;
}
.nav-menu-toggle.is-open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-menu-toggle.is-open .bar:nth-child(2) { opacity: 0; }
.nav-menu-toggle.is-open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(38, 32, 31, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
}
.nav-menu-overlay.is-open { opacity: 1; pointer-events: auto; }

.nav-menu-panel {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  padding: 26px 22px 34px;
  transform: translateY(-16px);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  display: flex;
  flex-direction: column;
}
.nav-menu-overlay.is-open .nav-menu-panel {
  transform: translateY(0);
  opacity: 1;
}

.nav-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  margin-bottom: 10px;
  border-bottom: 1px dashed rgba(92, 61, 79, 0.2);
}
.nav-menu-eyebrow {
  font-family: 'Courier Prime', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.nav-menu-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
}
.nav-menu-close {
  background: none;
  border: 1px solid rgba(92, 61, 79, 0.18);
  padding: 0;
  color: var(--text);
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-menu-close:hover { background: rgba(212, 114, 135, 0.08); border-color: var(--accent); color: var(--accent); }

.nav-menu-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nav-menu-item {
  display: block;
  padding: 14px 6px;
  border-bottom: 1px dashed rgba(92, 61, 79, 0.1);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease;
}
.nav-menu-item:last-child { border-bottom: none; }
.nav-menu-item:hover,
.nav-menu-item:focus-visible {
  background: rgba(212, 114, 135, 0.05);
  outline: none;
}
.nav-menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.nav-menu-arrow {
  margin-left: auto;
  font-family: 'Courier Prime', monospace;
  font-size: 16px;
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
}
.nav-menu-item:hover .nav-menu-arrow {
  color: var(--accent);
  transform: translateX(4px);
}
.nav-menu-item.is-active .nav-menu-row { color: var(--accent); }
.nav-menu-item.is-active .nav-menu-arrow { color: var(--accent); }
.nav-menu-desc {
  display: block;
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.nav-menu-footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed rgba(92, 61, 79, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.nav-menu-dl {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
}
.nav-menu-subtle {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .nav-menu-toggle { display: flex; }
  /* Hide the existing nav CTA on mobile — it lives in the menu */
  .nav-inner > .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu-panel { transform: none !important; }
  .nav-menu-toggle .bar { transition-duration: 0.01ms !important; }
}
