
/* Layout: a draggable, endless plane of note tiles under a frosted header. Notes open by flying
   their cover and title into a reading column. Cream paper, deep-green ink, bold typewriter type,
   one hand-drawn chicken. */
:root {
  --cream: #F3EDE3;
  --paper: #FBF8F2;
  --ink: #182D09;
  --ink-soft: rgba(24, 45, 9, 0.62);
  --line: rgba(24, 45, 9, 0.14);
  --poop: #7A5634;
  --type: "Courier Prime", "Courier New", Courier, monospace;
  --serif: var(--type);
  --sans: var(--type);
  --mono: var(--type);
  --hh: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: var(--cream); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Grid ---------- */
#stage { position: fixed; inset: 0; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage.grabbing { cursor: grabbing; }
#par, #zoom { position: absolute; inset: 0; will-change: transform; }
.tile { position: absolute; left: 0; top: 0; display: block; text-decoration: none; color: var(--ink); will-change: transform; -webkit-user-drag: none; }
.tile:focus-visible { outline: none; }
.tile:focus-visible .frame { outline: 2px solid var(--ink); outline-offset: 6px; }
.ti { transform-origin: 50% 40%; }
.frame { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.media { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; -webkit-user-drag: none; pointer-events: none; }
.tile:hover .media, .tile:focus-visible .media { transform: scale(1.03); }
.tt { margin: 14px 0 0; font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; }
.tt-t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.u { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .3s ease; }
.tile:hover .u, .tile:focus-visible .u { background-size: 100% 1px; }
.meta { margin: 8px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
/* Text-only note: a green card with the title set large inside it */
.card { background: var(--ink); color: var(--cream); container-type: inline-size; display: flex; align-items: flex-end; padding: 7cqw; }
.card-t { font-family: var(--serif); font-weight: 700; font-size: 8cqw; line-height: 1.12; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card.media { transition: none; }
.tile:hover .card.media { transform: none; }
.tile.text:hover .frame, .tile.text:focus-visible .frame { outline: 1px solid var(--ink); outline-offset: 5px; }
@media (max-width: 700px) { .tt { font-size: 15px; margin-top: 10px; } .meta { font-size: 10px; } }

#cover { position: fixed; inset: 0; background: var(--cream); opacity: 0; pointer-events: none; z-index: 600; }

/* ---------- Note view ---------- */
#note { position: fixed; inset: 0; z-index: 700; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--hh) + env(safe-area-inset-top, 0px) + 40px) 20px 120px; }
.note-col { max-width: 44rem; margin: 0 auto; display: grid; gap: 0; }
.hero { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: visible; }
.media.noanim { transition: none !important; }
.frame, .hero { container-type: inline-size; }
.note-h { margin: 36px 0 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.note-h .tt-t { display: block; -webkit-line-clamp: unset; overflow: visible; }
.note-h .u { background: none; }
.note-rest { display: grid; gap: 0; }
.note-meta { margin: 18px 0 40px; font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); display: flex; gap: 18px; flex-wrap: wrap; }
.note-body p { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.7; text-indent: 1.5em; max-width: 36rem; }
.note-body p:first-child { text-indent: 0; }
.note-body p + p { margin-top: .2em; }
.note-body h2, .note-body h3, .note-body h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 1.6em 0 .5em; max-width: 36rem; }
.note-body h2 { font-size: 1.5rem; } .note-body h3 { font-size: 1.25rem; } .note-body h4 { font-size: 1.05rem; }
.note-body h2 + p, .note-body h3 + p, .note-body h4 + p, .note-body blockquote + p, .note-body ul + p, .note-body ol + p, .note-body hr + p, .note-body img + p { text-indent: 0; }
.note-body blockquote { margin: 1.2em 0; padding-left: 1.1em; border-left: 3px solid var(--ink); max-width: 34rem; }
.note-body blockquote p { text-indent: 0; font-style: italic; }
.note-body ul, .note-body ol { margin: .8em 0; padding-left: 1.4em; font-family: var(--serif); font-size: 18px; line-height: 1.7; max-width: 34rem; }
.note-body img { display: block; max-width: 100%; height: auto; margin: 1.4em 0; }
.note-body a { color: inherit; text-underline-offset: 3px; }
.note-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; max-width: 36rem; }
.note-body code { font-family: var(--mono); font-size: .92em; background: rgba(24,45,9,.06); padding: 0 .2em; }
.about-body p { margin: 0 0 1em; }
.note-end { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.slot { background: rgba(24,45,9,.06); border-bottom: 1px dashed rgba(24,45,9,.45); padding: 0 .1em; }
.close-note { position: fixed; z-index: 710; top: calc(var(--hh) + env(safe-area-inset-top, 0px) + 16px); right: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--cream) 90%, transparent); font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.close-note:hover { border-color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-transform: inherit; letter-spacing: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
#hdr { position: fixed; z-index: 900; top: 0; left: 0; right: 0; height: calc(var(--hh) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 20px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; background: rgba(243, 237, 227, .85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.name-link { justify-self: start; display: block; line-height: 0; }
.name-link { line-height: 0; text-decoration: none; }
.name-svg { height: 34px; width: auto; aspect-ratio: var(--name-ar); display: block; overflow: visible; }
.nm-ink { fill: var(--ink); stroke: none; }
.nm-pen { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.hdr-mid { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }
.hdr-right { justify-self: end; display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nl { position: relative; font-size: 14px; font-weight: 700; text-decoration: none; padding: 6px 0 10px; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nl svg { position: absolute; left: -2px; right: -2px; bottom: 0; width: calc(100% + 4px); height: 8px; overflow: visible; pointer-events: none; }
.nl svg path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1 2; stroke-dashoffset: 1.02; transition: stroke-dashoffset .35s ease; }
.nl:hover svg path, .nl:focus-visible svg path, .nl[aria-current="page"] svg path { stroke-dashoffset: 0; }
.ck-btn { width: 40px; height: 40px; display: block; cursor: pointer; line-height: 0; background: none; border: 0; padding: 0; }
.ck-btn svg { width: 100%; height: 100%; overflow: visible; }
.hdr-fade { transition: opacity .4s ease; }
body.intro .hdr-fade { opacity: 0; }
@media (max-width: 860px) {
  #hdr { grid-template-columns: auto 1fr auto; gap: 10px; padding-inline: 14px; }
  .hdr-mid { justify-self: center; gap: 13px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .hdr-mid::-webkit-scrollbar { display: none; }
  .nl { font-size: 12px; }
  .ck-btn { width: 30px; height: 30px; }
  .name-svg { height: 28px; }
}
@media (max-width: 380px) {
  .hdr-mid { gap: 9px; }
  .nl { font-size: 11px; }
  .name-svg { height: 24px; }
  .ck-btn { width: 26px; height: 26px; }
}

/* ---------- Chicken ---------- */
.ck { color: var(--ink); }
.ck-fill { fill: var(--paper); }
.ck-head { transform-box: fill-box; transform-origin: 50% 100%; }
.ck-body { transform-box: fill-box; transform-origin: 50% 100%; }
#poops { position: fixed; inset: 0; z-index: 950; pointer-events: none; overflow: hidden; }
.pp { position: absolute; left: 0; top: 0; width: 6px; height: 6px; will-change: transform, opacity; overflow: visible; }

/* ---------- Panels (list, about, subscribe) ---------- */
.panel { position: fixed; inset: 0; z-index: 800; background: var(--cream); overflow-y: auto; padding: calc(var(--hh) + env(safe-area-inset-top, 0px) + 48px) 20px 96px; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.panel.open { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.panel-col { max-width: 44rem; margin: 0 auto; display: grid; gap: 24px; }
.panel h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; }
.panel p { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.65; max-width: 36rem; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 18px 0; background: none; border: 0; cursor: pointer; text-align: left; }
.list .lt { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.3; }
.list .ld { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.list button:hover .lt { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sub-form { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-form label { width: 100%; }
.sub-form input { flex: 1 1 16rem; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: 16px var(--mono); color: var(--ink); }
.sub-form input:focus { outline: none; border-color: var(--ink); }
.sub-form button { height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream); font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.sub-msg { font-family: var(--mono); font-size: 12px; min-height: 1.3em; }
.menu-links { display: grid; gap: 6px; }
.menu-links button, .menu-links a { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.2; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: none; }
.panel-close { position: fixed; top: calc(var(--hh) + env(safe-area-inset-top, 0px) + 16px); right: 20px; }


/* ---------- Loader ---------- */
#loader { position: fixed; inset: 0; z-index: 1000; background: var(--cream); display: grid; place-items: center; cursor: pointer; }
#loader[hidden] { display: none; }
.loader-svg { width: min(40vw, 560px); height: auto; aspect-ratio: var(--name-ar); overflow: visible; }
@media (max-width: 700px) { .loader-svg { width: 70vw; } }

@media (prefers-reduced-motion: reduce) {
  .media, .u, .nl svg path, .panel, .hdr-fade { transition: none !important; }
}

/* Keep the badge above panels and below the opening loader. */
biamino-badge { --biamino-z: 980; }
