/* the homepage loads this file but must not load base.css: do not fold it back into base.css */
.zone-overlay {
  position: fixed; inset: 0; z-index: 100;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(31, 120, 56, .18), rgba(12, 48, 22, .30));
}
.zone-overlay[hidden] { display: none; }

.zone-overlay__panel {
  position: absolute;
  z-index: 1;
  top: var(--zone-top, 8vh);
  left: 50%;
  translate: -50% 0;
  width: var(--zone-width, min(620px, calc(100vw - 36px)));
  height: var(--zone-height, 74vh);

  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
  -ms-overflow-style: none;

  border-radius: 14px;
  background: #fff; color: #111;

  --zone-pad: clamp(20px, calc(var(--zone-width, 5vw) * .085), 46px);
  padding: var(--zone-pad);
  animation: zone-in .19s ease-out;
}
.zone-overlay__panel::-webkit-scrollbar { width: 0; height: 0; display: none; }

.zone-overlay__panel:focus { outline: none; }

@keyframes zone-in { from { opacity: 0; transform: translateY(9px) scale(.988); } }

.zone-overlay__close {
  position: absolute;
  z-index: 2;   /* popup.js inserts the × before the panel; without this the panel swallows its taps */
  top: calc(var(--zone-top, 8vh) + 10px);
  right: calc(50% - (var(--zone-width, min(620px, calc(100vw - 36px))) / 2) + 10px);

  width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;

  background: none;
  color: var(--zone-accent, #6f5520);
  font-size: 19px; line-height: 1; font-weight: 400;
  transition: background .15s ease, color .15s ease;
}
.zone-overlay__close::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  translate: -50% -50%; width: 44px; height: 44px; border-radius: 50%;
}
/* Small controls keep their look and get a thumb-sized (44px) tap area, as the close button does. */
.zn-contact__btn, a.zn-contact__mail, .zn-artifacts__list a[data-enter] { position: relative; }
.zn-contact__btn::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  translate: -50% -50%; width: max(100%, 44px); height: max(100%, 44px);
}
a.zn-contact__mail::after, .zn-artifacts__list a[data-enter]::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  translate: 0 -50%; height: max(100%, 44px);
}
.zone-overlay__close:hover, .zone-overlay__close:focus-visible {
  color: #17150f;
}

.zone-overlay__close {
  -webkit-tap-highlight-color: transparent;
}
.zone-overlay__close:active {
  color: #17150f;
  scale: 0.86;
}
body.zone-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .zone-overlay__panel { animation: none; }
}

.zone-overlay__panel:has(.zone-card) {
  background: var(--card-paper, #fcfaf4);
  box-shadow: 0 18px 44px rgba(40, 26, 6, .28), 0 2px 6px rgba(40, 26, 6, .16);
}
.zone-overlay:has(.zone-card) { --zone-accent: var(--card-accent, #c9a227); }

.zone-card {
  --card-paper:  #fcfaf4;
  --card-ink:    #17150f;
  --card-accent: #c9a227;
  --card-bind:   rgba(23, 21, 15, .30);
  --u: var(--zone-width, 396px);

  --f-title: .04584;
  --f-logo:  calc(.0573 * 5.63);   /* .0573 is the old title size: logo and address stay pinned to it, not to --f-title */
  --f-mail:  calc((.0405 + .0573) / 2);
  --f-body:  .0405;
  --f-coda:  .0222;
  --f-bind:  .056;

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;

  min-height: 100%;
  display: flex;
  flex-direction: column;

  margin: 0;
  color: var(--card-ink);
  -webkit-font-smoothing: antialiased;
}

.zone-card__logo { display: block; width: calc(var(--u) * var(--f-logo)); height: auto; }

.zone-card__title {
  margin: 0 0 var(--zone-pad, 24px);
  font-size: calc(var(--u) * var(--f-title));
  font-weight: 400;
  line-height: 1.12;
  color: var(--card-accent);
  text-wrap: balance;
}

.zone-card__bind {
  /* DECLARED TEXTURE EXCEPTION: these px values draw the binding mark, not content; the lint allows them only while this phrase is here */
  height: 3px;
  margin-inline: calc(-1 * var(--zone-pad, 24px));
  margin-bottom: calc(var(--u) * var(--f-bind));
  background-image: radial-gradient(circle at center, var(--card-bind) 1.35px, transparent 1.45px);
  background-size: 9px 3px;
  background-repeat: repeat-x;
}

.zone-card__body {
  margin: calc(var(--zone-height, 643px) * .065) 0 auto;
  padding: 0;
  list-style: none;
  font-size: calc(var(--u) * var(--f-body));
  font-weight: 400;
  line-height: 1.62;
}
.zone-card__body > * + * { margin-top: .72em; }

.zone-card__coda {
  margin: 0;
  text-align: center;
  font-size: calc(var(--u) * var(--f-coda));
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: .01em;
}
.zone-card__coda p {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: -.01em;
  color: var(--card-accent);
  text-wrap: pretty;
}
.zone-card__coda cite {
  display: block;
  margin-top: .9em;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1em;
  font-style: normal;
  letter-spacing: .04em;
  color: var(--card-accent);
}

/* desktop type scale: popup.js sets data-layout */
.zone-overlay[data-layout="desktop"] .zone-card {
  --f-title: .01882;
  --f-logo:  calc(.0246 * 5.63);
  --f-mail:  calc((.0164 + .0246) / 2);
  --f-body:  .0164;
  --f-coda:  .0110;
  --f-bind:  .0167;
}
.zn-kenny > .zone-card__body { margin-bottom: calc(var(--u) * var(--f-body) * 1.62 * 2); }
.zn-kenny__social {
  --btn: calc(var(--u) * var(--f-body) * 2.4);
  --gap: calc(var(--u) * var(--f-body) * .5);
  display: grid;
  grid-template-columns: repeat(5, var(--btn));
  gap: var(--gap);
  justify-content: start;
  margin: auto 0 0;
}
.zone-overlay[data-layout="desktop"] .zn-kenny__social { --btn: calc(var(--u) * var(--f-body) * 2.733333); }
.zn-kenny__social .zn-contact__btn { width: 100%; aspect-ratio: 1; padding: 0; border-radius: 22%; }
.zn-kenny__social .zn-contact__ico--brand { width: 44%; height: 44%; }

:root {
  --contact-wash: linear-gradient(180deg, rgba(31, 120, 56, .26), rgba(12, 48, 22, .42));
}
@media (min-width: 820px) {
  :root {
    --contact-wash: linear-gradient(180deg, rgba(31, 120, 56, .26), rgba(12, 48, 22, .42));
  }
}
.zone-overlay[data-zone="contact"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--contact-wash);
}

body[data-zone="contact"] .zone-overlay__panel,
.zone-overlay__panel:has(.zn-contact) {
  box-shadow:
    0 0 10px 3px rgba(79, 208, 122, .85),
    0 0 26px 2px rgba(79, 208, 122, .34),
    0 18px 44px rgba(40, 26, 6, .28),
    0 2px 6px rgba(40, 26, 6, .16);
}

body[data-zone="contact"] .zone-overlay__panel,
.zone-overlay__panel:has(.zn-contact),
main.contact-shell,
main:has(.zn-contact),
body.contact-standalone {
  --card-paper: #faf6ec;
  background-color: var(--card-paper);

  /* one SVG path, not two gradients: crossing translucent gradients paint every intersection twice */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='33'%3E%3Cpath d='M.5 0V33M0 .5H33' fill='none' stroke='%231f7838' stroke-opacity='.08' stroke-width='1' shape-rendering='crispEdges'/%3E%3C/svg%3E");
  background-size: 33px 33px;
  background-position: var(--zone-pad, 24px) var(--zone-pad, 24px);
}
body.contact-standalone main.contact-shell {
  background-color: transparent;
  background-image: none;
}

.zn-contact__group {
  margin: 0;
  font-size: calc(var(--u) * var(--f-body));
  line-height: 1.62;
  font-weight: 500;
  letter-spacing: -.01em;
}
.zn-contact__list {
  list-style: none;
  margin: 0 0 calc(var(--u) * var(--f-body) * 1.62);
  padding: 0;
}
.zn-contact__list:last-of-type { margin-bottom: 0; }
.zn-contact__list li {
  font-size: calc(var(--u) * var(--f-body));
  line-height: 1.62;
  letter-spacing: -.005em;
  opacity: .82;
}

.zn-contact__reach {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--u) * var(--f-body) * .5);
  margin-top: calc(var(--u) * var(--f-body) * 1.62 * 2);
}
.zn-contact__mail {
  font-size: calc(var(--u) * var(--f-mail));
  line-height: 1.2;
  user-select: text;
  -webkit-user-select: text;
}
a.zn-contact__mail { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a.zn-contact__mail {
  background: linear-gradient(100deg, var(--card-ink, #17150f) 0 42%, #c9a227 47%, #e6c35a 50%, #c9a227 53%, var(--card-ink, #17150f) 58% 100%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: zn-mail-glint 8s ease-in-out 1.5s infinite;
}
@keyframes zn-mail-glint { 0% { background-position: 100% 0; } 16%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { a.zn-contact__mail { animation: none; } }
.zn-contact__btn {
  display: inline-grid;
  place-items: center;
  font: inherit;
  font-size: calc(var(--u) * var(--f-body));
  line-height: 1;
  padding: .42em;
  border-radius: .5em;
  cursor: pointer;
  color: rgba(23, 21, 15, .42);
  background: transparent;
  border: 1px solid rgba(23, 21, 15, .20);
  -webkit-tap-highlight-color: transparent;
}
.zn-contact__ico {
  grid-area: 1 / 1;
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.zn-contact__ico--done,
.zn-contact__btn.is-copied .zn-contact__ico { visibility: hidden; }
.zn-contact__btn.is-copied .zn-contact__ico--done { visibility: visible; }
.zn-contact__btn:hover { color: rgba(23, 21, 15, .62); background: rgba(255, 255, 255, .5); }
.zn-contact__btn:active { scale: .96; }
.zn-contact__btn:focus-visible { outline: 2px solid var(--card-accent, #c9a227); outline-offset: 2px; }
.zn-contact__btn.is-copied { border-color: #1f7838; color: #1f7838; }
.zn-contact__btn.is-failed { font-size: calc(var(--u) * var(--f-coda)); line-height: 1.62; padding: .35em .85em; color: var(--card-ink); -webkit-user-select: text; user-select: text; }

a.zn-contact__btn { text-decoration: none; }
.zn-contact__ico--brand { fill: currentColor; stroke: none; width: .92em; height: .92em; }
.zone-overlay__panel:has(.zn-contact) { container: contact-panel / size; }

@container contact-panel (min-aspect-ratio: 2 / 3) {
  .zone-overlay[data-layout="mobile"] .zn-contact > .zone-card__body { margin-top: calc(var(--zone-height, 643px) * .005); }
  .zone-overlay[data-layout="mobile"] .zn-contact__reach { margin-top: calc(var(--u) * var(--f-body) * 1.62); }
  .zone-overlay[data-layout="mobile"] .zn-contact__list { margin-bottom: calc(var(--u) * var(--f-body) * 1.62 * .6); }
  .zone-overlay[data-layout="mobile"] .zn-contact__list:last-of-type { margin-bottom: 0; }
  .zone-overlay[data-layout="mobile"] .zn-contact__group,
  .zone-overlay[data-layout="mobile"] .zn-contact__list li { line-height: 1.56; }
}
@media (prefers-reduced-motion: reduce) {
  .zn-contact__btn:active { scale: 1; }
}

:root {
  --artifacts-light: 201 162 39;
}
.zone-overlay[data-zone="artifacts"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--artifacts-light) / .26), rgb(var(--artifacts-light) / .42));
}
body[data-zone="artifacts"] .zone-overlay__panel,
.zone-overlay__panel:has(.zn-artifacts) {
  box-shadow:
    0 0 10px 3px rgb(var(--artifacts-light) / .85),
    0 0 26px 2px rgb(var(--artifacts-light) / .34),
    0 18px 44px rgba(40, 26, 6, .28),
    0 2px 6px rgba(40, 26, 6, .16);
}
.zn-artifacts > .zone-card__coda {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 calc(-1 * var(--zone-pad, 24px)) calc(-1 * var(--zone-pad, 24px));
  padding: calc(var(--u) * var(--f-body) * 1.62 * 2) var(--zone-pad, 24px) var(--zone-pad, 24px);
  background: var(--card-paper);
}
.zone-overlay__panel .zn-artifacts > .zone-card__coda { bottom: calc(-1 * var(--zone-pad, 24px)); }
.zn-artifacts > .zone-card__title {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 calc(-1 * var(--zone-pad, 24px));
  padding: 0 var(--zone-pad, 24px) var(--zone-pad, 24px);
  background: var(--card-paper);
}
.zone-overlay__panel .zn-artifacts > .zone-card__title {
  top: calc(-1 * var(--zone-pad, 24px));
  margin-top: calc(-1 * var(--zone-pad, 24px));
  padding-top: var(--zone-pad, 24px);
}
.zn-artifacts > .zone-card__title::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: calc(var(--u) * var(--f-body) * 1.62);
  background: linear-gradient(to top, transparent, var(--card-paper));
  pointer-events: none;
}
.zn-artifacts > .zone-card__coda::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 100%;
  height: calc(var(--u) * var(--f-body) * 1.62);
  background: linear-gradient(to bottom, transparent, var(--card-paper));
  pointer-events: none;
}
.zn-artifacts__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.zn-artifacts__list a {
  display: block;
  padding: .55em 0;
  font-size: calc(var(--u) * var(--f-body));
  line-height: 1.62;
  letter-spacing: -.005em;
  opacity: .82;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.zn-artifacts__list a:hover,
.zn-artifacts__list a:focus-visible { color: var(--card-accent, #c9a227); }
.zn-artifacts__list a[data-enter] { display: flex; align-items: baseline; opacity: 1; }
.zn-artifacts__list a[data-enter]:active { transform: translateY(1px); }
.zn-artifacts__words { flex: 0 0 auto; max-width: calc(100% - 2.9em);
  background: linear-gradient(100deg, var(--card-ink, #17150f) 0 40%, #d9a91c 46%, #f3d36b 50%, #d9a91c 54%, var(--card-ink, #17150f) 60% 100%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: zn-line-glint 3.6s ease-in-out 1s infinite; }
@keyframes zn-line-glint { 0%, 50% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }
.zn-artifacts__list a[data-enter]:hover .zn-artifacts__words,
.zn-artifacts__list a[data-enter]:focus-visible .zn-artifacts__words { background: var(--card-accent, #c9a227); -webkit-background-clip: text; background-clip: text; }
.zn-artifacts__list a[data-enter] u { flex: 0 1 1.6em; min-width: .35em; }
.zn-artifacts__list a[data-enter] u { overflow: hidden; }
.zn-artifacts__list a[data-enter] u::before { content: ""; display: inline-block; width: 1.6em; }
.zn-artifacts__list a[data-enter] em { flex: none; font: 700 .62em/1 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-style: normal;
  letter-spacing: .14em; color: var(--card-accent, #c9a227); animation: zn-blink 2s steps(1, end) infinite; }
@keyframes zn-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .zn-artifacts__words, .zn-artifacts__list a[data-enter] em { animation: none; } }

/* ── Kenny's Katz (button 2), Kenny 2026-11-22/23 ──────────────────────────────────────────────────────────────────
   The room is dark the instant it opens (the cabinet faintly there, so you never leave the room), and the card arrives
   as quickly as every other card. A black card with the artifact password card's turning foil edge; the words type by hand in Katz green
   (assets/zone-katz.js), and the sigil, burned in while they type, wakes half a beat after the last letter. One event
   at a time, the payoff last; the sigil is the only glow. Without the script the words show and the sigil is lit. */
@property --kk-foil-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }   /* without @property (older Safari) the foil shows, still: the var() fallback keeps the gradient valid */
body[data-zone="kennys-katz"] .zone-overlay {
  background: rgb(0 0 0 / .9);   /* dark the instant it opens, no fade: it must feel as quick as every other card */
  --zone-accent: rgb(134 215 47 / .55);
}
body[data-zone="kennys-katz"] .zone-overlay__close:hover,
body[data-zone="kennys-katz"] .zone-overlay__close:focus-visible,
body[data-zone="kennys-katz"] .zone-overlay__close:active { color: rgb(134 215 47); }

/* keyed on body[data-zone] (popup.js sets it), not :has(), so a browser without :has() still gets the black card */
body[data-zone="kennys-katz"] .zone-overlay__panel {
  overflow: hidden auto;
  background: linear-gradient(160deg, #121212, #050505 60%);
  border-radius: 22px;
  box-shadow: 0 40px 90px rgb(0 0 0 / .8);   /* its entrance is every card's (.zone-overlay__panel's zone-in) */
}
body[data-zone="kennys-katz"] .zone-overlay__panel::before {
  /* DECLARED TEXTURE EXCEPTION: the foil edge's 3px is a drawn mark, as on the artifact password card */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 3px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--kk-foil-a, 0deg), #86d72f, #3fe0c5, #c6ff7a, #7b8cff, #e8ff9e, #86d72f);
  animation: kk-foil-turn 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@keyframes kk-foil-turn { to { --kk-foil-a: 360deg; } }

.zn-kennys-katz { position: relative; isolation: isolate; color: rgb(134 215 47); --card-ink: rgb(134 215 47);
  --card-bind: rgb(244 241 234 / .22); }
.zn-kennys-katz__words {
  margin: 0; max-width: 30ch;
  font-size: calc(var(--u) * var(--f-body) * 1.12); line-height: 1.5; letter-spacing: .005em;
  white-space: pre-line;
}
.zn-kennys-katz__cursor {
  display: inline-block; width: .55em; height: 1.05em; margin-left: .08em; vertical-align: -.17em;
  background: rgb(134 215 47);
}
.zn-kennys-katz.is-typed .zn-kennys-katz__cursor { animation: kk-cursor-blink .822s steps(1) infinite; }
@keyframes kk-cursor-blink { 50% { opacity: 0; } }

/* the sigil: lit by default; burned in while the words type; it wakes over 3 s once they land, then breathes.
   It centres itself in whatever space the words leave below them (the card is a flex column), so on a short card (a
   phone on its side, an iPad) it shrinks into that space instead of sliding under the words. */
.zn-kennys-katz__sigil {
  flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center;
  padding-top: calc(var(--u) * .05); pointer-events: none;
  filter: drop-shadow(0 0 22px rgb(134 215 47 / .45));
}
.zn-kennys-katz__sigil img { display: block; width: min(46%, 240px); height: auto; max-height: 100%; object-fit: contain; }
.zn-kennys-katz.is-typing .zn-kennys-katz__sigil {
  opacity: .16; filter: drop-shadow(0 0 0 transparent);
  animation: kk-sigil-burn 2.6s .5s ease-out both;
}
@keyframes kk-sigil-burn { from { opacity: 0; filter: blur(14px); scale: 1.06; } }
.zn-kennys-katz.is-typing.is-typed .zn-kennys-katz__sigil {
  opacity: 1; filter: drop-shadow(0 0 22px rgb(134 215 47 / .45));
  /* an animation, not a transition: the burn-in's held animation makes the browser skip a transition (a flick) */
  animation: kk-sigil-wake 3s .5s ease-in-out both, kk-sigil-breath 6s 3.5s ease-in-out infinite;
}
@keyframes kk-sigil-wake { from { opacity: .16; filter: drop-shadow(0 0 0 transparent); } }
/* the breath is a brightness change, not a glow-size change: opacity over a still filter stays on the compositor,
   where animating the drop-shadow repainted every frame (main thread 49% busy vs 17% on a cream card, 6x-slowed phone) */
@keyframes kk-sigil-breath { 50% { opacity: .8; } }

@media (prefers-reduced-motion: reduce) {
  body[data-zone="kennys-katz"] .zone-overlay__panel::before,
  .zn-kennys-katz.is-typed .zn-kennys-katz__cursor { animation: none; }
}
