/* ============================================================================
   Lisnara — studio design system. Editorial atelier: bone + ink + one brass accent.
   Display: Newsreader (serif, italic for emphasis). Body: Hanken Grotesk.
   App pages add `class="app-keepsy"` on <body> to swap the accent to the app's color.
   ========================================================================== */
:root {
  --ink: #18140e;
  --bone: #ede7db;
  --bone-2: #e3dacb;
  --surface: #f4efe5;
  --brass: #a87c2f;
  --brass-bright: #c2954a;
  --taupe: #6f665a;
  --line: #d9d0c0;
  --on-ink: #ede7db;
  --on-ink-muted: #9a8f7e;

  --accent: var(--brass);
  --accent-bright: var(--brass-bright);

  --maxw: 1140px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Keepsy product page swaps the accent; studio chrome (ink/brass) stays. */
body.app-keepsy { --accent: #e8722e; --accent-bright: #f08a4b; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint paper grain over everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(44px, 8vw, 104px); }
em, .it { font-style: italic; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
}

/* ---- staggered load reveal ---- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.16s; } .d3 { animation-delay: 0.27s; }
.d4 { animation-delay: 0.38s; } .d5 { animation-delay: 0.49s; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; } }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bone) 82%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.on-ink {
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  border-bottom-color: color-mix(in srgb, var(--on-ink) 16%, transparent);
}
.site-header.on-ink .logo .word, .site-header.on-ink nav a { color: var(--on-ink); }
.site-header.on-ink nav a:hover { color: var(--accent-bright); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo:hover { text-decoration: none; }
.logo img { width: 24px; height: 24px; }
.logo .word { font-family: var(--serif); font-size: 25px; letter-spacing: -0.02em; color: var(--ink); font-weight: 500; }
.site-header nav a { color: var(--ink); font-size: 14.5px; font-weight: 500; margin-left: 26px; }
.site-header nav a:hover { color: var(--accent); text-decoration: none; }
.site-header nav a.on { color: var(--accent); }

/* ---- Ink field (hero / footer) ---- */
.ink { background: var(--ink); color: var(--on-ink); }
.ink h1, .ink h2 { color: var(--on-ink); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: clamp(70px, 13vw, 150px) 0 clamp(60px, 10vw, 120px); }
.hero::after {
  content: ""; position: absolute; right: -10%; top: -20%; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 14ch; }
.hero h1 .it { color: var(--accent-bright); }
.hero .lead { font-family: var(--serif); font-size: clamp(19px, 2.4vw, 26px); line-height: 1.45; color: var(--on-ink-muted); max-width: 46ch; margin: 28px 0 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 44px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 2px; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-accent { background: var(--accent); color: #1a120a; }
.btn-accent:hover { background: var(--accent-bright); text-decoration: none; transform: translateY(-2px); }
.btn-ghost { border-color: color-mix(in srgb, var(--on-ink) 35%, transparent); color: var(--on-ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); text-decoration: none; }
.btn-ink { background: var(--ink); color: var(--bone); }
.btn-ink:hover { background: #2a2318; text-decoration: none; transform: translateY(-2px); }

/* ---- Generic section ---- */
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 52px); margin: 14px 0 0; }
.section-head p { color: var(--taupe); font-size: 18px; margin-top: 16px; }

/* ---- Ethos: two-column statement ---- */
.statement { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.statement .big { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 38px); line-height: 1.28; letter-spacing: -0.01em; }
.statement .big em { color: var(--accent); }
.statement .cols { color: var(--taupe); font-size: 16.5px; }
.statement .cols p + p { margin-top: 1em; }

/* ---- Catalogue (apps) ---- */
.catalogue { border-top: 1px solid var(--ink); }
.entry {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 28px; align-items: center;
  padding: 38px 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.25s ease;
}
.entry:hover { padding-left: 12px; }
.entry:hover h3 { color: var(--accent); }
.entry .idx { font-family: var(--serif); font-size: 22px; color: var(--taupe); font-style: italic; }
.entry .body { display: flex; align-items: center; gap: 18px; }
.entry .appmark { width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto; }
.entry h3 { font-size: clamp(26px, 3.4vw, 40px); transition: color 0.2s ease; }
.entry .desc { color: var(--taupe); font-size: 15.5px; margin-top: 4px; max-width: 52ch; }
.entry .swatch { width: 11px; height: 11px; border-radius: 999px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.entry .go { font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--accent); white-space: nowrap; }
.entry.soon { opacity: 0.5; }
.entry.soon:hover { padding-left: 0; }
.entry.soon:hover h3 { color: var(--on-ink); color: var(--ink); }
.entry.soon .go { color: var(--taupe); }

/* ---- Pillars / cards ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cell { background: var(--bone); padding: 34px 30px; }
.cell .n { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.cell h3 { font-size: 22px; margin: 12px 0 8px; }
.cell p { color: var(--taupe); font-size: 15.5px; margin: 0; }

/* ---- Footer ---- */
.site-footer { padding: clamp(56px, 8vw, 96px) 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid color-mix(in srgb, var(--on-ink) 18%, transparent); }
.footer-top .word { font-family: var(--serif); font-size: 34px; color: var(--on-ink); display: inline-flex; align-items: center; gap: 12px; }
.footer-top .word img { width: 28px; height: 28px; }
.footer-top p { color: var(--on-ink-muted); max-width: 34ch; margin-top: 14px; font-size: 15px; }
.fcol h4 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-ink-muted); margin-bottom: 16px; }
.fcol a { display: block; color: var(--on-ink); font-size: 15px; margin-bottom: 10px; }
.fcol a:hover { color: var(--accent-bright); text-decoration: none; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; color: var(--on-ink-muted); font-size: 13.5px; }

/* ---- App hero (keepsy page) ---- */
.app-hero { padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 90px); }
.app-hero .badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent); padding: 6px 14px; border-radius: 999px;
}
.app-hero .lockup { display: flex; align-items: center; gap: 16px; margin: 26px 0 6px; }
.app-hero .lockup img { width: 56px; height: 56px; }
.app-hero .lockup .name { font-family: var(--serif); font-size: clamp(40px, 7vw, 76px); }
.app-hero .tagline { font-family: var(--serif); font-size: clamp(22px, 3vw, 34px); line-height: 1.2; max-width: 18ch; margin: 8px 0 0; }
.app-hero .tagline em { color: var(--accent); }
.app-hero .lead { color: var(--taupe); font-size: 18.5px; max-width: 50ch; margin: 22px 0 30px; }

/* ---- Legal ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 64px 28px 90px; }
.legal .updated { color: var(--taupe); font-size: 13.5px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); margin: 6px 0 18px; }
.legal h2 { font-size: 25px; margin-top: 42px; }
.legal h3 { font-family: var(--sans); font-weight: 600; font-size: 17px; margin-top: 26px; }
.legal p, .legal li { color: #322c22; font-size: 16px; }
.legal ul { padding-left: 22px; } .legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-weight: 600; }
.legal .note { background: var(--bone-2); border-left: 3px solid var(--accent); border-radius: 8px; padding: 14px 18px; font-size: 15px; }
.legal .back { display: inline-block; margin-top: 36px; font-weight: 600; }

@media (max-width: 820px) {
  .statement, .grid-3, .footer-top { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 44px 1fr; }
  .entry .go { grid-column: 2; }
  .site-header nav a:first-child { display: none; }
}
