/* =====================================================================
   The Art Deco layer. Loaded last on every page, it restyles the shared
   pieces (titles, buttons, panels, frame, footer) and takes its colours
   from whichever page it is on. Remove the <link> to this file and the
   site returns to how it looked before.
   ===================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Poiret+One&display=swap");

body {
  --display: "Poiret One", "Josefin Sans", "Futura", sans-serif;
  --label: "Josefin Sans", "Futura", "Century Gothic", sans-serif;
  /* polished metal: light at the top edge, deep at the foot */
  --metal: linear-gradient(180deg, var(--gold-hot) 0%, var(--gold) 46%, color-mix(in srgb, var(--gold) 58%, #2a1800) 100%);
  --face: var(--navfill, #0a1c12);
}

/* ---------- a gilded frame around the whole window ---------- */
html::before, html::after { content: ""; position: fixed; inset: 9px; pointer-events: none; z-index: 40; }
html::before { border: 1px solid #d9b04a; outline: 1px solid rgba(217, 176, 74, 0.45); outline-offset: -6px; }
html::after {
  --c: "%3Cpath d='M1 34V1H34M8 26V8H26M15 19V15H19' fill='none' stroke='%23d9b04a' stroke-width='1.6'/%3E%3Cpath d='M21 21l5 5-5 5-5-5z' fill='%23d9b04a'/%3E";
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M1 34V1H34M8 26V8H26M15 19V15H19' fill='none' stroke='%23d9b04a' stroke-width='1.6'/%3E%3Cpath d='M26 21l5 5-5 5-5-5z' fill='%23d9b04a'/%3E%3C/svg%3E") left top / 40px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 0) scale(-1 1)'%3E%3Cpath d='M1 34V1H34M8 26V8H26M15 19V15H19' fill='none' stroke='%23d9b04a' stroke-width='1.6'/%3E%3Cpath d='M26 21l5 5-5 5-5-5z' fill='%23d9b04a'/%3E%3C/g%3E%3C/svg%3E") right top / 40px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(0 40) scale(1 -1)'%3E%3Cpath d='M1 34V1H34M8 26V8H26M15 19V15H19' fill='none' stroke='%23d9b04a' stroke-width='1.6'/%3E%3Cpath d='M26 21l5 5-5 5-5-5z' fill='%23d9b04a'/%3E%3C/g%3E%3C/svg%3E") left bottom / 40px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 40) scale(-1 -1)'%3E%3Cpath d='M1 34V1H34M8 26V8H26M15 19V15H19' fill='none' stroke='%23d9b04a' stroke-width='1.6'/%3E%3Cpath d='M26 21l5 5-5 5-5-5z' fill='%23d9b04a'/%3E%3C/g%3E%3C/svg%3E") right bottom / 40px no-repeat;
}
.topbar { padding-top: 26px; }

/* ---------- a faint scallop pattern behind the plain pages ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.09;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28' viewBox='0 0 56 28'%3E%3Cg fill='none' stroke='%23d9b04a' stroke-width='1'%3E%3Cpath d='M0 28a28 28 0 0 1 56 0M8 28a20 20 0 0 1 40 0M16 28a12 12 0 0 1 24 0'/%3E%3Cpath d='M-28 14a28 28 0 0 1 56 0M-20 14a20 20 0 0 1 40 0M-12 14a12 12 0 0 1 24 0M28 14a28 28 0 0 1 56 0M36 14a20 20 0 0 1 40 0M44 14a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E");
}
body:has(.jungle)::after { display: none; }      /* the film is busy enough on its own */
.mentor::after { opacity: 0.22; }

/* ---------- titles: tall thin capitals in polished gold ---------- */
:root body h1, :root body h2, :root body footer .mark {
  font-family: var(--display); font-weight: 400; font-style: normal; text-transform: uppercase; letter-spacing: 0.14em; line-height: 1.12;
  background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 0.6px var(--gold);
  text-shadow: none; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.65));
}
:root body h1 { font-size: clamp(1.75rem, 0.7rem + 4.4vw, 4.4rem); }
:root body h2 { font-size: clamp(1.5rem, 0.9rem + 2.6vw, 3rem); }
:root body.mentor h1, :root body.mentor h2, :root body.mentor footer .mark { filter: none; }
:root body footer .mark { font-size: 1.15rem; letter-spacing: 0.2em; }

/* a line, a diamond, a line under every section title */
:root body h2::after {
  content: ""; display: block; height: 14px; width: min(240px, 70%); margin: 0.55em auto 0;
  background: var(--metal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' preserveAspectRatio='none'%3E%3Cpath d='M0 6.5h100v1H0zM140 6.5h100v1H140zM120 1l6 6-6 6-6-6zM106 4l3 3-3 3-3-3zM134 4l3 3-3 3-3-3z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' preserveAspectRatio='none'%3E%3Cpath d='M0 6.5h100v1H0zM140 6.5h100v1H140zM120 1l6 6-6 6-6-6zM106 4l3 3-3 3-3-3zM134 4l3 3-3 3-3-3z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
:root body .about h2::after { margin-left: 0; }
:root body .rcard h2 { font-size: 1.25em; letter-spacing: 0.1em; filter: none; }
:root body .rcard h2::after { display: none; }
:root body .rcard h2 em { -webkit-text-stroke: 0; color: var(--ink-soft); letter-spacing: 0.02em; text-transform: none; font-family: var(--serif); }
:root body .how h2 { background: var(--metal); -webkit-background-clip: text; background-clip: text; border: 0; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }

/* small labels */
:root body .eyebrow, :root body .rcard .rpos, :root body .slot .pos, :root body .authors {
  font-family: var(--label); font-style: normal; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.72rem;
}
:root body .rcard .rpos span { text-transform: none; letter-spacing: 0; font-family: var(--serif); font-size: 1.35em; }

/* ---------- buttons: bevelled gold bars ---------- */
:root body .btn {
  --cut: 13px;
  position: relative; isolation: isolate;
  font-family: var(--label); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1;
  padding: 1.35em 2.4em 1.2em; border-radius: 0; border: 0;
  background: var(--metal); color: #1a1203; box-shadow: none;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  transition: filter 0.2s, transform 0.2s;
}
:root body .btn::after {       /* an engraved inner line */
  content: ""; position: absolute; inset: 5px; z-index: -1; border: 1px solid rgba(26, 18, 3, 0.45);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}
:root body .btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
:root body .btn:active { transform: translateY(1px); }
:root body .btn.ghost { color: var(--gold); background: var(--metal); box-shadow: none; }
:root body .btn.ghost::before {
  content: ""; position: absolute; inset: 1.5px; z-index: -2; background: var(--face);
  clip-path: polygon(12.5px 0, calc(100% - 12.5px) 0, 100% 12.5px, 100% calc(100% - 12.5px), calc(100% - 12.5px) 100%, 12.5px 100%, 0 calc(100% - 12.5px), 0 12.5px);
}
:root body .btn.ghost::after { border-color: var(--line); }
:root body.mentor .btn.ghost { color: #8a6508; }
:root body .cta-row { gap: 16px; }

:root body .spreads button, :root body #gather {
  border-radius: 0; font-family: var(--label); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 12px 20px 10px; border: 1px solid var(--gold); outline: 1px solid var(--line); outline-offset: -5px;
}

/* ---------- panels: square, triple-lined, like a lacquered cabinet door ---------- */
:root body :is(.about .wrap, .steps li, .order .panel, .rcard, .tpage .panel, .tbook, .who .column) {
  border-radius: 0; border: 1px solid var(--gold);
  outline: 1px solid var(--line); outline-offset: -10px;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.35), 0 0 0 6px var(--line), 0 34px 70px rgba(0, 0, 0, 0.5);
}
:root body.mentor :is(.order .panel, .tpage .panel) { box-shadow: 0 0 0 5px #fff, 0 0 0 6px var(--line), 0 30px 60px rgba(184, 134, 11, 0.2); }
:root body :is(.photos figure, .voice, .voice-grid .voice) {
  border-radius: 0; border: 1px solid var(--gold);
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.35), 0 0 0 6px var(--line), 0 30px 60px rgba(0, 0, 0, 0.5);
}
:root body :is(.photos img, .voice video, .voice-grid .voice video) { border-radius: 0; }
/* a sunburst crowns the main panel of each page */
:root body .order .panel { position: relative; padding-top: clamp(54px, 7vw, 84px); }
:root body .order .panel::before, :root body footer::before {
  content: ""; position: absolute; left: 50%; translate: -50% 0; width: 132px; height: 66px;
  background: var(--metal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg stroke='%23000' stroke-width='2' fill='none'%3E%3Cpath d='M60 60V3M60 60L31 11M60 60L89 11M60 60L11 31M60 60L109 31M60 60L3 55M60 60L117 55M60 60L45 5M60 60L75 5M60 60L20 20M60 60L100 20'/%3E%3C/g%3E%3Cpath d='M36 60a24 24 0 0 1 48 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg stroke='%23000' stroke-width='2' fill='none'%3E%3Cpath d='M60 60V3M60 60L31 11M60 60L89 11M60 60L11 31M60 60L109 31M60 60L3 55M60 60L117 55M60 60L45 5M60 60L75 5M60 60L20 20M60 60L100 20'/%3E%3C/g%3E%3Cpath d='M36 60a24 24 0 0 1 48 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
:root body .order .panel::before { top: -34px; }

/* ---------- footer ---------- */
:root body footer { border-top: 1px solid var(--gold); box-shadow: 0 -5px 0 -4px var(--line); padding-top: 64px; padding-bottom: 44px; margin-top: 70px; }
:root body footer::before { top: -66px; }
:root body footer .cats { border-bottom: 0; }

@media (max-width: 820px) {
  html::before, html::after { inset: 5px; }
  html::after { background-size: 26px; }
  html::before { outline-offset: -4px; }
  .topbar { padding-top: 18px; }
  :root body h1, :root body h2 { letter-spacing: 0.08em; }
  :root body .btn { font-size: 0.74rem; padding-inline: 1.8em; }
}

/* ---------- kept plain: no gilded frames, no sun or line at the foot of the page ---------- */
html::before, html::after { display: none; }
:root body :is(.about .wrap, .steps li, .order .panel, .rcard, .tpage .panel, .tbook, .who .column, .photos figure, .voice, .voice-grid .voice),
:root body.mentor :is(.order .panel, .tpage .panel) { border: 0; outline: 0; box-shadow: none; }
:root body footer { border-top: 0; box-shadow: none; padding-top: 36px; margin-top: 40px; }
:root body footer::before { display: none; }
