/* Kate Sharp Writes — stylesheet */
:root {
  --bg: #1b191f;
  --surface: #25222b;
  --surface-2: #2e2a35;
  --line: #3a3541;
  --text: #efe9f1;
  --muted: #b8afbd;
  --mauve: #c48ab6;
  --mauve-strong: #d9a3cb;
  --lavender: #a28fe6;
  --radius: 14px;
  --max: 1080px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.75 var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--mauve-strong); text-underline-offset: 3px; }
a:hover { color: #f0c4e3; }

:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.8rem, 7vw, 5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1.1em; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--text); color: var(--bg); padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 16px; top: 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(27, 25, 31, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--text); text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--mauve); font-style: italic; }
.brand:hover { color: var(--text); }

.nav-toggle { display: none; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

@media (max-width: 700px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font: inherit; font-weight: 600; color: var(--text);
    background: none; border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 14px; cursor: pointer;
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(72px, 13vw, 150px) 0 clamp(64px, 10vw, 120px);
  background:
    radial-gradient(60% 80% at 85% 20%, rgba(162, 143, 230, .28), transparent 70%),
    radial-gradient(50% 70% at 10% 90%, rgba(196, 138, 182, .22), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow, .eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--mauve);
}
.hero h1 em { font-style: italic; color: var(--mauve-strong); }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 54ch; }
.page-hero { padding: clamp(56px, 9vw, 96px) 0 clamp(40px, 6vw, 64px); }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--mauve); color: #1b111a; }
.btn-primary:hover { background: var(--mauve-strong); color: #1b111a; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--mauve); color: var(--text); }
.btn:disabled { opacity: .6; cursor: progress; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

.prose { font-size: 1.08rem; }
.prose p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-size: 4.2em; line-height: .8;
  padding: 6px 10px 0 0; color: var(--mauve);
}
.pullquote {
  margin: 2em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--mauve);
  font-family: var(--serif); font-size: 1.6rem; font-style: italic; line-height: 1.35; color: var(--text);
}

.split { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* Book covers (typographic) */
.books { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 620px) {
  .books { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
  .cover { padding: 16px 14px; }
  .cover .title { font-size: 1.3rem; }
  .cover .series { font-size: .55rem; }
  .book .meta { font-size: .8rem; }
}
.book { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--text); }
.book:hover { color: var(--text); }
.cover {
  position: relative; aspect-ratio: 2 / 3; border-radius: 6px 12px 12px 6px; overflow: hidden;
  padding: 22px 18px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, var(--c1, #4a3a63), var(--c2, #1f1a2a));
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .25), 0 12px 28px rgba(0, 0, 0, .45);
  transition: transform .2s ease;
}
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 50% at 80% 10%, rgba(255, 255, 255, .14), transparent 70%); pointer-events: none; }
a.book:hover .cover { transform: translateY(-4px) rotate(-.5deg); }
.cover .series { font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.cover .title { font-family: var(--serif); font-size: 1.65rem; font-weight: 600; line-height: 1.05; }
.cover .num { font-family: var(--serif); font-style: italic; font-size: 1rem; opacity: .9; display: block; margin-bottom: 6px; }
.cover .author { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; opacity: .9; }
.book .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.book .meta .go { color: var(--mauve-strong); font-weight: 600; }

.series-block + .series-block { margin-top: 72px; }
.series-intro { display: grid; gap: 8px 40px; grid-template-columns: 1fr 1fr; margin-bottom: 32px; }
.series-intro p { color: var(--muted); margin: 0; }
.series-intro p + p { margin-top: .7em; }
@media (max-width: 820px) { .series-intro { grid-template-columns: 1fr; } }

.feature { display: grid; gap: 40px; grid-template-columns: 220px 1fr; align-items: start; }
.feature .cover { max-width: 220px; }
.feature p { color: var(--muted); }
@media (max-width: 620px) { .feature { grid-template-columns: 1fr; } .feature .cover { max-width: 200px; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; color: var(--muted);
}
.pill strong { color: var(--text); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }

/* Contact */
.contact-grid { display: grid; gap: 48px; grid-template-columns: .8fr 1.2fr; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); }
form .field { margin-bottom: 18px; }
form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
form label .opt { color: var(--muted); font-weight: 400; }
form input, form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
}
form input:focus, form textarea:focus { border-color: var(--mauve); outline: 3px solid rgba(196, 138, 182, .25); outline-offset: 0; }
form textarea { min-height: 170px; resize: vertical; }
form { position: relative; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-size: .95rem; color: var(--muted); }
.form-status:empty { display: none; }
.form-status[data-kind="ok"] { color: #9fe0b0; font-weight: 600; }
.form-status[data-kind="error"] { color: #ffb3b3; font-weight: 600; }

/* CTA + footer */
.cta { text-align: center; }
.cta p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.cta .actions { justify-content: center; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 28px 0; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.credit { border-top: 1px solid var(--line); font-size: .85rem; }
.credit .container { justify-content: center; gap: 12px; padding: 16px 0; }
.credit img { width: 140px; height: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cover { transition: none; }
}
