/* Libre Books marketing site - app palette + Inter, with the earlier atmospheric layout */

:root {
  /* From mobile/theme/palettes.ts lightColors */
  --canvas: #ffffff;
  --surface: #ffffff;
  --border: #e8e7e2;
  --border-strong: #dddbd3;
  --ink: #111111;
  --ink-soft: #626262;
  --muted: #919191;
  --on-accent: #ffffff;
  --accent: #111111;
  --accent-hover: #333333;
  --accent-soft: #f0efe9;
  --hairline: #f0efe9;
  --table-header: #f3f3f4;
  --warning: #b45309;
  --warning-bg: #ffedd5;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --focus: #005a9c;
  --overlay: rgba(0, 0, 0, 0.28);
  /* Soft washes using app warning amber + warm hairline neutrals */
  --wash-warm: #fff4e8;
  --wash-neutral: #f0efe9;
  --highlight: var(--warning-bg);
  --highlight-ink: var(--warning);

  --bg: #f7f7f5;
  --bg-deep: var(--hairline);
  --line: var(--border);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(17, 17, 17, 0.04);
  --max: 68rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 10% -10%, var(--wash-warm) 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 0%, var(--wash-neutral) 0%, transparent 45%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 245, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.logo:hover {
  color: var(--accent);
}

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.15rem;
}

.hero-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

@media (min-width: 720px) {
  .hero-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1rem 1rem;
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.55rem 0.35rem;
  border-radius: 6px;
  font-weight: 400;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--highlight);
}

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

  .site-nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.4rem 0.65rem;
  }
}

/* Hero */
.hero {
  padding: 3.75rem 0 3rem;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.25rem, 7.5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}

.hero-lead {
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.hero-note {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 0 1.75rem;
  max-width: 36rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 24px;
  padding: 0.875rem 1.25rem;
  font: inherit;
  font-weight: 400;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

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

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

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

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

.coming-soon {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 3rem 0;
}

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

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  line-height: 1.2;
}

.section-intro {
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0 0 1.75rem;
}

.benefit-list,
.audience-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .benefit-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .audience-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.benefit-list li,
.audience-list li {
  padding: 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.benefit-list h3,
.audience-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 400;
}

.benefit-list p,
.audience-list p {
  margin: 0;
  color: var(--ink-soft);
}

.plan-callout {
  background: var(--highlight);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem 1.45rem;
  max-width: 36rem;
  box-shadow: var(--shadow);
}

.plan-callout p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.plan-callout strong {
  color: var(--ink);
}

/* Pricing */
.price-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .price-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.price-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.price-item h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.price-amount {
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.price-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.price-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.price-disclaimer {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 40rem;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.contact-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.contact-list li {
  margin: 0 0 0.85rem;
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.form label {
  display: block;
  font-weight: 400;
  margin: 0 0 0.35rem;
}

.form .field {
  margin: 0 0 1rem;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}

.form textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.5rem 0 0;
}

/* Legal pages */
.prose {
  max-width: 44rem;
}

.prose h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.prose .meta {
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.prose h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 2rem 0 0.6rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.placeholder {
  background: #fff7d6;
  border: 1px dashed #c9a227;
  border-radius: 4px;
  padding: 0 0.2em;
  color: #6b5400;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--highlight);
  color: var(--highlight-ink);
  font-weight: 400;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}

/* Footer */
.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 237, 213, 0.45), rgba(243, 243, 244, 0.95));
  padding: 2.25rem 0 2.75rem;
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.55rem;
}

.site-footer p,
.site-footer a {
  color: var(--ink-soft);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0 0 0.35rem;
}

.site-footer a {
  text-decoration: none;
}

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

.footer-legal {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.page-main {
  padding-bottom: 1rem;
}
