/* Lagrange site. Sunward look: warm paper, ink, a serif head.
   No external files: the heading font is bundled (Fraunces, SIL Open Font License, see fonts/OFL-Fraunces.txt). */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --line: #E4E0D8;
  --line-soft: #EDEAE3;
  --ink: #1B1A17;
  --muted: #5F5B53;
  --faint: #8C877C;
  --accent: #2F4BD8;
  --gold: #C9963A;
  --satellite: #6A4BE0;
  --head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15140F;
    --surface: #1E1D18;
    --line: #2E2C26;
    --line-soft: #26241F;
    --ink: #F1EEE6;
    --muted: #B5AFA3;
    --faint: #8C877C;
    --accent: #8EA0FF;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); }
.brand span { font-family: var(--head); font-size: 1.35rem; letter-spacing: -0.01em; font-feature-settings: "liga" 0; }
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Headings */
h1, h2, h3 {
  font-family: var(--head);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-feature-settings: "liga" 0;
}
h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); margin: 0.4rem 0 1rem; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); margin: 2.6rem 0 0.8rem; }
h3 { font-size: 1.2rem; margin: 1.6rem 0 0.4rem; letter-spacing: -0.01em; }

.label { font-family: var(--head); font-style: italic; color: var(--muted); font-size: 1rem; }

/* Home: hero */
.hero { display: grid; gap: 2.5rem; padding: 2.5rem 0 1.5rem; align-items: center; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.15fr 1fr; padding-top: 4rem; } }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34rem; }
.cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.pill {
  display: inline-block; padding: 0.7rem 1.2rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 500;
}
.pill.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* Phone placeholders for screenshots */
.phones { display: flex; gap: 1rem; justify-content: center; }
.phone {
  width: 46%; max-width: 220px; aspect-ratio: 9 / 19.5;
  border-radius: 34px; border: 1px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--faint); font-size: 0.85rem; padding: 1rem;
  box-shadow: 0 1px 0 var(--line-soft), 0 18px 40px -24px rgba(27, 26, 23, 0.35);
}
.phone:nth-child(2) { margin-top: 2.5rem; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 33px; }

/* Cards */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid.three { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.card h3 { margin-top: 0; }
.card p { margin: 0.3rem 0 0; color: var(--muted); }

.orbit-mark { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--satellite); margin-right: 0.45rem; vertical-align: 0.1em; }

/* Long text pages (privacy, terms, support) */
.doc { max-width: var(--measure); padding: 2rem 0 3rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 0.35rem 0; }
.meta { color: var(--muted); font-size: 0.95rem; }
.summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.3rem; margin: 1.4rem 0 0.5rem;
}
.summary ul { margin: 0.3rem 0; }
.statement {
  border-left: 3px solid var(--gold); padding: 0.2rem 0 0.2rem 1rem; margin: 1rem 0;
}
details { border-top: 1px solid var(--line); padding: 0.9rem 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 500; }
details p { margin: 0.6rem 0 0; color: var(--muted); }

/* Placeholders the owner must fill in: visible on purpose */
.todo { background: rgba(201, 150, 58, 0.18); border-radius: 4px; padding: 0 0.2em; }

/* Footer */
.foot {
  border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 2.5rem;
  color: var(--muted); font-size: 0.92rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; justify-content: space-between;
}
.foot a { color: var(--muted); }
.foot nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { gap: 0.8rem; font-size: 0.9rem; }
  .brand span { font-size: 1.2rem; }
}
