/* Look Up Family stories: the look of lookupfamily.space (Trirong light headings, Manrope text,
   white with cream panels, terracotta buttons, the same menu), checked against the live site 2026-10-26. */
:root {
  --ink: #0d141a; --soft: #56585e; --paper: #ffffff; --cream: #ffeacc; --cream-soft: #fff8e2;
  --terracotta: #cc6333; --terracotta-ink: #a84d24; --line: #e6e1d6;
  --mint: #def4f0; --lilac: #ebe4ff; --rose: #ffe8ef; --sky: #e3ebf9;
  --font-display: "Trirong", Georgia, "Times New Roman", serif;
  --font-text: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --radius: 28px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }

/* header, like the site's: logo left, menu right, white */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .logo img { height: 44px; width: auto; display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: flex-end; }
.site-nav a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 7px; }
@media (max-width: 720px) { .site-nav a:not(.keep) { display: none; } .site-nav { gap: 4px 16px; } }

/* type */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.kicker { font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; line-height: 1.12; margin: 0; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.4vw, 64px); max-width: 16ch; }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 400; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--soft); max-width: 60ch; margin: 18px 0 0; }

/* buttons: the site's pill */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-text); font-size: 16px; font-weight: 500; text-decoration: none; padding: 13px 24px; border-radius: 28px; border: 0; cursor: pointer; transition: background .15s, color .15s, transform .12s; white-space: nowrap; }
.btn.primary { background: var(--terracotta); color: #fff; }
.btn.primary:hover { background: var(--cream); color: var(--ink); }
.btn.soft { background: var(--cream); color: var(--ink); }
.btn.soft:hover { background: var(--terracotta); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
.textlink { font-weight: 500; color: var(--terracotta-ink); text-decoration: underline; text-underline-offset: 5px; }

/* hero */
.hero { padding: clamp(40px, 7vw, 84px) 0 clamp(28px, 4vw, 48px); }

/* the four books */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding: 8px 0 56px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card > a.coverlink { display: block; }
.card img.cover { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.card .meta { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .theme { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--soft); font-size: 16px; }
.card .links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: auto; padding-top: 10px; }

/* cream panel */
.panel { background: var(--cream); border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); display: grid; gap: 14px; margin: 0 0 56px; }
.panel.two { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 32px; }
.panel .mini { background: var(--paper); border-radius: 22px; padding: 22px; display: grid; gap: 10px; }
.panel p { margin: 0; }
@media (max-width: 760px) { .panel.two { grid-template-columns: 1fr; } }

/* footer, like the site's */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--soft); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.site-foot a { color: var(--soft); }

/* the reader page */
body.reader { height: 100%; overflow: hidden; }
html.reader { height: 100%; }
.reader .app { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--cream-soft); }
.reader .site-head { flex: none; }
.reader .site-head .title { font-family: var(--font-display); font-size: 18px; font-weight: 400; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader .stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; min-height: 0; }
.reader .book { position: relative; display: flex; gap: 0; box-shadow: 0 18px 50px rgba(13, 20, 26, .16); background: var(--paper); border-radius: 8px; overflow: hidden; }
.reader .leaf { position: relative; background: var(--paper); overflow: hidden; }
.reader .leaf img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.reader .leaf.blank { background: var(--cream); }
.reader .leaf::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.reader .book.spread .leaf.l::after { background: linear-gradient(to left, rgba(0,0,0,.10), rgba(0,0,0,0) 10%); }
.reader .book.spread .leaf.r::after { background: linear-gradient(to right, rgba(0,0,0,.10), rgba(0,0,0,0) 10%); }
.reader .book.anim .leaf img { animation: turn .32s ease-out; }
@keyframes turn { from { opacity: 0; transform: translateX(var(--dir, 10px)); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reader .book.anim .leaf img { animation: none; } }
.reader .hit { position: absolute; top: 0; bottom: 0; width: 38%; cursor: pointer; }
.reader .hit.prev { left: 0; } .reader .hit.next { right: 0; }
.reader .bar { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 12px max(14px, env(safe-area-inset-bottom)); flex-wrap: wrap; background: var(--paper); border-top: 1px solid var(--line); }
.reader .bar .btn { padding: 11px 18px; font-size: 15px; }
.reader .counter { font-weight: 700; font-size: 14px; min-width: 70px; text-align: center; color: var(--soft); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .reader .bar .btn { padding: 10px 14px; font-size: 14px; } .reader .site-head .title { display: none; } }
