/* =========================================================================
   Veyn — veyn.me
   Quiet, expensive, unhurried. Black-and-white with one moment of warmth.
   ========================================================================= */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Palette — light */
  --void: #0A0A0A;
  --paper: #F8F7F4;
  --chalk: #EFEFEC;
  --smoke: #D8D6D1;
  --ash: #888580;
  --tallow: #C8A96E;
  --amber: #8B6B35;

  /* Active surfaces (light mode default) */
  --bg: var(--paper);
  --bg-elev: var(--chalk);
  --fg: var(--void);
  --fg-muted: var(--ash);
  --rule: rgba(10, 10, 10, 0.08);
  --accent: var(--amber); /* text-readable on light */
  --accent-pure: var(--tallow);

  /* Type */
  --serif: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  /* Spacing — 8pt grid */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-7: 56px;
  --s-8: 64px;
  --s-10: 80px;
  --s-12: 96px;
  --s-15: 120px;
  --s-20: 160px;

  /* Layout */
  --max-w: 1120px;
  --max-w-prose: 720px;
  --gutter: 24px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--void);
    --bg-elev: #141414;
    --fg: #F2F1EE;
    --fg-muted: #8E8E93;
    --rule: rgba(242, 241, 238, 0.10);
    --accent: var(--tallow); /* tallow reads well on dark */
    --accent-pure: var(--tallow);
  }
}

/* --- Reset / Base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  font-weight: 400;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a.link {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 200ms var(--ease);
}
a.link:hover { text-decoration-color: var(--fg); }

::selection { background: var(--fg); color: var(--bg); }

/* --- Layout ------------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--prose { max-width: var(--max-w-prose); }

/* --- Header ------------------------------------------------------------- */
.site-header {
  padding: var(--s-4) 0;
  position: relative;
  z-index: 10;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
}
.brand__mark { width: 22px; height: 22px; }
.brand__word { height: 16px; width: auto; }

.badge {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.badge__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-pure);
  display: inline-block;
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  padding-top: var(--s-12);
  padding-bottom: 72vh;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
@media (min-width: 768px) {
  .hero { padding-top: var(--s-15); padding-bottom: 70vh; }
}
.hero__eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 var(--s-5) 0;
}
.hero__headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 9vw, 112px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--fg);
  max-width: 14ch;
}
.hero__headline .accent-dot {
  color: var(--accent-pure);
}
.hero__sub {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 48ch;
  margin: var(--s-5) 0 0;
}
.hero__cta {
  margin-top: var(--s-7);
  max-width: 480px;
}
.hero__note {
  margin-top: var(--s-2);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

/* --- Form / Email capture ---------------------------------------------- */
.notify {
  display: flex;
  align-items: stretch;
  gap: 8px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 6px;
  background: transparent;
  transition: border-color 200ms var(--ease);
}
.notify:focus-within { border-color: var(--fg); }
.notify__input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  letter-spacing: 0.005em;
  min-width: 0;
}
.notify__input::placeholder { color: var(--fg-muted); }
.notify__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
  padding: 12px 22px;
  border-radius: 6px;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  white-space: nowrap;
}
.notify__btn:hover { opacity: 0.85; }
.notify__btn:active { transform: translateY(1px); }
.notify__btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.notify[data-state="success"] .notify__input,
.notify[data-state="success"] .notify__btn { display: none; }
.notify__success {
  display: none;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--fg);
}
.notify__success::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-pure);
  margin-right: 12px;
  vertical-align: middle;
}
.notify[data-state="success"] .notify__success { display: block; }

@media (max-width: 520px) {
  .notify { flex-direction: column; padding: 8px; }
  .notify__btn { width: 100%; padding: 14px; }
}

/* --- Section -------------------------------------------------------- */
section { padding: var(--s-8) 0; }
@media (min-width: 768px) { section { padding: var(--s-15) 0; } }

.section-rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 var(--s-4) 0;
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--fg);
  max-width: 22ch;
}
.section-lede {
  margin: var(--s-3) 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 56ch;
}

/* --- Steps (What it does) --------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  margin-top: var(--s-10);
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-7); margin-top: var(--s-12); }
}
.step { padding-top: var(--s-3); border-top: 1px solid var(--rule); }
.step__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin: 0 0 var(--s-3);
  display: block;
}
.step__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 var(--s-2);
  color: var(--fg);
}
.step__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0;
}

/* --- A reading is... (palm SVG diagram) ------------------------------- */
.reading {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  margin-top: var(--s-8);
  align-items: center;
}
@media (min-width: 1024px) {
  .reading { grid-template-columns: 1.2fr 1fr; gap: var(--s-15); margin-top: var(--s-10); }
}
.palm-figure {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-width: 540px;
  margin: 0 auto;
}
.palm-figure svg { width: 100%; height: 100%; display: block; }

.reading-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.reading-list li {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reading-list li:first-child { border-top: 1px solid var(--rule); }
.reading-list .name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--fg);
}
.reading-list .desc {
  font-size: 14px;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}
.reading-list .index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

/* --- Disclaimer (entertainment) --------------------------------------- */
.disclaimer {
  text-align: center;
  padding: var(--s-12) 0;
}
.disclaimer__inner {
  max-width: 56ch;
  margin: 0 auto;
}
.disclaimer__lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--fg);
  margin: 0;
}
.disclaimer__note {
  margin-top: var(--s-3);
  font-size: 14px;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}

/* --- Footer ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--s-6) 0 var(--s-8);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}
.site-footer .brand__mark { width: 16px; height: 16px; }
.site-footer .brand__word { height: 12px; }
.site-footer__links {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.site-footer__links a:hover { color: var(--fg); }
.site-footer__sep { color: var(--rule); }
.site-footer__copy { display: inline-flex; gap: var(--s-2); align-items: center; }

/* --- Prose pages (privacy / terms) ------------------------------------ */
.prose {
  padding: var(--s-8) 0 var(--s-12);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
}
@media (min-width: 768px) { .prose { padding: var(--s-12) 0 var(--s-15); } }
.prose h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin: 0 0 var(--s-3);
  color: var(--fg);
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: var(--s-7) 0 var(--s-2);
  color: var(--fg);
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: none;
  margin: var(--s-5) 0 var(--s-1);
  color: var(--fg);
}
.prose p { margin: 0 0 var(--s-2); color: var(--fg); }
.prose p strong { font-weight: 600; }
.prose ul, .prose ol { margin: var(--s-1) 0 var(--s-3); padding-left: 1.4em; }
.prose li { margin: 6px 0; }
.prose hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: var(--s-6) 0;
}
.prose blockquote {
  margin: var(--s-3) 0;
  padding: var(--s-3) var(--s-3);
  border-left: 1px solid var(--rule);
  background: transparent;
  color: var(--fg-muted);
  font-size: 15px;
}
.prose blockquote p { color: var(--fg-muted); margin-bottom: 8px; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote strong { color: var(--fg); }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; transition: text-decoration-color 200ms var(--ease); }
.prose a:hover { text-decoration-color: var(--fg); }
.prose code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0;
}
.prose .table-wrap {
  margin: var(--s-3) 0 var(--s-4);
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}
.prose th {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-elev);
}
.prose tr:last-child td { border-bottom: 0; }

.prose__meta {
  margin-top: var(--s-2);
  margin-bottom: var(--s-5);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.back-link:hover { color: var(--fg); }
.back-link::before { content: "←"; font-size: 14px; }

/* --- Reveal animation ------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Focus rings */
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
