/* Madam Studio: the look every public page shares.
   Maroon and gold from the studio, stars from the wizard's robe, arches from
   the doors of the mushroom town in the key art. */

:root {
  --bg: #4a1020; --bg-deep: #380c19; --panel: #611829; --panel-2: #742138;
  --border: #8d3a4e; --border-soft: #6e2739;
  --text: #f7ecd9; --text-2: #e7cfa4; --muted: #dcb3c1;
  --accent: #f3c53f; --accent-deep: #d99a1f; --accent-ink: #3a1020;
  --verified: #6fe0a0; --paid: #f3c53f; --payoff: #79b8e8; --error: #ffb3bd;
  --disp: 'Fraunces', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body > main, body > .page { flex: 1; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ── top bar ───────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 24px;
  padding: 20px var(--gutter);
  position: relative; z-index: 10;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--disp); font-weight: 700; font-size: 21px; letter-spacing: -.01em;
  color: var(--text); text-decoration: none;
}
.brand .star { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.brand:hover .star { transform: rotate(72deg) scale(1.15); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.nav a {
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-2); text-decoration: none; padding: 6px 0;
  background: linear-gradient(var(--accent), var(--accent)) left 100% / 0 2px no-repeat;
  transition: background-size .25s var(--ease), color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background-size: 100% 2px; }

/* Who is signed in, top right, with the way out. Added by /js/whoami.js. */
.who-tag { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.who-tag-name {
  font-family: var(--disp); font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  color: var(--text); text-decoration: none; max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.who-tag-name:hover { color: var(--accent); }
.who-tag-out {
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: none; border: 0; border-left: 1px solid var(--border-soft);
  padding: 2px 0 2px 10px; cursor: pointer;
}
.who-tag-out:hover { color: var(--text); }

/* ── the star ──────────────────────────────────── */
.star { fill: var(--accent); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; flex-shrink: 0; }

/* ── type ──────────────────────────────────────── */
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
}
.page-title {
  font-family: var(--disp); font-weight: 700; line-height: 1;
  font-size: clamp(44px, 8vw, 84px); letter-spacing: -.025em;
  text-wrap: balance;
}
.page-title em { font-weight: 500; color: var(--accent); }
.lede { color: var(--text-2); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; max-width: 34em; }
.section-title { font-family: var(--disp); font-weight: 700; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; line-height: 1.1; }

/* ── buttons ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-size: 14px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--accent-ink); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 3px;
  padding: 12px 24px; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: #ffd65c; border-color: #ffd65c; }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--accent); box-shadow: none; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; box-shadow: none; }

/* ── forms ─────────────────────────────────────── */
label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: 3px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(243, 197, 63, .22); }
select option { background: var(--panel); }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { font-size: 15px; line-height: 1.5; display: none; }
.msg.err { color: var(--error); display: block; }
.msg.ok { color: var(--verified); display: block; }

/* ── panels and frames ─────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 3px;
  padding: clamp(20px, 3vw, 30px);
}
/* A gold line inside a dark line, like the edge of a framed print. */
.frame {
  border-radius: 3px; overflow: hidden; position: relative;
  box-shadow: 0 0 0 2px var(--accent-deep), 0 0 0 7px var(--bg-deep), 0 0 0 8px var(--border);
}
.arch { border-radius: 999px 999px 3px 3px; overflow: hidden; }

/* The town from the key art, used beside the forms. */
.town { background: #202a5b url('/img/hero.webp') 92% 62% / auto 170% no-repeat; }

/* ── footer ────────────────────────────────────── */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px;
  text-align: center; padding: 28px var(--gutter) 34px; margin-top: 40px;
  border-top: 1px solid var(--border-soft);
  font-size: 14px; color: var(--muted);
}
.site-foot a { color: var(--text-2); }

/* ── arrival ───────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .8s var(--ease) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .26s; }

@media (max-width: 560px) {
  .topbar { padding-top: 16px; padding-bottom: 12px; }
  .nav { gap: 2px 16px; }
  .nav a { font-size: 12px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
