/* ==========================================================================
   Rob Grafrath — author site
   Brand: dusty rose + gray · friendly yet sophisticated (editorial, menswear-ish)
   Muted rose accents, charcoal + slate gray grounding, warm greige ground, serif display.
   ========================================================================== */

:root {
  --rose: #a75f6b;         /* dusty rose — primary accent (button-safe on white text) */
  --rose-deep: #8c4c58;    /* hover / emphasis / small text on light */
  --rose-tint: #efe1e2;    /* soft rose fill */
  --ink: #2e2a2c;          /* warm charcoal — headings & body */
  --muted: #857b7f;        /* mauve-gray — secondary text */
  --gray: #565059;         /* slate gray — grounding */
  --bg: #e7d8da;           /* warm dusty-rose page ground */
  --surface: #fbf8f8;      /* cards */
  --panel: #f3ebeb;        /* subtle alt panels */
  --line: #ddd1d2;         /* borders */
  --line-2: #cebfc1;
  --shadow-sm: 0 1px 2px rgba(58,48,52,.05), 0 6px 18px rgba(58,48,52,.07);
  --shadow: 0 10px 30px rgba(70,55,60,.13);
  --shadow-cover: 0 14px 34px rgba(60,46,50,.22);
  --radius: 14px;
  --wrap: 1080px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Soft rose + gray wash (replaces the old starfield) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 720px at 84% -12%, rgba(176,110,121,.20), transparent 60%),
    radial-gradient(1000px 620px at 4% 4%, rgba(86,80,89,.08), transparent 55%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-deep); text-underline-offset: 2px; }

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

.skip-link { position: absolute; left: -999px; top: 0; background: var(--rose); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 0; }
:where(a, button, input):focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-weight: 700; font-size: 1rem; line-height: 1; padding: 14px 22px;
  border-radius: 10px; text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.btn-sm { padding: 9px 15px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--rose); color: #fff; }
.btn-accent:hover { transform: translateY(-1px); background: var(--rose-deep); box-shadow: 0 8px 22px rgba(147,86,98,.30); }
.btn-outline { background: transparent; color: var(--rose-deep); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--rose); background: rgba(176,110,121,.08); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(231,216,218,.85); backdrop-filter: saturate(130%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand-sig { height: 50px; width: auto; display: block; }
.site-nav { display: flex; gap: 24px; margin-left: auto; }
.site-nav a { color: var(--gray); text-decoration: none; font-weight: 600; font-size: .94rem; }
.site-nav a:hover { color: var(--ink); }

/* ---------- Type helpers ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; font-weight: 700; color: var(--rose-deep); margin: 0 0 14px; }
.eyebrow--accent { color: var(--gray); }
.section { padding: 82px 0; }
.section--alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 2.7rem); font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: 0 0 6px; line-height: 1.12; }
.section-intro { color: var(--gray); font-size: 1.06rem; max-width: 640px; margin: 10px 0 0; }
.muted { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 74px 0 58px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-copy h1 { font-family: var(--serif); font-size: clamp(2.5rem, 6vw, 4.3rem); line-height: 1.05; margin: 0 0 18px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.hero-copy .lede { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--gray); max-width: 32ch; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.hero-art { display: flex; justify-content: center; position: relative; }
.hero-art::before {
  content: ""; position: absolute; inset: -8% -6% -12% -6%; z-index: 0;
  background: radial-gradient(closest-side, rgba(176,110,121,.24), rgba(176,110,121,0) 72%);
  filter: blur(6px);
}

/* Hero: fanned trilogy covers */
.fan { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; max-width: 440px; margin: 0 auto; }
.fan__cover {
  width: 42%; height: auto; border-radius: 7px;
  box-shadow: var(--shadow-cover), 0 0 0 1px rgba(46,42,44,.06);
}
.fan__cover--1 { transform: rotate(-8deg); margin-right: -11%; z-index: 1; }
.fan__cover--2 { z-index: 3; transform: scale(1.07); }
.fan__cover--3 { transform: rotate(8deg); margin-left: -11%; z-index: 2; }

.cover {
  position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 5 / 8;
  border-radius: 8px; object-fit: cover;
  box-shadow: var(--shadow-cover), 0 0 0 1px rgba(46,42,44,.06);
}

/* ---------- Book list (the Zeta Trilogy) ---------- */
.pill {
  display: inline-block; padding: 6px 13px; border-radius: 999px;
  background: rgba(176,110,121,.15); color: var(--rose-deep); border: 1px solid var(--line-2);
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.series { color: var(--rose-deep) !important; font-family: var(--serif); font-style: italic; font-size: 1.05rem; margin: 2px 0 18px !important; }

.book-list { display: grid; gap: 26px; margin-top: 34px; }
.book {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  box-shadow: var(--shadow-sm);
}
.book__cover { position: relative; }
.book__cover img { width: 100%; border-radius: 8px; box-shadow: var(--shadow-cover), 0 0 0 1px rgba(46,42,44,.06); }
.book__cover .pill { position: absolute; top: 10px; left: 10px; background: var(--surface); }
.book__num { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--rose-deep); margin: 0 0 6px; }
.book__title { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: 0 0 12px; line-height: 1.12; }
.book__body > p { color: var(--gray); margin: 0 0 16px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.tags li {
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px;
}
.book__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.book__free { margin: 16px 0 0 !important; color: var(--rose-deep) !important; font-weight: 700; font-size: .95rem; }
.book__free a { color: var(--rose-deep); }

/* ---------- Also by Rob (11:55 short story) ---------- */
.alsoby-grid { display: grid; grid-template-columns: 300px 1fr; gap: 42px; align-items: center; }
.alsoby-art img { width: 100%; border-radius: 12px; box-shadow: var(--shadow-cover), 0 0 0 1px rgba(46,42,44,.06); }
.alsoby-copy p { color: var(--gray); }
.promo { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--rose); border-radius: 10px; padding: 12px 16px; }
.promo code { background: rgba(176,110,121,.16); color: var(--rose-deep); padding: 2px 8px; border-radius: 6px; font-weight: 700; letter-spacing: .03em; }

/* Serialized-works tiles (DebtLink futurism series) */
.tilegrid { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.tilegrid a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tilegrid a:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--rose); }
@media (prefers-reduced-motion: reduce) { .tilegrid a:hover { transform: none; } }
.tile__img { display: block; aspect-ratio: 750 / 400; overflow: hidden; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.tilegrid a:hover .tile__img img { transform: scale(1.05); }
.tile__body { display: block; padding: 15px 18px 18px; }
.tile__part { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--rose-deep); margin-bottom: 5px; }
.tile__title { display: block; font-family: var(--serif); font-size: 1.1rem; line-height: 1.25; color: var(--ink); }

/* ---------- Newsletter feature ---------- */
.section--feature {
  background: linear-gradient(180deg, var(--rose-tint), var(--panel));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.news-grid { display: grid; grid-template-columns: 260px 1fr; gap: 44px; align-items: center; }
.news-art { display: flex; justify-content: center; }
.news-art .cover { max-width: 220px; }
.news-copy p { color: var(--gray); max-width: 56ch; }

.signup { margin-top: 22px; max-width: 480px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); font-size: 1rem; font-family: inherit;
}
.field input::placeholder { color: #ab9fa3; }
.field input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(176,110,121,.22); }
.signup-msg { min-height: 1.2em; margin: 12px 0 0; color: var(--rose-deep); font-weight: 600; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 46px; align-items: center; }
.about-media { position: relative; display: inline-block; }
.author-photo { width: 100%; max-width: 300px; border-radius: 12px; box-shadow: var(--shadow-cover), 0 0 0 1px rgba(46,42,44,.06); }
.alli { position: absolute; right: -16px; bottom: -16px; width: 104px; height: auto; background: #fff; padding: 9px 11px; border-radius: 12px; box-shadow: 0 8px 20px rgba(60,46,50,.28); }
.about-copy p { color: var(--gray); }
.follow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.follow-btn {
  padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.follow-btn:hover { border-color: var(--rose); color: var(--rose-deep); background: rgba(176,110,121,.08); }

/* ---------- Tribe ---------- */
.tribe { position: relative; }
.tribe img { width: 100%; max-height: 640px; object-fit: cover; object-position: center top; }
.tribe::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,42,44,.05), rgba(46,42,44,.42));
}
.tribe-caption {
  position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; z-index: 1;
  margin: 0; font-family: var(--serif); font-style: italic;
  color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.6); font-size: 1.15rem;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner { display: flex; align-items: center; gap: 14px 28px; padding: 30px 22px; flex-wrap: wrap; }
.footer-tagline { margin: 0; color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.footer-links a { color: var(--gray); text-decoration: none; font-weight: 600; font-size: .92rem; }
.footer-links a:hover { color: var(--rose-deep); }
.footer-legal { width: 100%; margin: 4px 0 0; color: var(--muted); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-art { order: -1; }
  .fan { max-width: 360px; }
  .book { grid-template-columns: 150px 1fr; gap: 22px; padding: 20px; }
  .news-grid { grid-template-columns: 1fr; gap: 22px; }
  .news-art { display: none; }
  .alsoby-grid { grid-template-columns: 1fr; gap: 24px; }
  .alsoby-art { max-width: 300px; }
  .about-grid { grid-template-columns: 1fr; gap: 46px; }
  .about-media { align-self: start; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .section { padding: 60px 0; }
  .book { grid-template-columns: 1fr; gap: 18px; }
  .book__cover { text-align: center; }
  .book__cover img { max-width: 190px; margin: 0 auto; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
