/* Literaria.AI marketing — base.css
 * Hybrid: editorial body, bold hero
 * Display: Newsreader (Google Fonts variable)
 * Body: Inter Tight (Google Fonts variable)
 * Mono: JetBrains Mono (audit timestamps, code labels)
 */

:root {
  /* ——— Brand palette ——— */
  --ink: #1A2332;
  --ink-deep: #0F1721;
  --ink-soft: #2A3647;
  --paper: #FAFAF7;
  --paper-warm: #F4F1E8;
  --burnt: #B85C38;
  --burnt-soft: #D17C5A;
  --sage: #5A7A6E;
  --line: rgba(26, 35, 50, 0.10);
  --line-soft: rgba(26, 35, 50, 0.06);
  --line-bright: rgba(250, 250, 247, 0.14);

  /* ——— Type scale ——— */
  --font-display: "Newsreader", "Source Serif 4", Georgia, serif;
  --font-body: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-hero: clamp(2.75rem, 6vw, 5rem);
  --text-display: clamp(2rem, 4.5vw, 3.5rem);

  /* ——— Spacing ——— */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max-width: 76rem;
  --max-prose: 38rem;

  /* ——— Motion ——— */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;
  --dur-base: 280ms;
  --dur-slow: 480ms;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv11";
}

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

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

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

::selection {
  background: var(--burnt);
  color: var(--paper);
}

/* ——— Layout primitives ——— */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: var(--max-prose);
}

/* ——— Type primitives ——— */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burnt);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
}

p {
  margin: 0;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 0.5rem;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--burnt);
  color: var(--paper);
  border: 1px solid var(--burnt);
}

.btn-primary:hover {
  background: #A84F2C;
  border-color: #A84F2C;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-ghost-light {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-bright);
}

.btn-ghost-light:hover {
  background: rgba(250, 250, 247, 0.08);
  border-color: rgba(250, 250, 247, 0.4);
}

/* ——— Sections ——— */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.section-tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
}

.section-warm {
  background: var(--paper-warm);
}

.section-line {
  border-top: 1px solid var(--line);
}

/* ——— Header / Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.site-header.on-dark {
  background: var(--ink);
  border-bottom-color: transparent;
  color: var(--paper);
  /* No backdrop blur on dark — let the header read as part of the hero */
}

.site-header.on-dark .nav-links a {
  color: rgba(250, 250, 247, 0.85);
  opacity: 1;
}

.site-header.on-dark .nav-links a:hover,
.site-header.on-dark .nav-links a[aria-current="page"] {
  color: var(--paper);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 64px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.nav-logo .accent {
  color: var(--burnt);
  font-style: italic;
  font-weight: 400;
}

.site-header.on-dark .nav-logo {
  color: var(--paper);
}

.site-header.on-dark .nav-logo .accent {
  color: var(--burnt-soft);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  color: inherit;
  opacity: 0.78;
  transition: opacity var(--dur-fast) var(--ease);
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
  opacity: 1;
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--burnt);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ——— Footer ——— */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper);
  padding-block: 4rem 2rem;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-bright);
}

.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.55);
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.site-footer a {
  opacity: 0.78;
  transition: opacity var(--dur-fast) var(--ease);
}

.site-footer a:hover { opacity: 1; }

.site-footer .footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-top: 2rem;
  opacity: 0.55;
}

@media (max-width: 760px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .site-footer .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
