/* Lazy as · shared styles. Cream pages, ink sections, chunky keycaps, sticker chips. */
:root {
  --nap: #FFD23F;
  --nap-deep: #FFC21F;
  --ink: #1B1B1F;
  --ink-2: #26252B;
  --ink-3: #34323B;
  --pillow: #FFF6E0;
  --cream: #FFFBF1;
  --lilac: #B9A7FF;
  --lilac-soft: #E9E3FF;
  --alert: #FF4F3F;
  --alert-ink: #C8261A;
  --muted: #5F5A4D;
  --muted-dark: #B8B1A0;
  --line: #EADFC6;
  --line-dark: #3A3842;
  --white: #FFFFFF;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-soft: 0 18px 40px -18px rgba(27, 27, 31, 0.35);
  --font-display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1120px;
  --gutter: 16px;
  color-scheme: light;
}
@media (min-width: 700px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 17px/1.6 var(--font-body); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Subtle grain over everything (pointer-events off, decorative only). */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--alert); }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-weight: 900; font-size: clamp(2.5rem, 7vw, 4.6rem); }
h2 { font-weight: 900; font-size: clamp(1.9rem, 4.6vw, 3rem); }
h3 { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--font-mono); }
code { font-size: 0.86em; background: rgba(27, 27, 31, 0.07); padding: 0.12em 0.4em; border-radius: 6px; word-break: break-word; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--nap); padding: 10px 14px; border-radius: 10px; z-index: 200; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 251, 241, 0.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1.5px solid transparent; transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 900 1.35rem/1 var(--font-display); letter-spacing: -0.03em; white-space: nowrap; }
.brand img { width: 40px; height: 40px; margin: -4px; }
.brand:hover .brand-z { opacity: 1; transform: translate(0, -4px); }
.brand-z { font-size: 0.7rem; opacity: 0; transition: 0.3s; color: var(--muted); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; font-size: 0.98rem; }
.nav a:not(.btn):hover { background: var(--pillow); }
.nav a[aria-current="page"]:not(.btn) { background: var(--pillow); box-shadow: inset 0 0 0 1.5px var(--line); }
@media (max-width: 420px) {
  .brand span.brand-word { display: none; }
  .nav a:not(.btn) { padding: 8px 9px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 800 1rem/1 var(--font-display); letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--nap); color: var(--ink); box-shadow: var(--shadow-hard);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-sm { padding: 10px 16px; font-size: 0.95rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-lg { padding: 18px 28px; font-size: 1.15rem; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--pillow); box-shadow: none; transform: none; }
.btn-ink { background: var(--ink); color: var(--nap); }
.on-ink .btn { border-color: var(--nap); box-shadow: 4px 4px 0 var(--nap); }
.on-ink .btn:hover { box-shadow: 6px 6px 0 var(--nap); }
.on-ink .btn-ghost { color: var(--cream); border-color: var(--line-dark); box-shadow: none; }
.on-ink .btn-ghost:hover { background: var(--ink-2); box-shadow: none; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Keycaps */
.kbd, kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.1em;
  font: 700 0.86em/1 var(--font-mono); color: var(--ink); white-space: nowrap;
  padding: 0.42em 0.6em 0.48em; border-radius: 9px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4EFE2 100%);
  border: 1.5px solid var(--ink); border-bottom-width: 4px; vertical-align: 0.05em;
}
.kbd-lg { font-size: 1.15rem; padding: 0.5em 0.75em 0.55em; border-radius: 12px; }
.on-ink kbd, .on-ink .kbd { background: linear-gradient(180deg, #FFE27A 0%, var(--nap) 100%); }

/* Chips and stickers */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: 700 0.82rem/1 var(--font-body);
  padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--white); white-space: nowrap;
}
.chip-lilac { background: var(--lilac); }
.chip-nap { background: var(--nap); }
.chip-ink { background: var(--ink); color: var(--nap); }
.chip-red { background: var(--alert); color: var(--white); }
.sticker { transform: rotate(-3deg); box-shadow: 3px 3px 0 var(--ink); }
.sticker.r { transform: rotate(2.5deg); }
.eyebrow { font: 700 0.78rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 14px; display: block; }
.on-ink .eyebrow { color: var(--nap); }

/* Sections */
.section { padding-block: clamp(64px, 10vw, 112px); position: relative; }
.on-ink { background: var(--ink); color: var(--cream); }
.on-ink a { color: var(--cream); }
.on-ink code { background: rgba(255, 255, 255, 0.1); }
.on-pillow { background: var(--pillow); }
.on-nap { background: linear-gradient(180deg, var(--nap) 0%, var(--nap-deep) 100%); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { font-size: 1.15rem; color: var(--muted); margin-top: 16px; }
.on-ink .section-head p { color: var(--muted-dark); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.5; }
.center { text-align: center; margin-inline: auto; }

/* Cards */
.card { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-hard); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.on-ink .card { background: var(--ink-2); border-color: var(--line-dark); box-shadow: none; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.icon-badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--nap); border: 1.5px solid var(--ink); margin-bottom: 16px; }
.icon-badge svg { width: 24px; height: 24px; }
.on-ink .icon-badge { border-color: transparent; }
.icon-badge.lilac { background: var(--lilac); }
.icon-badge.red { background: var(--alert); color: var(--white); }

/* Callouts */
.note-box { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; background: var(--lilac-soft); margin: 20px 0; }
.note-box.warn { background: #FFE9E6; }
.note-box.tip { background: var(--pillow); }
.note-box strong:first-child { font-family: var(--font-display); font-weight: 900; }
.note-box p:last-child { margin-bottom: 0; }

/* Page hero for inner pages */
.page-hero { padding-block: clamp(48px, 8vw, 88px) clamp(28px, 4vw, 48px); }
.page-hero p { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin-top: 18px; }
.page-hero h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }

/* Footer */
.site-footer { background: var(--ink); color: var(--muted-dark); padding-block: 56px 40px; font-size: 0.95rem; }
.site-footer .wrap { display: grid; gap: 28px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-brand { display: flex; gap: 12px; align-items: center; color: var(--cream); font: 900 1.3rem/1 var(--font-display); text-decoration: none; }
.footer-brand img { width: 44px; height: 44px; }
.footer-tag { margin: 8px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--cream); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--nap); }
.footer-legal { border-top: 1px solid var(--line-dark); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.86rem; }
.footer-legal p { margin: 0; }

/* Sleepy z's */
.zzz { position: relative; display: inline-block; }
.zzz i { position: absolute; font: 900 1rem/1 var(--font-display); font-style: normal; color: var(--ink); opacity: 0; animation: float-z 3.6s ease-in infinite; }
.zzz i:nth-child(2) { animation-delay: 1.2s; font-size: 0.8rem; }
.zzz i:nth-child(3) { animation-delay: 2.4s; font-size: 1.2rem; }
@keyframes float-z {
  0% { opacity: 0; transform: translate(0, 0) rotate(-8deg); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(26px, -54px) rotate(14deg); }
}
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Accordions (FAQ, teasers) */
.faq-list { display: grid; gap: 12px; }
.faq-list details { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: 3px 3px 0 var(--ink); }
.faq-list summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 18px 20px; font: 800 1.08rem/1.3 var(--font-display);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--nap); border: 1.5px solid var(--ink); font: 900 1.2rem/1 var(--font-display); transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); background: var(--lilac); }
.faq-list details > :not(summary) { padding: 0 20px; }
.faq-list details > :last-child { padding-bottom: 18px; margin-bottom: 0; }
.faq-list details ol, .faq-list details ul { padding-left: 42px; }
.more-link { margin-top: 28px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .zzz i { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
