/* Chatlore website: Album look (light) and Lamplight (dark), same tokens as the app (docs/design.md). */
@font-face { font-family: "Lora"; src: url("fonts/Lora-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/Lora-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("fonts/AlbertSans-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("fonts/AlbertSans-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --ground: #FFFFFF; --sheet: #F5F6F8; --line: #E6E3EA; --ink: #1E1B22; --ink2: #3D3944; --muted: #5E5A66;
  --accent: #8C2D52; --on-accent: #FFFFFF; --soft: #F6E8EE; --gold: #A47B32; --me: #F3E3EA; --them: #F1F1F4;
  --photo1: #BFD3D6; --photo2: #5F7F93; --shadow: 0 1px 2px rgba(30, 27, 34, .06), 0 8px 24px rgba(30, 27, 34, .08);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #16131B; --sheet: #221E29; --line: #332D3B; --ink: #F2ECE6; --ink2: #D9D1DC; --muted: #B0A7B6;
    --accent: #F4B48C; --on-accent: #2A1A10; --soft: #43352C; --gold: #E2BE73; --me: #4A3A33; --them: #2A2532;
    --photo1: #6E4C5C; --photo2: #E3B07E; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 18px/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(34px, 6vw, 56px); letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 4vw, 34px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 9; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 24px var(--serif); color: var(--ink); text-decoration: none; }
.brand img { border-radius: 10px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--ink2); text-decoration: none; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; font-size: 16px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--soft); color: var(--accent); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 28px; padding-bottom: 56px; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; margin-bottom: 10px; }
.lede { font-size: 20px; color: var(--ink2); max-width: 36em; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 12px; }
.badge { display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 8px 20px; border-radius: 14px; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; }
.badge small { color: var(--muted); font-weight: 400; font-size: 14px; }
.badge.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.badge.primary small { color: var(--on-accent); opacity: .85; }
.works { color: var(--muted); font-size: 16px; }

/* Phone previews (drawn in HTML: fictional people only) */
.previews { display: flex; gap: 18px; justify-content: center; align-items: flex-start; }
.phone { width: 250px; border-radius: 36px; padding: 18px 14px 20px; background: var(--ground); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; }
.phone.lamp { --ground: #16131B; --sheet: #221E29; --line: #332D3B; --ink: #F2ECE6; --ink2: #D9D1DC; --muted: #B0A7B6; --accent: #F4B48C; --soft: #43352C; --me: #4A3A33; --them: #2A2532; --on-accent: #2A1A10; background: #16131B; color: #F2ECE6; margin-top: 46px; }
.phone .bar { display: flex; align-items: center; gap: 10px; padding: 0 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--accent); display: grid; place-items: center; font: 600 15px var(--serif); }
.phone .who { font: 600 16px var(--serif); line-height: 1.2; }
.phone .who small { display: block; font: 400 12px var(--sans); color: var(--muted); }
.day { text-align: center; margin: 8px 0; }
.day span { background: var(--sheet); color: var(--muted); font-size: 11px; padding: 3px 10px; border-radius: 99px; }
.b { max-width: 82%; padding: 7px 11px 6px; border-radius: 14px; margin: 5px 0; line-height: 1.35; box-shadow: 0 1px 1px rgba(0, 0, 0, .04); }
.b.them { background: var(--them); border-top-left-radius: 4px; }
.b.me { background: var(--me); margin-left: auto; border-top-right-radius: 4px; }
.b time { display: block; text-align: right; font-size: 10px; color: var(--muted); }
.ph { height: 96px; border-radius: 10px; background: linear-gradient(135deg, var(--photo1), var(--photo2)); margin-bottom: 4px; position: relative; overflow: hidden; }
.ph::after { content: ""; position: absolute; left: 18%; bottom: -30%; width: 64%; height: 70%; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.voice { display: flex; align-items: center; gap: 8px; }
.voice .play { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.voice .play::before { content: ""; border-left: 8px solid var(--on-accent, #fff); border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 2px; }
.wave { flex: 1; height: 18px; background: repeating-linear-gradient(90deg, var(--accent) 0 2px, transparent 2px 5px); opacity: .55; border-radius: 2px; }
.hit { background: rgba(196, 150, 60, .35); border-radius: 3px; padding: 0 2px; }
.mem .k { color: var(--accent); font: 400 13px var(--serif); margin: 4px 0 8px; }
.mem .q { font: 500 19px/1.35 var(--serif); margin: 0 0 10px; }
.mem .ph { height: 120px; margin: 10px 0; }
.mem .meta { color: var(--muted); font-size: 12px; }
.mem .btn { display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 99px; background: var(--soft); color: var(--accent); font-weight: 600; font-size: 13px; }

/* Sections */
section { padding: 52px 0; border-top: 1px solid var(--line); }
.sub { color: var(--muted); font-size: 19px; max-width: 40em; margin-bottom: 28px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--sheet); border-radius: 18px; padding: 22px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 19px var(--serif); margin-bottom: 12px; }
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.tile { border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: var(--ground); }
.tile p { color: var(--ink2); margin: 0; }
.promise { background: var(--soft); border-radius: 22px; padding: 28px; }
.promise ul { margin: 0; padding-left: 1.2em; }
.promise li { margin: 6px 0; }
.fine { color: var(--muted); font-size: 15px; }

/* Text pages */
.page { max-width: 760px; padding-top: 18px; padding-bottom: 64px; }
.page h2 { margin-top: 1.6em; }
.page li { margin: 6px 0; }
.page .updated { color: var(--muted); font-size: 15px; }
.howto { counter-reset: h; list-style: none; padding: 0; }
.howto li { counter-increment: h; position: relative; padding: 14px 16px 14px 62px; background: var(--sheet); border-radius: 14px; margin: 10px 0; }
.howto li::before { content: counter(h); position: absolute; left: 16px; top: 13px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 600 16px var(--serif); }
.howto li small { display: block; color: var(--muted); font-size: 16px; margin-top: 2px; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.tabs a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 99px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.tabs a:hover { border-color: var(--accent); color: var(--accent); }
details { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; }
details p { color: var(--ink2); }
kbd, .menu { font-family: var(--sans); font-weight: 600; background: var(--soft); color: var(--accent); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.contact { display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: 15px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.studio { display: inline-flex; align-items: center; gap: 12px; color: var(--ink2); text-decoration: none; }
.studio img { height: 34px; width: auto; }
.studio .dark { display: none; }
@media (prefers-color-scheme: dark) { .studio .light { display: none; } .studio .dark { display: inline; } }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot nav a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .steps, .grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .previews { gap: 10px; }
  .phone { width: 46%; min-width: 0; padding: 14px 10px; border-radius: 26px; font-size: 12px; }
  .phone.lamp { margin-top: 30px; }
  .mem .q { font-size: 15px; }
  .ph { height: 70px; }
  .mem .ph { height: 80px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
