/* ==========================================================================
   introverted tales. — design tokens
   palette:  #0c0c0e (void), #131315 (raised), #1c1c1f (hairline),
             #e9e6df (ink), #85817a (quiet — secondary text),
             #565a86 (accent — dusty indigo), #9a97c9 (accent bright, sparing)
   type:     display  — 'Fraunces'   (the storyteller's voice, used rarely)
             body     — 'Inter'      (the quiet everyday voice)
             utility  — 'IBM Plex Mono' (labels, chapters, timestamps)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,400&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --void: #0c0c0e;
  --raised: #131315;
  --raised-2: #17171a;
  --hairline: #232327;
  --ink: #e9e6df;
  --quiet: #85817a;
  --quiet-dim: #55524d;
  --accent: #565a86;
  --accent-bright: #9a97c9;
  --accent-wash: rgba(86, 90, 134, 0.14);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  --max: 1080px;
  --gap: clamp(1.5rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--accent);
  color: var(--void);
}

:focus-visible {
  outline: 1px solid var(--accent-bright);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

/* ---- layout shell ---------------------------------------------------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.chapter-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--quiet);
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.chapter-label::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ---- nav --------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 12, 14, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.5rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand .dot { color: var(--accent-bright); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.nav-links a {
  position: relative;
  color: var(--quiet);
  padding-bottom: 4px;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent-bright);
  transition: right 0.28s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  right: 0;
}

.nav-auth {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.65em 1.1em;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.btn:hover { border-color: var(--accent); background: var(--accent-wash); }

.btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--void);
  font-weight: 500;
}

.btn-solid:hover { background: var(--accent-bright); border-color: var(--accent-bright); }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.3rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .site-nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--void);
    border-bottom: 1px solid var(--hairline);
    padding: 1.25rem var(--gap) 1.5rem;
    gap: 1.1rem;
  }
}

/* ---- hero + reveal signature ------------------------------------------- */

.hero {
  position: relative;
  padding: clamp(3.5rem, 12vh, 8rem) 0 clamp(2.5rem, 8vh, 5rem);
  overflow: hidden;
}

.reveal-quote {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 4.4vw, 2.6rem);
  letter-spacing: 0.01em;
  color: var(--quiet-dim);
  margin-bottom: clamp(2rem, 6vh, 3.5rem);
  user-select: none;
  cursor: default;
}

.reveal-quote .bright {
  color: var(--ink);
  -webkit-mask-image: radial-gradient(circle 160px at var(--mx, -500px) var(--my, -500px), #000 0%, #000 40%, transparent 78%);
  mask-image: radial-gradient(circle 160px at var(--mx, -500px) var(--my, -500px), #000 0%, #000 40%, transparent 78%);
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.04;
  max-width: 14ch;
}

.hero-title .dot { color: var(--accent-bright); }

.hero-sub {
  margin-top: 1.4rem;
  max-width: 46ch;
  color: var(--quiet);
  font-size: 1.02rem;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* ---- sections ------------------------------------------------------------ */

section { padding: clamp(3rem, 8vh, 5.5rem) 0; }
section + section { border-top: 1px solid var(--hairline); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.8rem, 4vh, 2.6rem);
  flex-wrap: wrap;
}

.section-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }

.see-all {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--quiet);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.see-all:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

/* ---- cards --------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card-media {
  aspect-ratio: 4/3;
  background: linear-gradient(155deg, var(--raised-2), var(--void));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--quiet-dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }

.card-body h3 { font-size: 1.08rem; }

.card-body p { color: var(--quiet); font-size: 0.9rem; }

.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--quiet);
  padding-top: 0.6rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.2em 0.7em;
}

/* ---- footer --------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 2.6rem 0 3rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--quiet-dim);
}

.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--quiet); transition: color 0.25s ease; }
.footer-links a:hover { color: var(--accent-bright); }

/* ---- forms ------------------------------------------------------------- */

input, textarea, select {
  font-family: var(--sans);
  background: var(--raised);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: 3px;
  padding: 0.75em 0.9em;
  font-size: 0.92rem;
  width: 100%;
  transition: border-color 0.25s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
textarea { resize: vertical; min-height: 90px; }
label { font-family: var(--mono); font-size: 0.74rem; color: var(--quiet); letter-spacing: 0.03em; display: block; margin-bottom: 0.4em; }

/* ---- misc page helpers --------------------------------------------------- */

.page-hero {
  padding: clamp(3rem, 9vh, 5.5rem) 0 2.5rem;
}

.page-hero .chapter-label { margin-bottom: 1rem; }

.page-hero h1 { font-size: clamp(2rem, 5.4vw, 3.2rem); max-width: 20ch; }
.page-hero p { color: var(--quiet); max-width: 52ch; margin-top: 1rem; font-size: 1rem; }

.prose p + p { margin-top: 1rem; }
.prose { color: var(--quiet); max-width: 62ch; }
.prose strong { color: var(--ink); font-weight: 500; }

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.85rem;
  border: 1px dashed var(--hairline);
  border-radius: 4px;
}

.divider-dot {
  width: 4px; height: 4px;
  background: var(--accent-bright);
  border-radius: 50%;
  display: inline-block;
}
