/* LogHom, loghom.com
   A record book, not a brochure. The layout is the message: everything filed,
   ruled, and easy to find. */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&family=Newsreader:ital,opsz,wght@1,6..72,400;1,6..72,500&display=swap');

@view-transition { navigation: auto; }

:root {
  --ink: #131c2b;
  --ink-soft: #3f4c5f;
  --muted: #6a7686;
  --bg: #fbfbf9;
  --surface: #ffffff;
  --accent: #2f5288;
  --accent-2: #7fa8d9;
  --band: #0d1522;
  --band-ink: #dbe4f0;
  --border: rgba(19, 28, 43, 0.10);
  --rule: rgba(19, 28, 43, 0.08);
  --shadow: 0 1px 2px rgba(19,28,43,.05), 0 10px 28px -14px rgba(19,28,43,.16);
  --shadow-lift: 0 2px 4px rgba(19,28,43,.05), 0 22px 44px -18px rgba(19,28,43,.22);
  --sky-a: #d4e2f3;
  --sky-b: #f2e9dc;
  --sky-c: #e2ecf7;
  /* section accents, borrowed from the app's form colors */
  --c-doc: #8c7433;
  --c-search: #2f5288;
  --c-shield: #6a3f9e;
  --c-leaf: #4d7a48;
  --c-note: #4d73a6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecf1f8;
    --ink-soft: #b6c1d1;
    --muted: #8a96a8;
    --bg: #0c121d;
    --surface: #141c2b;
    --accent: #93b8e8;
    --accent-2: #4a6da0;
    --band: #060b14;
    --band-ink: #d6e1f0;
    --border: rgba(236, 241, 248, 0.10);
    --rule: rgba(236, 241, 248, 0.08);
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px -14px rgba(0,0,0,.55);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.4), 0 22px 44px -18px rgba(0,0,0,.65);
    --sky-a: #17253e;
    --sky-b: #262031;
    --sky-c: #111e33;
    --c-doc: #c7ab5e;
    --c-search: #8fb4e4;
    --c-shield: #ab8ad6;
    --c-leaf: #8db884;
    --c-note: #88a9d4;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0; background: var(--bg); color: var(--ink);
  line-height: 1.65; font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-2); color: #fff; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 28px; }

em.serif {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic; font-weight: 500; letter-spacing: 0;
}

/* ---------- nav ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  border-bottom: 1px solid var(--border);
}
.navbar .wrap { display: flex; align-items: center; gap: 26px; height: 58px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1em; letter-spacing: -0.01em;
  color: var(--ink) !important; margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: var(--shadow); }
.navbar a:not(.brand) { color: var(--ink-soft); font-size: 0.9em; font-weight: 500; }
.navbar a:not(.brand):hover { color: var(--accent); text-decoration: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; text-align: center; padding: 96px 0 104px; }
.hero .sky {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(52% 44% at 22% 16%, var(--sky-a) 0%, transparent 70%),
    radial-gradient(46% 40% at 82% 24%, var(--sky-b) 0%, transparent 70%),
    radial-gradient(64% 54% at 55% 92%, var(--sky-c) 0%, transparent 72%);
  animation: drift 30s ease-in-out infinite alternate;
}
/* faint ruled lines, like a record book page */
.hero .sky::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 43px, var(--rule) 43px 44px);
  mask-image: linear-gradient(to bottom, transparent 18%, black 55%, transparent 96%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 18%, black 55%, transparent 96%);
}
@keyframes drift {
  from { transform: translate3d(-2%, 0, 0) scale(1.05); }
  to   { transform: translate3d(2%, -2%, 0) scale(1.1); }
}
.hero img.icon {
  width: 96px; height: 96px; border-radius: 22px;
  box-shadow: var(--shadow-lift);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.9rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
  margin: 30px auto 12px; max-width: 760px;
}
.hero p.lede {
  max-width: 520px; margin: 0 auto 36px;
  font-size: 1.14em; color: var(--ink-soft);
}

/* the five tabs: scattered paper settling into a tidy row */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 34px auto 30px; padding: 0; list-style: none; }
.tabs li {
  position: relative; padding: 9px 18px 9px 30px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; font-weight: 600; font-size: 0.93em;
  box-shadow: var(--shadow);
  animation: settle 1s cubic-bezier(.2,.85,.25,1) backwards;
}
.tabs li::before {
  content: ""; position: absolute; left: 13px; top: 50%; margin-top: -4px;
  width: 8px; height: 8px; border-radius: 3px; background: var(--tab-c, var(--accent-2));
}
.tabs li:nth-child(1) { --tab-c: var(--c-doc);    --r: -7deg; animation-delay: .1s; }
.tabs li:nth-child(2) { --tab-c: var(--c-shield); --r:  5deg; animation-delay: .22s; }
.tabs li:nth-child(3) { --tab-c: var(--c-leaf);   --r: -4deg; animation-delay: .34s; }
.tabs li:nth-child(4) { --tab-c: var(--c-search); --r:  6deg; animation-delay: .46s; }
.tabs li:nth-child(5) { --tab-c: var(--c-note);   --r: -5deg; animation-delay: .58s; }
@keyframes settle {
  from { opacity: 0; transform: translateY(26px) rotate(var(--r, 0deg)) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink); padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.92em; box-shadow: var(--shadow);
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent);
}

/* ---------- chapters: a numbered ledger ---------- */
.chapter { padding: 76px 0 12px; }
.chapter-grid { display: grid; grid-template-columns: minmax(230px, .85fr) 1.5fr; gap: 26px 64px; align-items: start; }
.chapter-head { position: sticky; top: 92px; }
.kicker {
  display: flex; align-items: baseline; gap: 10px;
  color: var(--muted); font-weight: 600; font-size: 0.78em;
  text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 12px;
}
.kicker .num {
  font-family: "Newsreader", Georgia, serif; font-style: italic;
  font-size: 1.5em; color: var(--chapter-c, var(--accent));
  letter-spacing: 0; text-transform: none;
}
.chapter h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 750; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 10px;
}
.chapter .sub { color: var(--muted); margin: 0; font-size: 1.02em; max-width: 300px; }

.ledger { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger li {
  display: grid; grid-template-columns: 168px 1fr; gap: 20px;
  padding: 21px 6px; border-bottom: 1px solid var(--rule);
  align-items: baseline; transition: background .3s;
}
.ledger li:hover { background: color-mix(in srgb, var(--chapter-c, var(--accent)) 4%, transparent); }
.ledger h3 {
  margin: 0; font-size: 0.99em; font-weight: 650; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 10px;
}
.ledger h3::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 3px;
  background: var(--chapter-c, var(--accent-2)); transform: translateY(-1px);
}
.ledger p { margin: 0; color: var(--muted); font-size: 0.97em; }

#capture  { --chapter-c: var(--c-doc); }
#retrieve { --chapter-c: var(--c-search); }
#prepared { --chapter-c: var(--c-shield); }
#calm     { --chapter-c: var(--c-leaf); }

/* ---------- private band ---------- */
.band {
  margin-top: 92px; padding: 84px 0;
  background:
    radial-gradient(70% 90% at 18% 8%, rgba(74,109,160,.26) 0%, transparent 60%),
    radial-gradient(60% 80% at 85% 92%, rgba(127,168,217,.14) 0%, transparent 60%),
    var(--band);
  color: var(--band-ink);
  --chapter-c: var(--accent-2);
}
.band .kicker { color: color-mix(in srgb, var(--band-ink) 62%, transparent); }
.band .kicker .num { color: var(--accent-2); }
.band h2 { color: #fff; }
@media (prefers-color-scheme: dark) { .band h2 { color: var(--band-ink); } }
.band .sub { color: color-mix(in srgb, var(--band-ink) 74%, transparent); }
.band .ledger { border-color: rgba(255,255,255,.12); }
.band .ledger li { border-color: rgba(255,255,255,.09); }
.band .ledger li:hover { background: rgba(255,255,255,.04); }
.band .ledger h3 { color: #fff; }
@media (prefers-color-scheme: dark) { .band .ledger h3 { color: var(--band-ink); } }
.band .ledger p { color: color-mix(in srgb, var(--band-ink) 68%, transparent); }

/* ---------- closer ---------- */
.closer { text-align: center; padding: 100px 0; }
.closer h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.14;
  margin: 0 auto 30px; max-width: 640px;
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0 56px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
footer .copy { color: var(--muted); font-size: 0.88em; margin-right: auto; }
footer a { color: var(--muted); font-size: 0.88em; }
footer a:hover { color: var(--accent); }

/* ---------- article pages (privacy / support) ---------- */
article { max-width: 700px; margin: 0 auto; padding: 60px 28px 96px; }
article h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; }
article .updated { color: var(--muted); font-size: 0.9em; }
article h2 { font-size: 1.16em; font-weight: 650; letter-spacing: -0.01em; margin-top: 2.2em; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 24px; box-shadow: var(--shadow); margin-top: 16px;
}
.card h3 { margin: 0 0 6px; font-size: 1em; font-weight: 650; }
.card p { margin: 0; color: var(--muted); font-size: 0.96em; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
/* scroll-driven where supported; JS reveal is the fallback for the rest */
@supports (animation-timeline: view()) {
  .ledger li {
    animation: rise both;
    animation-timeline: view();
    animation-range: entry 0% entry 42%;
  }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-head { position: static; }
  .chapter .sub { max-width: none; }
  .ledger li { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .sky { animation: none; }
  .tabs li { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  @supports (animation-timeline: view()) { .ledger li { animation: none; } }
}
