/* ==========================================================================
   Limit Break: guild site
   Palette: midnight violet, tarnished gold, arcane blue (the "break" color)
   Type: Cinzel / Cinzel Decorative (carved display), Alegreya (book serif body)
   ========================================================================== */

:root {
  --void: #14101F;
  --dusk: #1E1932;
  --dusk-2: #2A2446;
  --line: #3B335C;
  --parchment: #ECE2CA;
  --muted: #A99FBF;
  --gold: #CDA34F;
  --gold-hi: #F1D58A;
  --gold-deep: #7A5A22;
  --arcane: #8FE3F0;
  --arcane-deep: #3E8FA8;

  --display: "Cinzel Decorative", "Cinzel", "Trajan Pro", Georgia, serif;
  --heading: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --body: "Alegreya", Georgia, "Times New Roman", serif;

  --wrap: 1140px;
  --narrow: 760px;
  --radius: 4px;

  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--void);
  background-image:
    radial-gradient(1200px 600px at 75% -10%, rgba(95, 80, 170, .28), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(62, 143, 168, .10), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--parchment);
  font-family: var(--body);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-underline-offset: .18em; }
a:hover { color: var(--parchment); }
:focus-visible { outline: 2px solid var(--arcane); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: var(--narrow); }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--void); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: calc(1rem + env(safe-area-inset-top, 0px)); }

h1, h2, h3 { font-family: var(--heading); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); color: var(--gold-hi); }
.section-head h2 > span, .cta h2, .schedule-grid h2, .page-title { background: linear-gradient(180deg, #FFF1C4, var(--gold-hi) 40%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
h3 { font-size: 1.25rem; color: var(--parchment); }
p { margin: 0 0 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--heading); font-weight: 700; font-size: 1rem; letter-spacing: .04em;
  padding: .8em 1.6em; border-radius: var(--radius); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: filter .15s, background-color .15s, color .15s;
}
.btn-gold {
  color: #241A08;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #A9802F);
  border-color: var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 0 var(--gold-deep);
}
.btn-gold:hover { filter: brightness(1.08); color: #241A08; }
.btn-ghost { color: var(--parchment); border-color: var(--line); background: rgba(30, 25, 50, .6); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-small { font-size: .875rem; padding: .6em 1.2em; }
.btn-wide { width: 100%; font-size: 1.125rem; padding: 1em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: linear-gradient(90deg, rgba(20,16,31,.92), rgba(36,26,66,.88) 50%, rgba(20,16,31,.92));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--gold) 30%, var(--arcane) 70%, transparent) 1;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21;
  background: rgba(20, 16, 31, .88); backdrop-filter: blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1.35rem; letter-spacing: .02em; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #9A6F27); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { font-family: var(--heading); font-weight: 500; font-size: .95rem; color: var(--parchment); text-decoration: none; letter-spacing: .03em; }
.site-nav a:not(.btn):hover { color: var(--gold-hi); }
.site-nav .btn { padding: .55em 1.3em; font-size: .9rem; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block; background: none; border: 1px solid var(--line); color: var(--parchment);
    font-family: var(--heading); font-size: .9rem; padding: .45em .9em; border-radius: var(--radius); cursor: pointer;
  }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--void); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 860px); display: flex; align-items: center;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(4rem, 8vw, 6rem);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    /* readability: deep wash on the text side, fading right */
    linear-gradient(90deg, rgba(14,10,26,.96) 0%, rgba(18,13,34,.88) 32%, rgba(24,16,48,.45) 62%, rgba(24,16,48,.15) 100%),
    /* color grade: violet from the top, fel green kept in the middle, blend into the page at the bottom */
    linear-gradient(180deg, rgba(40,26,84,.55) 0%, rgba(40,26,84,0) 35%, rgba(20,16,31,0) 65%, var(--void) 100%),
    radial-gradient(60% 70% at 72% 40%, rgba(120,255,140,.10), transparent 70%),
    var(--hero-img, url("../img/hero.jpg")) center 42% / cover no-repeat;
}
@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(14,10,26,.66) 0%, rgba(14,10,26,.74) 40%, rgba(14,10,26,.9) 80%, var(--void) 100%),
      radial-gradient(80% 50% at 50% 30%, rgba(120,255,140,.12), transparent 70%),
      var(--hero-img-sm, url("../img/hero-sm.jpg")) 30% center / cover no-repeat;
  }
}
.hero-grid { display: block; }
.hero-copy { max-width: 640px; }
.hero-title {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(3.25rem, 1.5rem + 7.5vw, 7rem);
  line-height: .95; margin: 0 0 1.25rem; letter-spacing: -.005em;
  background: linear-gradient(180deg, #FFF6D8 0%, var(--gold-hi) 28%, var(--gold) 58%, #9A6F27 82%, #6E4E1A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.6)) drop-shadow(0 0 30px rgba(205,163,79,.25));
}
.hero-tagline { font-size: clamp(1.15rem, 1rem + .5vw, 1.375rem); max-width: 36ch; color: var(--parchment); margin-bottom: 2.25rem; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero-actions.center { justify-content: center; }
.hero .gauge-block {
  padding: 1.1rem 1.25rem 1rem; border-radius: 6px;
  background: linear-gradient(135deg, rgba(42,36,70,.78), rgba(20,16,31,.70));
  border: 1px solid rgba(205,163,79,.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.hero .btn-ghost { background: linear-gradient(180deg, rgba(42,36,70,.85), rgba(20,16,31,.85)); }

/* Title lockup: the game name sits under the guild name like a logo subtitle,
   flanked by gold rules that end in small diamonds */
.lockup { display: inline-flex; flex-direction: column; align-items: stretch; margin-bottom: 2.25rem; }
.lockup .hero-title { margin-bottom: .35rem; }
/* Tagline matches the lockup width exactly: width 0 + min-width 100% stops it
   from widening the box, so it wraps to the title/subtitle width. */
.lockup .hero-tagline { width: 0; min-width: 100%; max-width: none; margin: 1.4rem 0 0; text-wrap: pretty; }
.hero-sub {
  display: flex; align-items: center; gap: .9rem; margin: 0;
  font-family: var(--heading); font-weight: 700; font-size: clamp(.8rem, .6rem + .6vw, 1.05rem);
  letter-spacing: .32em; text-transform: uppercase; white-space: nowrap;
  color: var(--parchment); text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.hero-sub span { padding-left: .32em; /* balance trailing letter-spacing */ }
.hero-sub .rule { position: relative; flex: 1; min-width: 1.75rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 80%); }
.hero-sub .rule:last-child { background: linear-gradient(270deg, transparent, var(--gold) 80%); }
.hero-sub .rule::after {
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px; right: -3px;
  background: linear-gradient(135deg, #FFF1C4, var(--gold)); transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 8px rgba(205,163,79,.7);
}
.hero-sub .rule:last-child::after { right: auto; left: -3px; }
@media (max-width: 420px) { .hero-sub { letter-spacing: .16em; font-size: .72rem; gap: .55rem; } }

/* ---------- The limit gauge ---------- */
.gauge-block { max-width: 560px; }
.gauge-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.gauge-raid { font-family: var(--heading); font-weight: 700; font-size: 1.05rem; color: var(--parchment); }
.gauge-count { font-family: var(--heading); font-weight: 900; font-size: 1.35rem; color: var(--arcane); white-space: nowrap; }
.gauge-foot { color: var(--muted); font-size: 1rem; margin: .6rem 0 0; }

.gauge {
  position: relative; display: flex; gap: 5px; height: 34px; padding: 5px;
  background: linear-gradient(180deg, #0B0816, #19132C);
  border: 2px solid var(--gold);
  border-radius: 3px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 0 0 1px var(--gold-deep), 0 0 0 4px rgba(122,90,34,.35);
}
.gauge-seg {
  flex: 1; position: relative;
  background: rgba(143,227,240,.06);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.gauge-seg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #E4FBFF, var(--arcane) 45%, var(--arcane-deep));
  box-shadow: 0 0 14px var(--arcane);
  transform: scaleX(0); transform-origin: left;
  transition: transform .32s cubic-bezier(.2,.9,.3,1);
}
.gauge-seg.lit::after { transform: scaleX(1); }

/* Full clear: the bar cracks and overflows */
.gauge.broken { animation: jolt .5s ease-out 1; border-color: var(--arcane); box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 0 0 1px var(--arcane-deep), 0 0 28px rgba(143,227,240,.55); }
.gauge.broken::after {
  content: ""; position: absolute; right: -26px; top: -14px; width: 46px; height: 62px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 62'%3E%3Cpath d='M6 2 L16 20 L8 28 L26 36 L14 42 L24 60' fill='none' stroke='%23C9F6FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 8 L40 2 M32 52 L44 60 M34 30 H46' stroke='%238FE3F0' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 0 6px var(--arcane));
}
@keyframes jolt {
  0% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); } 80% { transform: translateX(1px); } 100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .gauge-seg::after { transition: none; }
  .gauge.broken { animation: none; }
}

/* Before raids open: dim, padlocked gauge that charges up toward unlock */
.gauge.locked { border-color: var(--gold-deep); }
.gauge.locked .gauge-seg { background: rgba(205,163,79,.07); }
.gauge.locked .gauge-seg::after { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-deep)); box-shadow: 0 0 10px rgba(205,163,79,.6); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-alt {
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(143,227,240,.08), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(205,163,79,.08), transparent 60%),
    linear-gradient(160deg, #241D40 0%, #1A1530 55%, #161127 100%);
  border-block: 1px solid var(--line);
}
.section-head { margin-bottom: 2.25rem; }
.section-head h2, .page-title { display: flex; align-items: center; gap: 1rem; }
.section-head h2::after {
  content: ""; flex: 1; height: 2px; max-width: 320px;
  background: linear-gradient(90deg, var(--gold), var(--arcane) 55%, transparent);
}
.section-sub { color: var(--muted); max-width: 62ch; }
.page-title { font-family: var(--heading); font-size: clamp(2.25rem, 1.5rem + 3vw, 3.25rem); color: var(--gold-hi); }

/* ---------- Progress ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.tabs button {
  font-family: var(--heading); font-weight: 700; font-size: .95rem; letter-spacing: .03em;
  background: transparent; color: var(--muted); border: 0; padding: .65rem 1.25rem; cursor: pointer;
}
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button[aria-selected="true"] { background: linear-gradient(180deg, #3A3163, var(--dusk-2)); color: var(--gold-hi); box-shadow: inset 0 -2px 0 var(--gold); }
.tabs .tab-count { color: var(--arcane); margin-left: .4em; font-weight: 500; }

.boss-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: boss; }
.boss {
  display: grid; grid-template-columns: 2.5rem 1fr auto; align-items: center; gap: 1rem;
  padding: .9rem .25rem; border-bottom: 1px solid var(--line); counter-increment: boss;
}
.boss-num { font-family: var(--heading); color: var(--muted); font-size: .95rem; text-align: center; }
.boss-num::before { content: counter(boss, upper-roman); }
.boss-name { font-family: var(--heading); font-weight: 700; font-size: 1.1rem; color: var(--muted); }
.boss-state { font-size: 1rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.boss-state svg { width: 18px; height: 18px; }
.boss.down { background: linear-gradient(90deg, rgba(143,227,240,.07), transparent 70%); }
.boss.down .boss-name { color: var(--parchment); }
.boss.down .boss-state { color: var(--arcane); }
.boss.down .boss-num { color: var(--gold); }
.raid-meta { color: var(--muted); font-size: 1rem; font-style: italic; padding: .75rem .25rem; border-bottom: 1px solid var(--line); }
.boss.empty .boss-num::before { content: ""; }
.boss.empty .boss-name { font-style: italic; font-weight: 500; }

.ranks { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 2rem 0 0; }
.ranks div { min-width: 7rem; }
.ranks dt { color: var(--muted); font-size: .95rem; }
.ranks dd { margin: 0; font-family: var(--heading); font-weight: 700; font-size: 1.6rem; color: var(--gold-hi); }
.note { margin-top: 1.5rem; color: var(--muted); font-size: 1rem; border-left: 2px solid var(--gold-deep); padding-left: 1rem; }

/* ---------- News ---------- */
.news-list { display: grid; gap: 0; }
.post { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.5rem; padding: 1.75rem 0; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; padding-top: 0; }
.post-date { font-family: var(--heading); color: var(--gold); font-size: .95rem; line-height: 1.4; padding-top: .3rem; }
.post-date strong { display: block; font-size: 1.6rem; color: var(--gold-hi); font-weight: 700; }
.post-tag { font-size: .95rem; font-style: italic; color: var(--muted); margin-bottom: .2rem; }
.post-tag[data-tag="Progress"] { color: var(--arcane); }
.post-tag[data-tag="Recruitment"] { color: var(--gold-hi); }
.post h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.post-body p:last-child { margin-bottom: 0; }
#news-more { margin-top: 1.5rem; }
@media (max-width: 600px) { .post { grid-template-columns: 1fr; gap: .25rem; } .post-date strong { display: inline; font-size: 1.1rem; margin-right: .35rem; } }

/* ---------- Recruiting ---------- */
.class-grid { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.class-card {
  position: relative; padding: 1.25rem 1.25rem 1.1rem 1.4rem;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--cc) 14%, var(--dusk-2)), var(--dusk) 70%) padding-box,
    linear-gradient(160deg, color-mix(in srgb, var(--cc) 60%, transparent), var(--line) 60%) border-box;
  border: 1px solid transparent; border-radius: var(--radius);
  display: flex; flex-direction: column; gap: .3rem;
}
.class-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cc); border-radius: var(--radius) 0 0 var(--radius); }
.class-name { font-family: var(--heading); font-weight: 700; font-size: 1.25rem; color: color-mix(in srgb, var(--cc) 72%, #fff); margin: 0; }
.class-specs { color: var(--parchment); font-size: 1rem; margin: 0; }
.priority { display: flex; align-items: center; gap: .5rem; font-size: .95rem; color: var(--muted); margin: .35rem 0 .6rem; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 6px; background: var(--line); transform: skewX(-20deg); }
.pips i.on { background: var(--gold); }
.class-card a { margin-top: auto; font-size: 1rem; }
.closed { color: var(--muted); font-style: italic; }

.expect { max-width: var(--narrow); }
.expect ul { margin: 0; padding: 0; list-style: none; }
.expect li { position: relative; padding-left: 1.6rem; margin-bottom: .6rem; }
.expect li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }

/* ---------- Schedule ---------- */
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.nights { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.nights li {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem; background: linear-gradient(90deg, rgba(205,163,79,.16), rgba(20,16,31,.9) 45%, rgba(143,227,240,.06)); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius);
}
.nights strong { font-family: var(--heading); font-size: 1.25rem; color: var(--gold-hi); }
@media (max-width: 760px) { .schedule-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- CTA ---------- */
.cta { padding: clamp(4.5rem, 9vw, 7rem) 0; text-align: center; background: radial-gradient(50% 80% at 50% 100%, rgba(143,227,240,.14), transparent 70%), radial-gradient(60% 70% at 50% 0%, rgba(120,90,200,.18), transparent 70%); }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-size: clamp(2rem, 1.3rem + 2.5vw, 3rem); }
.cta p { color: var(--muted); max-width: 46ch; margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.25rem 0; color: var(--muted); font-size: .95rem; background: linear-gradient(180deg, transparent, rgba(10,8,18,.8)); }
.footer-inner p { margin: 0 0 .4rem; }
.fine { font-size: .85rem; max-width: 70ch; }
.site-footer a { color: var(--muted); }

/* ---------- Application form ---------- */
.app-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(42,36,70,.7), rgba(24,19,40,.6)); padding: 1.5rem; margin: 0 0 1.5rem; }
.app-form legend { font-family: var(--heading); font-weight: 700; color: var(--gold-hi); font-size: 1.15rem; padding: 0 .5rem; }
.app-form label { display: flex; flex-direction: column; gap: .35rem; font-size: 1rem; color: var(--parchment); margin-bottom: 1rem; }
.app-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .app-form .row { grid-template-columns: 1fr; } }
.app-form input, .app-form select, .app-form textarea {
  font: inherit; font-size: 1.05rem; color: var(--parchment);
  background: var(--void); border: 1px solid var(--line); border-radius: var(--radius); padding: .65rem .8rem; width: 100%;
}
.app-form input, .app-form select { height: 3rem; }
.app-form textarea { resize: vertical; }
.app-form input:focus, .app-form select:focus, .app-form textarea:focus { border-color: var(--gold); outline: 2px solid rgba(205,163,79,.35); outline-offset: 0; }
.app-form input::placeholder, .app-form textarea::placeholder { color: #6F6690; }
.hint { color: var(--muted); font-size: 1rem; margin-bottom: .75rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.checks label { flex-direction: row; align-items: center; gap: .5rem; margin: 0; }
.checks input { width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }
.hp { position: absolute; left: -9999px; }

.success { min-height: 100vh; display: flex; align-items: center; text-align: center; }
.success .page-title { justify-content: center; }
.success p { color: var(--muted); max-width: 48ch; }

@media (max-width: 600px) {
  .tabs { display: flex; flex-direction: column; width: 100%; }
  .tabs button { text-align: left; }
  .tabs button + button { border-left: 0; border-top: 1px solid var(--line); }
}

/* Inner-page banner (apply) */
.hero-page { min-height: 0; padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.hero-page .hero-tagline { margin-bottom: 0; max-width: 46ch; }
.form-section { padding-top: 1.5rem; }

/* ==========================================================================
   Motion & particles (all disabled under prefers-reduced-motion)
   ========================================================================== */
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Slow drift on the hero photo */
.hero-bg { transform: scale(1.06); transform-origin: 60% 50%; will-change: transform; }
@keyframes drift { from { background-position: center 42%; } to { background-position: 52% 46%; } }
.hero:not(.hero-page) .hero-bg { animation: drift 30s ease-in-out infinite alternate; }

/* Hero entrance: pieces rise in one after another */
.js:not(.reduce-motion) .hero-copy > *,
.js:not(.reduce-motion) .hero-page .wrap > * { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.loaded .hero-copy > *, .loaded .hero-page .wrap > * { opacity: 1 !important; transform: none !important; }
.loaded .hero-copy > :nth-child(1), .loaded .hero-page .wrap > :nth-child(1) { transition-delay: .05s; }
.loaded .hero-copy > :nth-child(2), .loaded .hero-page .wrap > :nth-child(2) { transition-delay: .18s; }
.loaded .hero-copy > :nth-child(3) { transition-delay: .32s; }
.loaded .hero-copy > :nth-child(4) { transition-delay: .46s; }
.loaded .hero-copy > :nth-child(5) { transition-delay: .6s; }

/* Title: a band of light sweeps across the gold once, then every few seconds */
.hero-title { background-size: 100% 100%; position: relative; }
.js:not(.reduce-motion) .hero-title {
  background-image:
    linear-gradient(105deg, transparent 40%, rgba(255,255,240,.95) 50%, transparent 60%),
    linear-gradient(180deg, #FFF6D8 0%, var(--gold-hi) 28%, var(--gold) 58%, #9A6F27 82%, #6E4E1A 100%);
  background-size: 250% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  background-repeat: no-repeat;
  animation: sheen 7s ease-in-out 1.2s infinite;
}
@keyframes sheen { 0% { background-position: 160% 0, 0 0; } 22%, 100% { background-position: -60% 0, 0 0; } }

/* Gauge: energy rippling through lit segments */
.gauge-seg.lit::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%);
  background-size: 300% 100%; animation: ripple 2.6s linear infinite;
  mix-blend-mode: overlay;
}
.gauge-seg:nth-child(2n).lit::before { animation-delay: .25s; }
.gauge-seg:nth-child(3n).lit::before { animation-delay: .5s; }
@keyframes ripple { from { background-position: 150% 0; } to { background-position: -150% 0; } }
.gauge.locked { animation: breathe 3.5s ease-in-out infinite; }
@keyframes breathe { 0%,100% { box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 0 0 1px var(--gold-deep), 0 0 0 4px rgba(122,90,34,.35); } 50% { box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 0 0 1px var(--gold-deep), 0 0 0 4px rgba(122,90,34,.35), 0 0 22px rgba(205,163,79,.35); } }

/* Gold buttons: shine on hover */
.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-gold:hover::after { left: 130%; }
.btn { transition: filter .15s, background-color .15s, color .15s, transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-ghost:hover { box-shadow: 0 0 18px rgba(205,163,79,.2); }

/* Cards lift and glow in their class color */
.class-card { transition: transform .25s ease, box-shadow .25s ease; }
.class-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.4), 0 0 24px color-mix(in srgb, var(--cc) 30%, transparent); }

/* Defeated skulls pulse softly */
.boss.down .boss-state svg { filter: drop-shadow(0 0 4px var(--arcane)); }

/* Scroll reveals */
.js:not(.reduce-motion) .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease var(--d, 0ms), transform .8s cubic-bezier(.2,.8,.2,1) var(--d, 0ms); }
.js:not(.reduce-motion) .reveal.in { opacity: 1; transform: none; }

/* Section heading rule draws in */
.js:not(.reduce-motion) .section-head h2::after { transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.2,.8,.2,1) .25s; }
.js:not(.reduce-motion) .section-head.in h2::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero:not(.hero-page) .hero-bg { animation: none; transform: none; }
  .gauge-seg.lit::before, .gauge.locked { animation: none; }
  .btn-gold::after { display: none; }
}

/* ---------- Class icons ---------- */
.class-top { display: flex; align-items: center; gap: .9rem; margin-bottom: .2rem; }
.class-icon {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cc) 70%, transparent), 0 0 18px color-mix(in srgb, var(--cc) 35%, transparent), 0 6px 14px rgba(0,0,0,.5);
  transition: transform .3s ease, box-shadow .3s ease;
}
.class-card:hover .class-icon { transform: rotate(-6deg) scale(1.06); box-shadow: 0 0 0 2px var(--cc), 0 0 26px color-mix(in srgb, var(--cc) 55%, transparent), 0 6px 14px rgba(0,0,0,.5); }
.class-top .class-name { line-height: 1.1; }
.select-with-icon { display: flex; align-items: center; gap: .6rem; }
.form-class-icon { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--gold-deep), 0 0 12px rgba(205,163,79,.3); }

/* ---------- Gallery ---------- */
.gallery-grid { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 1fr; gap: 1rem; }
.photo { aspect-ratio: 4 / 3; min-width: 0; }
@media (min-width: 700px) { .photo:first-child { grid-column: span 2; grid-row: span 2; } }
.photo button {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; position: relative; overflow: hidden;
  border-radius: 6px; background: var(--dusk);
  box-shadow: 0 0 0 1px var(--line), 0 10px 26px rgba(0,0,0,.4);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s; }
.photo button::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(14,10,26,.92) 100%);
  opacity: .85; transition: opacity .3s;
}
.photo button:hover img { transform: scale(1.05); filter: saturate(1.15); }
.photo button:hover { box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(205,163,79,.25), 0 10px 26px rgba(0,0,0,.4); }
.photo-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: .8rem 1rem; text-align: left; display: flex; flex-direction: column; gap: .1rem; }
.photo-cap span { font-family: var(--heading); font-weight: 700; color: var(--parchment); font-size: 1rem; line-height: 1.3; }
.photo-cap small { color: var(--gold-hi); font-size: .85rem; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; color: var(--parchment); }
.lightbox::backdrop { background: radial-gradient(circle at 50% 40%, rgba(30,24,56,.92), rgba(8,6,14,.97)); backdrop-filter: blur(4px); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(92vw, 1400px); text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--gold-deep), 0 20px 60px rgba(0,0,0,.7); }
.lightbox figcaption { margin-top: 1rem; font-family: var(--heading); color: var(--gold-hi); }
.lb-close, .lb-nav {
  position: fixed; border: 1px solid var(--line); color: var(--parchment); cursor: pointer;
  background: linear-gradient(180deg, rgba(42,36,70,.9), rgba(20,16,31,.9)); border-radius: 50%;
  width: 3rem; height: 3rem; font-size: 1.8rem; line-height: 1; display: grid; place-items: center;
}
.lb-close { top: calc(1rem + env(safe-area-inset-top, 0px)); right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-nav:hover { border-color: var(--gold); color: var(--gold-hi); }
@media (max-width: 600px) { .lb-nav { top: auto; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); transform: none; } }
.js:not(.reduce-motion) .lightbox[open] img { animation: lbIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Recruitment closed / empty */
.not-recruiting {
  margin: 0 0 3rem; padding: 1.75rem 1.5rem; text-align: center; border-radius: 6px;
  background: linear-gradient(160deg, rgba(42,36,70,.7), rgba(24,19,40,.6));
  border: 1px solid var(--line);
}
.not-recruiting p { margin: 0; font-family: var(--heading); font-weight: 700; font-size: 1.35rem; color: var(--gold-hi); }

/* WordPress admin bar (logged-in officers) */
.admin-bar .site-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
@media (max-width: 782px) { .admin-bar .site-header { top: calc(46px + env(safe-area-inset-top, 0px)); } }
@media (max-width: 600px) { .admin-bar .site-header { top: env(safe-area-inset-top, 0px); } }

/* Application page messages + single posts */
.form-notice { padding: 1.5rem; border-radius: 6px; margin-bottom: 1.5rem; background: linear-gradient(160deg, rgba(42,36,70,.8), rgba(24,19,40,.7)); border: 1px solid var(--gold-deep); }
.form-notice h2 { margin-bottom: .4rem; }
.form-notice p:last-child { margin-bottom: 0; }
.form-notice.error { border-color: #B5523B; }
.entry { padding: clamp(3rem, 6vw, 5rem) 0; }
.entry-content img { border-radius: 6px; }
.entry-meta { color: var(--muted); font-size: 1rem; margin-bottom: 1.5rem; }
