/* ─────────────────────────────────────────────────────────────────────────
   theghostrecords.com — shared stylesheet
   self-hosted variable fonts, no external requests at runtime
   ───────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/Newsreader[opsz,wght].woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/Newsreader-Italic[opsz,wght].woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/InterTight[wght].ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette — a room at dusk with one lamp on */
  --paper:    #1a1612;   /* field — deep warm near-black */
  --ink:      #e8e2d6;   /* body — warm off-white, not pure */
  --grey:     #968e84;   /* utility — recedes, still legible */
  --hairline: #3c342c;   /* borders — visible but not loud */
  --accent:   #8b6f47;   /* bronze — hover states, excerpt border, photo caption */

  /* fold height — production uses 100vh */
  --fold: 100vh;

  /* type */
  --serif: "Newsreader", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans:  "Inter Tight", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-feature-settings: "kern", "liga", "calt", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* single-column page */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}

.col {
  width: 100%;
  max-width: 560px;
}

/* arrival viewport — title sits ~33% down the fold */
.arrival {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: var(--fold);
  padding-top: calc(var(--fold) * 0.33);
}

/* title */
.title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60, "wght" 400;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

/* author name */
.author {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 400;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin: 32px 0 0;
}

/* body prose — about-book and about-abhijeet sections */
.prose p {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 28px;
  text-wrap: pretty;
  hanging-punctuation: first last;
}
.prose p:last-child { margin-bottom: 0; }

/* book cover — flat reproduction, no shadow, no effects */
.cover {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* excerpt — one passage from the book, set off with a thin accent border */
.excerpt {
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 1px solid var(--accent);
}
.excerpt p {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.excerpt p:last-child { margin-bottom: 0; }

/* session-persistent quote — one sentence, italic */
.reading {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-style: italic;
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.reading .attrib {
  display: block;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin-top: 18px;
  font-family: var(--sans);
}

/* author photograph — presence, not portrait */
.author-photo {
  margin: 0;
}
.author-photo img {
  display: block;
  width: 220px;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.85;
}
.author-photo figcaption {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-top: 10px;
  text-transform: lowercase;
}

/* amazon link — accent colour, the only coloured link on the page */
.amazon {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  margin: 0;
}
.amazon a { color: inherit; text-decoration: inherit; }
.amazon a:hover { text-decoration-thickness: 2px; }

/* newsletter — one line, no scaffolding */
.newsletter {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--grey);
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.newsletter label { color: var(--grey); cursor: pointer; }
.newsletter input[type="email"] {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  outline: none;
  padding: 4px 0;
  min-width: 240px;
  flex: 1 1 240px;
}
.newsletter input[type="email"]:focus { border-bottom-color: var(--grey); }
.newsletter button {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--grey);
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.newsletter button:hover { color: var(--accent); }

/* corner utility — lowercase, grey, small.
   absolute on desktop (bottom-right of first viewport), foot flow on mobile. */
.utility {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--grey);
  display: flex;
  gap: 28px;
}
.utility a {
  color: var(--grey);
  text-decoration: none;
  text-transform: lowercase;
  transition: color 0.15s ease;
}
.utility a:hover { color: var(--accent); }

.corner {
  position: absolute;
  right: 32px;
  top: calc(var(--fold) - 80px);
}

/* footer copyright */
.copyright {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey);
  text-transform: lowercase;
}

/* resources page — list items */
.resource-item {
  margin: 0 0 56px;
}
.resource-item:last-child { margin-bottom: 0; }
.resource-item .name {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-size: 21px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  display: inline;
  transition: color 0.15s ease;
}
.resource-item .name:hover { color: var(--accent); }
.resource-item .meta {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin-left: 14px;
  text-transform: lowercase;
}
.resource-item .desc {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--grey);
  margin: 10px 0 0;
  max-width: 520px;
}

/* vertical rhythm */
.gap-title-to-cover         { height: 80px; }
.gap-cover-to-about         { height: 96px; }
.gap-about-to-excerpt       { height: 144px; }
.gap-excerpt-to-reading     { height: 144px; }
.gap-reading-to-about-author { height: 112px; }
.gap-about-author-to-photo  { height: 96px; }
.gap-photo-to-amazon        { height: 96px; }
.gap-amazon-to-newsletter   { height: 144px; }
.gap-foot-to-copyright      { height: 64px; }
.foot-margin                { height: 96px; }

/* mobile */
@media (max-width: 600px) {
  .page { padding: 0 24px; }
  .arrival {
    padding-top: calc(var(--fold) * 0.28);
    max-width: none;
  }
  .title {
    font-variation-settings: "opsz" 40, "wght" 400;
    font-size: 38px;
    letter-spacing: -0.01em;
  }
  .author { font-size: 17px; margin-top: 28px; }
  .prose p { font-size: 17px; line-height: 1.65; }
  .excerpt p { font-size: 17px; }
  .reading { font-size: 19px; }
  .cover { max-width: 220px; }
  .author-photo img { width: 180px; }
  .resource-item .name { font-size: 19px; }
  .resource-item .desc { font-size: 16px; }

  /* corner moves to foot — becomes normal flow element */
  .corner {
    position: static;
    right: auto;
    top: auto;
    margin: 80px 0 0;
  }
  .utility { gap: 20px; flex-wrap: wrap; }

  .gap-title-to-cover         { height: 56px; }
  .gap-cover-to-about         { height: 72px; }
  .gap-about-to-excerpt       { height: 96px; }
  .gap-excerpt-to-reading     { height: 96px; }
  .gap-reading-to-about-author { height: 80px; }
  .gap-about-author-to-photo  { height: 72px; }
  .gap-photo-to-amazon        { height: 64px; }
  .gap-amazon-to-newsletter   { height: 96px; }
}

/* selection */
::selection {
  background: var(--accent);
  color: var(--paper);
}
