/* Lore website — one shared stylesheet. No external requests: fonts are self-hosted in /fonts/. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter_semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source_serif_4_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source_serif_4_semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens (palette from the app icon) ---------- */

:root {
  color-scheme: light dark;

  --bg: #FFFAF3;
  --panel: #FBECDC;
  --panel-soft: #FEF5EA;
  --text: #22180F;
  --muted: #5E4B3C;
  --accent: #BD3F0B;
  --border: #EEDCC8;
  --vivid-from: #F25C05;
  --vivid-to: #FFB020;
  --on-vivid: #2A1408;
  --shadow: 0 1px 2px rgba(34, 24, 15, 0.06), 0 8px 24px rgba(34, 24, 15, 0.06);

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;

  --radius: 18px;
  --radius-sm: 12px;
  --wide: 68rem;
  --prose: 40rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1714;
    --panel: #2A221D;
    --panel-soft: #241D19;
    --text: #FCF4EA;
    --muted: #CBBBAA;
    --accent: #FF8F40;
    --border: #3A2F28;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

h3 {
  font-size: 1.25rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--panel);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}

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

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted {
  color: var(--muted);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.35rem;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0;
  display: inline-block;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: var(--on-vivid);
  background: linear-gradient(135deg, var(--vivid-from), var(--vivid-to));
  box-shadow: var(--shadow);
}

.button:hover {
  filter: brightness(1.04);
}

.button-quiet {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.button-quiet:hover {
  background: var(--panel-soft);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vivid-from), var(--vivid-to));
}

.lede {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Phone-shaped slot. A real screenshot (1080×2400-ish, portrait) drops in
   as <img class="hero-shot-img"> and fills the same frame. */
.hero-shot {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 300px;
}

.phone {
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  padding: 10px;
  background: var(--text);
  box-shadow: var(--shadow), 0 30px 60px -20px rgba(242, 92, 5, 0.25);
}

.phone-screen {
  height: 100%;
  border-radius: 29px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem 0.85rem 0.85rem;
  font-size: 0.72rem;
  line-height: 1.45;
}

.hero-shot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 29px;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.mock-bar img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.mock-user {
  align-self: flex-end;
  max-width: 85%;
  background: var(--panel);
  padding: 0.5rem 0.7rem;
  border-radius: 14px 14px 4px 14px;
}

.mock-widget {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
}

.mock-widget::before {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--vivid-from);
}

.mock-line {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--panel);
}

.mock-line.w90 { width: 90%; }
.mock-line.w75 { width: 75%; }
.mock-line.w60 { width: 60%; }

.mock-composer {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
}

.section-alt {
  background: var(--panel-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--on-vivid);
  background: linear-gradient(135deg, var(--vivid-from), var(--vivid-to));
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card h3 svg {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  color: var(--accent);
}

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

.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  vertical-align: middle;
}

.leaves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.leaves li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.leaves strong {
  display: block;
  margin-bottom: 0.25rem;
}

.leaves span {
  color: var(--muted);
}

.never {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.never p:last-child {
  margin-bottom: 0;
}

.reqs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.reqs div {
  border-top: 2px solid var(--accent);
  padding-top: 0.9rem;
}

.reqs dt {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
}

.reqs dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

/* ---------- Prose pages (privacy, support) ---------- */

.page {
  padding: clamp(2.5rem, 7vw, 4rem) 0 clamp(3rem, 8vw, 5rem);
}

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

.prose h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.6rem);
  margin-top: 2.25rem;
}

.prose h3 {
  margin-top: 1.5rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

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

.callout {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}

.callout p:last-child,
.callout ul:last-child,
.callout ol:last-child {
  margin-bottom: 0;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.25rem 0;
}

.faq details:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 0.85rem 2rem 0.85rem 0;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.7rem;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > :not(summary) {
  color: var(--muted);
}

.not-found {
  text-align: center;
  padding: clamp(4rem, 14vw, 8rem) 0;
}

.not-found .hero-actions {
  justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer p {
  margin: 0;
}

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

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

/* ---------- Utilities ---------- */

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-shot {
    max-width: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
