/* ==========================================================================
   Inkbolt — Editorial Bookcraft & Reading Design System
   Warm, human-crafted, high-legibility styling for speed reading
   ========================================================================== */

:root {
  /* Warm editorial bookcraft palette (No synthetic gradients) */
  --bg: #141210;
  --surface: #1d1a17;
  --surface-raised: #25211d;
  --surface-tint: rgba(29, 26, 23, 0.88);

  --border: rgba(235, 225, 210, 0.12);
  --border-subtle: rgba(235, 225, 210, 0.07);
  --border-strong: rgba(235, 225, 210, 0.22);

  --text-main: #f5f1e8;
  --text-muted: #b5aaa0;
  --text-faint: #756d64;

  /* Ink & Book Amber (classic book cloth and gold foil gilding) */
  --accent: #e08a1e;
  --accent-hover: #f09a2d;
  --accent-subtle: rgba(224, 138, 30, 0.12);
  --accent-border: rgba(224, 138, 30, 0.35);

  --sage: #4f966e;
  --sage-subtle: rgba(79, 150, 110, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-strong);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text-main);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ==========================================================================
   Background Video — Ambient, blurry, warm turning book pages
   ========================================================================== */
.bg-video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.06);
  object-fit: cover;
  filter: blur(2px) brightness(0.87) saturate(1.15);
  opacity: 0.55;
  transition: opacity 0.8s ease;
}

.bg-tint {
  position: absolute;
  inset: 0;
  background-color: #141210;
  opacity: 0.45;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-top: 0;
}

h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(26px, 3.4vw, 36px);
}

h3 {
  font-size: 20px;
}

p {
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 1.2em;
}

a {
  color: inherit;
  transition: color 0.2s ease;
}

code {
  background: rgba(235, 225, 210, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}

/* All interactive page content renders cleanly above the video layer */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #141210;
  border-bottom: 1px solid var(--border);
}

/* Seal top overscroll so video never peeks above nav */
.nav::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 100vh;
  background: #141210;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 2;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.brand-icon svg {
  width: 16px;
  height: 16px;
}

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

.nav a:not(.btn):not(.brand) {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:not(.btn):not(.brand):hover {
  color: var(--text-main);
}

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

/* Ambient video control */
.ambient-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ambient-toggle:hover {
  background: var(--surface-raised);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.ambient-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}

.ambient-dot.paused {
  background: var(--text-faint);
}

/* ==========================================================================
   Tactile Ghost Buttons with Smooth Fluid Hover Fill
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: transparent;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  transition: color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.15s ease;
}

/* Primary Ghost Button (Warm Amber Accent) */
.btn-primary {
  color: var(--accent);
  border-color: var(--accent-border);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(102%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
  border-radius: calc(var(--radius-md) - 2px);
}

.btn-primary:hover {
  color: #141210;
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(224, 138, 30, 0.25);
}

.btn-primary:hover::before {
  transform: translateY(0);
}

/* Secondary Ghost Button (Warm Paper Linen) */
.btn-secondary {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(235, 225, 210, 0.14);
  transform: translateY(102%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
  border-radius: calc(var(--radius-md) - 2px);
}

.btn-secondary:hover {
  color: #ffffff;
  border-color: rgba(235, 225, 210, 0.45);
}

.btn-secondary:hover::before {
  transform: translateY(0);
}

/* Dedicated E-book Converter Hero Button */
.btn-converter {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(224, 138, 30, 0.06);
}

.btn-converter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(102%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
  border-radius: calc(var(--radius-md) - 2px);
}

.btn-converter:hover {
  color: #141210;
  border-color: var(--accent);
  box-shadow: 0 6px 22px rgba(224, 138, 30, 0.3);
}

.btn-converter:hover::before {
  transform: translateY(0);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    gap: 36px;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero-eyebrow svg {
  width: 14px;
  height: 14px;
}

.hero h1 {
  margin-bottom: 18px;
}

.hero h1 b,
.hero h1 .hl {
  color: var(--accent);
  font-weight: 700;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 50ch;
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-faint);
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.proof-item svg {
  width: 14px;
  height: 14px;
  color: var(--sage);
}

/* ==========================================================================
   Live Reading Specimen Box (Clean, human, functional)
   ========================================================================== */
.specimen-card {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

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

.specimen-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.specimen-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.toggle-track {
  width: 38px;
  height: 20px;
  border-radius: 100px;
  background: rgba(235, 225, 210, 0.15);
  position: relative;
  transition: background 0.25s ease;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.specimen-toggle.active .toggle-track {
  background: var(--accent);
}

.specimen-toggle.active .toggle-thumb {
  transform: translateX(18px);
  background: #141210;
}

.specimen-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.specimen-tab {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.specimen-tab:hover {
  background: var(--surface-raised);
  color: var(--text-main);
}

.specimen-tab.active {
  background: var(--accent-subtle);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

.specimen-body {
  background: #100f0d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 150px;
  margin-bottom: 16px;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-main);
}

.specimen-body.font-sans {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.specimen-body .inkbolt-b,
.specimen-body b {
  color: var(--accent);
  font-weight: 700;
}

.specimen-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
}

.specimen-slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.specimen-slider-group label {
  color: var(--text-muted);
  white-space: nowrap;
}

.specimen-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 100px;
  background: rgba(235, 225, 210, 0.14);
  outline: none;
  cursor: pointer;
}

.specimen-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.specimen-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.specimen-val {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  min-width: 36px;
}

/* ==========================================================================
   E-Books & Documents Section (Prominent & Crafted)
   ========================================================================== */
.ebooks-section {
  max-width: 1140px;
  margin: 60px auto;
  padding: 0 24px;
}

.ebooks-card {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: center;
}

@media (max-width: 860px) {
  .ebooks-card {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
}

.ebooks-content h2 {
  margin-bottom: 12px;
}

.ebooks-content p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.format-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.format-card {
  background: #110f0d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s ease;
}

.format-card:hover {
  border-color: var(--border-strong);
}

.format-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--accent);
  min-width: 52px;
  text-align: center;
}

.format-text h4 {
  margin: 0 0 2px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.format-text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ==========================================================================
   Principles / How it works
   ========================================================================== */
.principles-section {
  max-width: 1140px;
  margin: 70px auto;
  padding: 0 24px;
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
}

.section-intro h2 {
  margin-bottom: 10px;
}

.section-intro p {
  font-size: 16px;
}

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

@media (max-width: 820px) {
  .principles-grid {
    grid-template-columns: 1fr;
  }
}

.principle-card {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.principle-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.principle-num {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 12px;
}

.principle-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.principle-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
}

/* ==========================================================================
   Web Search & Research
   ========================================================================== */
.search-section {
  max-width: 1140px;
  margin: 60px auto;
  padding: 0 24px;
}

.search-box-card {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
}

@media (max-width: 820px) {
  .search-box-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

.search-specimen {
  background: #100f0d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.search-header-mock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.search-header-mock svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.search-result-mock {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.search-result-mock .mock-title {
  color: #8bb2ea;
  font-weight: 600;
  margin-bottom: 4px;
}

.search-result-mock b {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
  max-width: 780px;
  margin: 60px auto 80px;
  padding: 0 24px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

details {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: border-color 0.2s ease;
}

details[open] {
  border-color: var(--border-strong);
  background: var(--surface);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-main);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

details a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Footer — Sleek bar matching the navigation bar exactly
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 1000;
  border-top: 1px solid var(--border);
  background: #141210;
  box-shadow: 0 50vh 0 0 #141210;
  font-size: 13.5px;
  color: var(--text-faint);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bg-video {
    display: none;
  }

  .btn::before {
    transition: none !important;
  }
}