/* Ascua Official Website (https://ascua.ai)
 * Zero-build portable static stylesheet — Warm Paper Light (default) & Monokai Dark
 * Faithful to Ascua v0.2 brand-2102 tokens & typography
 */

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg-chrome: #f1efe7;
  --bg-page: #f8f6f0;
  --bg-elevated: #ffffff;
  --bg-panel: #f3f0e7;
  --bg-subtle: rgba(28, 29, 24, 0.04);
  --border-subtle: rgba(34, 35, 30, 0.12);
  --border-strong: rgba(34, 35, 30, 0.22);
  --text-primary: #1f201c;
  --text-secondary: #4c4d45;
  --text-muted: #727369;
  --accent: #4c7011;
  --accent-ink: #fbfaf5;
  --accent-soft: rgba(76, 112, 17, 0.1);
  --accent-border: rgba(76, 112, 17, 0.3);
  --cite-highlight: rgba(132, 178, 42, 0.2);
  --brand-flame: #d9361e;
  --brand-wood: #845232;
  --shadow-window: 0 24px 60px rgba(31, 32, 28, 0.1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-chrome: #1e1f1c;
  --bg-page: #272822;
  --bg-elevated: #2f3029;
  --bg-panel: #23241e;
  --bg-subtle: rgba(255, 255, 255, 0.045);
  --border-subtle: rgba(248, 248, 242, 0.11);
  --border-strong: rgba(248, 248, 242, 0.2);
  --text-primary: #f5f4ed;
  --text-secondary: #c2c1b6;
  --text-muted: #8f9086;
  --accent: #a6e22e;
  --accent-ink: #192107;
  --accent-soft: rgba(166, 226, 46, 0.13);
  --accent-border: rgba(166, 226, 46, 0.36);
  --cite-highlight: rgba(166, 226, 46, 0.16);
  --brand-flame: #ef4728;
  --brand-wood: #a8714c;
  --shadow-window: 0 28px 72px rgba(0, 0, 0, 0.48);
}

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

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

body {
  margin: 0;
  background-color: var(--bg-chrome);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "MiSans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.serif {
  font-family: "Source Serif 4", "Charter", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-chrome) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-mark .wood {
  fill: var(--brand-wood);
}

.brand-mark .flame {
  fill: var(--brand-flame);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.nav-links a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.theme-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.theme-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: var(--bg-page);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

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

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
}

/* Hero Section */
.hero {
  padding: 68px 0 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.stage-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 40px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 650;
}

.hero-subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text-secondary);
  max-width: 580px;
}

.hero-cta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Interactive Authentic v0.2 Reader Preview Window */
.reader-showcase {
  border-radius: 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  gap: 12px;
  flex-wrap: wrap;
}

.reader-topbar-left,
.reader-topbar-center,
.reader-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-crumb {
  color: var(--text-secondary);
  font-weight: 500;
}

.reader-book-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  gap: 12px;
  flex-wrap: wrap;
}

.reader-book-title {
  font-weight: 600;
  color: var(--text-primary);
}

.reader-book-author {
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 400;
}

.reader-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.tool-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.reader-split {
  display: grid;
  grid-template-columns: 1.32fr 0.98fr;
  min-height: 470px;
}

.reader-page-pane {
  padding: 34px 42px;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-page);
  transition: padding 0.2s ease;
}

.reader-chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.book-prose {
  font-family: "Source Serif 4", "Charter", "Iowan Old Style", Georgia, serif;
  font-size: 18px;
  line-height: 1.72;
  color: var(--text-primary);
  max-width: 56ch;
  transition: letter-spacing 0.2s ease, line-height 0.2s ease;
}

.reader-showcase[data-book-design="designed"] .book-prose {
  line-height: 1.84;
  letter-spacing: 0.006em;
}

.reader-showcase[data-book-design="designed"] .book-prose h2 {
  text-align: center;
  letter-spacing: 0.015em;
  margin-top: 26px;
}

.book-prose h2 {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.3;
  margin: 18px 0 14px;
}

.book-prose p {
  margin: 0 0 16px;
  padding: 6px 8px;
  margin-left: -8px;
  margin-right: -8px;
  border-radius: 6px;
  transition: background-color 0.25s ease;
}

.book-prose p.is-cited {
  background-color: var(--cite-highlight);
  outline: 1px solid var(--accent-border);
}

.book-footnote {
  font-size: 14px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: 14px;
}

.book-footnote span {
  color: var(--accent);
  text-decoration: underline;
}

.design-status-bar {
  margin-top: 18px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Read together Co-Reading Sidebar */
.reader-ai-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-panel);
  padding: 22px 22px 18px;
}

.ai-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.ai-eyebrow {
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.ai-title {
  font-size: 16px;
  font-weight: 650;
  margin-top: 2px;
}

.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.ai-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13.5px;
  line-height: 1.58;
}

.ai-msg-role {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--accent);
  display: flex;
  justify-content: space-between;
}

.ai-msg-role.is-user {
  color: var(--text-secondary);
}

.ai-msg-time {
  color: var(--text-muted);
  font-weight: 400;
}

.ai-msg-body {
  color: var(--text-secondary);
  margin: 0;
}

.ai-context-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

.cite-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.cite-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}

.cite-pill:hover,
.cite-pill[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.ai-composer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.ai-composer-hint {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ai-input-mock {
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Sections */
.section {
  padding: 68px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 680px;
  margin-bottom: 38px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.2vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16.5px;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  padding: 26px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.62;
}

.card-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.card-list li {
  margin-bottom: 6px;
}

/* Library Shelf Preview */
.library-strip {
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  align-items: center;
}

.mini-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mini-cover {
  aspect-ratio: 3 / 4.2;
  border-radius: 8px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.mini-cover.c-rust {
  background: #a84639;
  color: #fbf6f0;
}

.mini-cover.c-paper {
  background: #e9e2d0;
  color: #262520;
  border-color: rgba(0, 0, 0, 0.12);
}

.mini-cover.c-harbor {
  background: #1d4052;
  color: #f3f6f8;
}

.mini-cover-title {
  font-size: 13.5px;
  line-height: 1.3;
  font-weight: 600;
}

.mini-cover-foot {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Planned Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 880px;
}

.price-card {
  padding: 30px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.price-card.is-featured {
  border-color: var(--accent-border);
}

.price-amount {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
}

.price-amount span {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.price-check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Early Access Banner / Modal Drawer */
.access-card {
  padding: 32px;
  border-radius: 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.contact-box {
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mono-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  color: var(--accent);
}

/* Legal Document Pages (/privacy & /terms) */
.legal-wrap {
  padding: 56px 0 80px;
}

.legal-article {
  max-width: 780px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 40px 44px;
}

.legal-article h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -0.02em;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-article h2 {
  font-size: 20px;
  margin: 28px 0 10px;
}

.legal-article p,
.legal-article li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.legal-article ul {
  padding-left: 20px;
}

.legal-address-card {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-chrome);
  padding: 44px 0 48px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-tagline {
  color: var(--text-secondary);
  margin: 10px 0 6px;
  font-size: 14.5px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid,
  .reader-split,
  .cards-3,
  .library-strip,
  .pricing-grid,
  .access-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .reader-page-pane {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 26px 22px;
  }

  .nav-links {
    display: none;
  }

  .legal-article {
    padding: 28px 22px;
  }
}
