/* charleswair.com — author site for AUTONOMOUS (Malcolm Carter, Book One)
   Visual identity deliberately reuses the book's own system: Inter for
   display type, IBM Plex Mono for the dossier-placard/diagnostic motif
   established on the cover and inside the ebook itself. */

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

:root {
  --bg: #0a0e13;
  --surface: #10161d;
  --surface-2: #161d26;
  --border: rgba(232, 236, 239, 0.09);
  --text: #e8ecef;
  --text-muted: #8a97a3;
  --accent: #3fd9c7;
  --accent-dim: rgba(63, 217, 199, 0.12);
  --flag: #d6555a;
  --flag-dim: rgba(214, 85, 90, 0.14);
  --max-w: 780px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

/* Nav */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 14, 19, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav .brand {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text);
}

.site-nav nav {
  display: flex;
  gap: 1.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
}

.site-nav nav a {
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav nav a:hover { color: var(--text); }

/* Dossier tag — the placard motif from the cover, reused as an eyebrow */
.dossier-tag {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--flag);
  background: var(--flag-dim);
  border: 1px solid rgba(214, 85, 90, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
}

.dossier-tag span:first-child { color: var(--flag); }
.dossier-tag span:last-child { color: rgba(214, 85, 90, 0.75); }

/* Hero */
.hero {
  padding-block: 4.5rem 3.5rem;
}

.hero .wrap {
  max-width: 1000px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .cover-frame { order: -1; max-width: 260px; margin: 0 auto; }
}

.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

h1.title {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 0.4rem;
  line-height: 1.05;
}

.series-line {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin: 0 0 1.5rem;
}

.tagline {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 1.75rem;
  max-width: 30ch;
}

.cta-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #06201c;
}

.btn-primary[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: default;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

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

.cover-frame {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

/* Sections */
section {
  padding-block: 3.5rem;
  border-top: 1px solid var(--border);
}

section .wrap { max-width: var(--max-w); }

.section-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

h2 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.blurb p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  color: var(--text);
}

.flavor-block {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 2px;
  white-space: pre;
  margin: 1.75rem 0 0;
}

.bio p { color: var(--text); font-size: 1.05rem; }
.bio .note {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Reader list */
.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
}

.list-card p.deck {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

form.signup {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0;
}

/* MailerLite's embed wraps the input and button in their own divs (needed
   for its JS to toggle success state) — these two wrappers are the actual
   flex items now, not the input/button directly. */
form.signup .ml-form-formContent {
  flex: 1 1 240px;
  margin: 0;
}

form.signup .ml-form-embedSubmit {
  margin: 0;
  display: flex;
}

form.signup input[type="email"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
}

form.signup input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

form.signup .ml-form-embedSubmit button.loading { display: none; }

.signup-note {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.85rem 0 0;
  display: none;
}

.signup-note.visible { display: block; }

footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

footer .wrap {
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
