/* Leonida Vice Roleplay · edition 5
   site.css      tokens for both themes, page shell and shared components
   edition.css   homepage
   service.css   department directory and recruitment desk            */

@font-face {
  font-family: "Leonida Cut";
  src: url(assets/leonida-cut.woff2) format("woff2");
  font-weight: 800;
  font-display: block;
}
@font-face {
  font-family: "Public Sans";
  src: url(assets/public-sans.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  /* Daylight · sunrise */
  --paper: #f5eee4;
  --paper-sunk: #ece1d2;
  --card: #fff9f1;
  --ink: #281e26;
  --ink-soft: #5c4d57;
  --rule: #d5c6bb;
  --spot: #ad4133;
  --spot-ink: #fff8f0;
  --glow: #ffa16a;
  --glow-ink: #281e26;
  /* The header, hero, locations strip and footer stay dark in both themes */
  --night: #1d151c;
  --night-raised: #2a2029;
  --night-ink: #f9f1e6;
  --night-soft: #cbbdc4;
  --night-rule: #4a3d48;
  --shade: 29 16 27;            /* rgb triplet behind hero type */
  --frond: url(assets/frond-day.webp);

  --display: "Leonida Cut", "Arial Narrow", Impact, sans-serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --margin: clamp(20px, 5vw, 72px);     /* 20 px at 390, 72 px at 1440 */
  --gutter: clamp(20px, 2.8vw, 40px);
  --measure: 64ch;
  --header: 68px;
  --radius: 6px;
  --slant: 0.13;                        /* tan(7.4deg), the lean of Leonida Cut */

  --fade: 400ms;                        /* artwork crossfade */
  --reveal: 200ms;                      /* opening a service */
  --ease: cubic-bezier(.2, .6, .2, 1);
}
:root[data-theme="moonlight"] {
  color-scheme: dark;
  /* Moonlight · crescent */
  --paper: #121e2c;
  --paper-sunk: #0e1824;
  --card: #1a2a3b;
  --ink: #edf5fb;
  --ink-soft: #afc0d0;
  --rule: #31495e;
  --spot: #8cddf2;
  --spot-ink: #0b1722;
  --glow: #8cddf2;
  --glow-ink: #0b1722;
  --night: #0a141f;
  --night-raised: #142231;
  --night-ink: #edf5fb;
  --night-soft: #afc0d0;
  --night-rule: #31495e;
  --shade: 7 16 30;
  --frond: url(assets/frond-night.webp);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 20px); background: var(--night); -webkit-text-size-adjust: 100%; }
:root[data-motion="paused"] { scroll-behavior: auto; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button, a { touch-action: manipulation; }
[hidden] { display: none !important; }
::selection { background: var(--glow); color: var(--glow-ink); }

:focus-visible { outline: 3px solid var(--spot); outline-offset: 3px; border-radius: 2px; }
.on-night :focus-visible, .on-night:focus-visible { outline-color: var(--glow); }

.wrap { width: min(100% - var(--margin) * 2, 1296px); margin-inline: auto; }
.sr, .sprite { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; background: var(--night-ink); color: var(--night); border-radius: var(--radius); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Principal headings use Leonida Cut. The face is capitals only and carries its own slant. */
.display { font-family: var(--display); font-weight: 800; font-style: normal; font-synthesis: none; line-height: .92; letter-spacing: .005em; text-transform: uppercase; text-wrap: balance; }
h1.display { font-size: clamp(2.75rem, 6.2vw, 5.5rem); }
h2.display { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.lead { font-size: clamp(1.0625rem, 1.25vw, 1.25rem); line-height: 1.5; color: var(--ink-soft); max-width: 46ch; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: .9em; }
.note { font-size: .9375rem; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 26px; border-radius: 99px; background: var(--spot); color: var(--spot-ink); font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; transition: filter .15s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { filter: brightness(.94); }
.btn.glow { background: var(--glow); color: var(--glow-ink); }
.btn.quiet { background: none; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.quiet:hover { filter: none; background: color-mix(in srgb, currentColor 10%, transparent); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: .9375rem; }
.btn[disabled] { opacity: .5; cursor: default; filter: none; }
.link { font-weight: 650; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; text-decoration-color: var(--spot); }
.link:hover { color: var(--spot); }
.on-night .link { text-decoration-color: var(--glow); }
.on-night .link:hover { color: var(--glow); }
button.link { text-align: left; }

/* A status label, e.g. recruitment phase or a launch stage */
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 99px; font-size: .8125rem; font-weight: 700; line-height: 1.4; background: var(--spot); color: var(--spot-ink); white-space: nowrap; }
.tag.outline { background: none; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--rule); }

/* ---------- Header ---------- */
.masthead { position: sticky; top: 0; z-index: 30; color: var(--night-ink); background: color-mix(in srgb, var(--night) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); transition: background .3s; }
.cover .masthead { background: var(--night); }
.nav-wrap { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); min-height: var(--header); width: min(100% - var(--margin) * 2, 1296px); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand .moonmark, [data-theme="moonlight"] .brand .sunmark { display: none; }
[data-theme="moonlight"] .brand .moonmark { display: block; }
.brand-type { font: 800 1.5rem/.95 var(--display); font-synthesis: none; letter-spacing: .03em; white-space: nowrap; }
.brand-type small { display: block; margin-top: 3px; font: 700 .5625rem/1 var(--sans); letter-spacing: .38em; color: var(--night-soft); }
.main-nav { display: flex; gap: clamp(16px, 2.2vw, 30px); margin-left: auto; align-self: stretch; }
.main-nav a { display: flex; align-items: center; position: relative; font-size: .9375rem; font-weight: 600; color: var(--night-soft); text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--night-ink); }
.main-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--glow); transform: skewX(-7.4deg); }
.nav-tools { display: flex; align-items: center; gap: 12px; }
.theme-switch { display: flex; padding: 3px; border-radius: 99px; background: rgb(255 255 255 / .12); }
.theme-switch button { display: grid; place-items: center; width: 38px; height: 32px; border-radius: 99px; color: var(--night-soft); }
.theme-switch button[aria-pressed="true"] { background: var(--glow); color: var(--glow-ink); }
.masthead .btn { min-height: 40px; padding: 8px 16px; font-size: .9375rem; background: var(--night-ink); color: var(--night); }
.hamburger { display: none; width: 44px; height: 44px; place-items: center; border-radius: var(--radius); }
.hamburger .i { width: 24px; height: 24px; }
#mobile-nav { padding: 8px var(--margin) 20px; }
#mobile-nav a, #mobile-nav button { display: flex; align-items: center; width: 100%; min-height: 48px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--night-rule); }
#mobile-nav a[aria-current] { color: var(--glow); }
@media (max-width: 1040px) {
  .main-nav, .masthead .nav-tools > .btn { display: none; }
  .nav-tools { margin-left: auto; }
  .hamburger { display: grid; }
}
/* Narrowest usable header: 320 px. The mark, name, switch and menu all stay. */
@media (max-width: 380px) {
  .nav-wrap { gap: 8px; }
  .brand { gap: 7px; }
  .brand img { width: 32px; height: 32px; }
  .brand-type { font-size: 1.25rem; letter-spacing: .02em; }
  .brand-type small { display: none; }
  .nav-tools { gap: 6px; }
  .theme-switch button { width: 32px; }
}

/* ---------- Footer ---------- */
.site-foot { background: var(--night); color: var(--night-soft); padding: 40px 0 44px; font-size: .9375rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.site-foot .brand { color: var(--night-ink); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-left: auto; }
.site-foot nav a, .site-foot nav button { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; text-decoration: none; color: var(--night-ink); }
.site-foot nav a:hover, .site-foot nav button:hover { color: var(--glow); }
@media (max-width: 700px) { .site-foot nav { margin-left: 0; width: 100%; } }

/* ---------- Dialogs ---------- */
dialog { padding: 0; border: 0; color: var(--ink); background: var(--paper); width: min(100vw - 32px, 920px); max-height: min(100dvh - 32px, 860px); border-radius: 28px; box-shadow: 0 30px 80px rgb(0 0 0 / .45); overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: rgb(var(--shade) / .72); }
dialog[open] { animation: rise var(--reveal) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.dialog-close { position: sticky; top: 12px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin: 12px 12px -56px auto;   /* takes no room in the layout */ border-radius: 99px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
.dialog-close .i { width: 20px; height: 20px; }
.dialog-body { padding: clamp(24px, 4vw, 44px); }
.dialog-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -.01em; }
.dialog-body h2.display { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: .92; letter-spacing: .005em; }
@media (max-width: 640px) {
  dialog { width: 100%; max-width: 100%; inset-inline: 0; max-height: 92dvh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
}

/* ---------- Form fields ---------- */
.field { display: grid; gap: 6px; font-weight: 650; font-size: .9375rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--card); color: var(--ink); font-weight: 400; font-size: 1rem; line-height: 1.45; }
.field textarea { resize: vertical; min-height: 112px; }
.field input::placeholder { color: var(--ink-soft); opacity: .8; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--spot); }
.field [aria-invalid="true"] { border-color: var(--spot); box-shadow: inset 4px 0 0 var(--spot); }
.field .hint { font-weight: 400; color: var(--ink-soft); }
.field .error { font-weight: 650; color: var(--spot); }
.feedback { min-height: 1.5em; font-weight: 650; }
.feedback:empty { min-height: 0; }

/* Choice pills: a row on wide screens, a two-by-two block on phones */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.segmented button { min-height: 42px; padding: 8px 20px; border-radius: 99px; font-weight: 650; font-size: .9375rem; color: var(--ink-soft); transition: background var(--reveal), color var(--reveal); }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) {
  .segmented.four { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 26px; }
  .segmented.four button { padding-inline: 8px; }
}
@media (max-width: 480px) {
  .segmented:not(.four) { display: grid; width: 100%; border-radius: 26px; }
}

/* Community access dialog */
.community-dialog { width: min(100vw - 32px, 760px); }
.community-dialog .dialog-body { display: grid; gap: 16px; justify-items: start; }
.community-art { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--night); }
.community-art .cover { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.community-art .signature { position: absolute; left: clamp(20px, 4vw, 40px); bottom: 16px; width: min(46%, 250px); filter: drop-shadow(0 6px 14px rgb(0 0 0 / .4)); }
.community-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Motion: with reduced motion or the pause setting, show the final state at once */
:root[data-motion="paused"] *, :root[data-motion="paused"] *::before, :root[data-motion="paused"] *::after { animation: none !important; transition: none !important; }
