/* Lexaro — base styles. System fonts only, no web-font requests. */

:root {
  --ink: #1e3a5f;
  --paper: #f8f7f4;
  --paper-alt: #eee6d2;
  --tile: #ffffff;
  --tile-border: #ded5be;
  --accent: #f4b942;
  --accent-ink: #1e3a5f;
  --changed: #1e3a5f;
  --changed-fg: #ffffff;
  --muted: #6b6659;
  --max-width: 1080px;
  --radius: 10px;
  font-size: 17px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--paper-alt);
  position: sticky;
  top: 0;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.logo img {
  height: 28px;
  width: 28px;
}

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

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

.main-nav a:hover { color: var(--ink); }

.main-nav .btn-primary,
.main-nav .btn-primary:hover {
  color: var(--paper);
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 0.95rem;
  border: none;
  transition: transform 0.12s ease;
}

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

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

/* Coming soon (pre-launch download state) */

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--tile);
  border: 1px solid var(--tile-border);
  border-radius: 999px;
  padding: 10px 20px 10px 10px;
}

.coming-soon .badge {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.coming-soon .coming-soon-text {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  color: var(--muted);
}

/* Hero */

.hero {
  padding: 72px 0 56px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 32px;
}

.store-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Tile chain demo */

.tile-chain {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tile-row {
  display: flex;
  gap: 8px;
  opacity: 0;
  animation: rise 0.5s ease forwards;
}

.tile-row:nth-child(1) { animation-delay: 0.05s; }
.tile-row:nth-child(2) { animation-delay: 0.25s; }
.tile-row:nth-child(3) { animation-delay: 0.45s; }
.tile-row:nth-child(4) { animation-delay: 0.65s; }
.tile-row:nth-child(5) { animation-delay: 0.85s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tile {
  width: 52px;
  height: 52px;
  background: var(--tile);
  border: 2px solid var(--tile-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.tile.changed {
  background: var(--changed);
  color: var(--changed-fg);
  border-color: var(--changed);
}

@media (prefers-reduced-motion: reduce) {
  .tile-row { animation: none; opacity: 1; }
}

/* Screenshot */

.screenshot-section {
  text-align: center;
}

.screenshot-gallery {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.screenshot-gallery img {
  max-width: 260px;
  width: 100%;
  border-radius: 14%;
  box-shadow: 0 24px 60px -24px rgba(30, 58, 95, 0.35);
}

/* Sections */

section { padding: 64px 0; }

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

h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.section-intro {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  background: var(--tile);
  border: 1px solid var(--paper-alt);
  border-radius: var(--radius);
  padding: 26px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* FAQ */

.faq-list { max-width: 720px; }

.faq-item {
  border-bottom: 1px solid var(--paper-alt);
  padding: 22px 0;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

/* Download CTA */

.download-cta {
  text-align: center;
}

.download-cta h2 { margin-bottom: 8px; }

.download-cta .section-intro { margin-left: auto; margin-right: auto; }

.download-cta .store-badges {
  justify-content: center;
  margin-top: 28px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--paper-alt);
  padding: 32px 0;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.copyright {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Legal pages */

.legal main {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.legal h1 { font-size: 2rem; margin-bottom: 8px; }

.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 40px;
}

.legal p, .legal li { color: #2c2924; }

.legal ul {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.legal li { margin-bottom: 0.4em; }

.legal a { color: var(--ink); text-decoration-color: var(--tile-border); }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .coming-soon { display: flex; width: fit-content; margin: 0 auto; }
  .hero .tile-chain { align-items: center; }
  .steps { grid-template-columns: 1fr; }
  .main-nav { gap: 16px; }
}

@media (max-width: 560px) {
  .main-nav a:not(.btn) { display: none; }
  .tile { width: 42px; height: 42px; font-size: 1.05rem; }
}
