/* =====================================================================
   LaBellaCasting — Live Castings
   Extends assets/css/site.css. Uses only the existing design tokens,
   so a palette change in site.css flows through here untouched.
   ===================================================================== */

/* ---------- Listing hero ---------- */
.cst-hero{
  position:relative;padding:calc(112px + 5vw) 0 3.2rem;
  border-bottom:1px solid var(--line-soft);overflow:hidden;
}
.cst-hero__glow{
  position:absolute;inset:-40% -10% auto;height:130%;pointer-events:none;
  background:radial-gradient(60% 55% at 50% 0%,var(--gold-glow),transparent 70%);
}
.cst-hero .shell{position:relative}
.cst-hero h1{margin:.28em 0 .32em}
.cst-hero .lede{max-width:60ch}
.cst-hero__count{
  display:inline-flex;align-items:baseline;gap:.55rem;margin-top:1.6rem;
  padding:.5rem 1.05rem;border:1px solid var(--line);border-radius:999px;
  background:var(--plate);
}
.cst-hero__count strong{
  font-family:var(--display);font-size:1.5rem;color:var(--gold);line-height:1;
}
.cst-hero__count span{font-size:.85rem;color:var(--silver);letter-spacing:.04em}

/* ---------- Filter bar ---------- */
.cst-filters{
  position:sticky;top:0;z-index:20;
  background:rgba(10,10,11,.9);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line-soft);padding:.9rem 0;
}
.cst-filters__form{
  display:flex;flex-wrap:wrap;gap:.85rem 1.1rem;align-items:flex-end;
}
.cst-field{display:flex;flex-direction:column;gap:.3rem;min-width:150px;flex:1 1 150px}
.cst-field label{
  font-size:.66rem;text-transform:uppercase;letter-spacing:.16em;color:var(--mute);
}
.cst-field select{
  appearance:none;width:100%;padding:.62rem 2rem .62rem .8rem;
  background:var(--plate) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a9a7a1' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right .75rem center/10px 6px;
  border:1px solid var(--line);border-radius:3px;
  color:var(--pearl);font-family:var(--body);font-size:.9rem;font-weight:300;
  transition:border-color .2s var(--ease);cursor:pointer;
}
.cst-field select:hover{border-color:var(--gold-deep)}
.cst-field--act{flex:0 0 auto;flex-direction:row;align-items:center;gap:.9rem}
.cst-clear{font-size:.82rem;color:var(--silver);border-bottom:1px solid transparent}
.cst-clear:hover{color:var(--gold);border-bottom-color:currentColor}

/* ---------- Card grid ---------- */
.cst-grid{
  display:grid;gap:1.6rem;
  grid-template-columns:repeat(auto-fill,minmax(304px,1fr));
}

.cst-card{
  display:flex;flex-direction:column;
  background:var(--plate);border:1px solid var(--line-soft);border-radius:4px;
  overflow:hidden;
  transition:transform .45s var(--ease),border-color .45s var(--ease),box-shadow .45s var(--ease);
}
.cst-card:hover{
  transform:translateY(-6px);border-color:var(--gold-deep);
  box-shadow:0 18px 44px -24px rgba(0,0,0,.9);
}

.cst-card__media{
  position:relative;display:block;aspect-ratio:16/10;overflow:hidden;
  background:var(--raise);
}
.cst-card__media img{
  width:100%;height:100%;object-fit:cover;
  transition:transform .7s var(--ease),opacity .4s var(--ease);opacity:.86;
}
.cst-card:hover .cst-card__media img{transform:scale(1.045);opacity:1}
.cst-card__ph{
  position:absolute;inset:0;display:grid;place-items:center;
  font-family:var(--display);font-size:3.4rem;color:var(--line);
  background:linear-gradient(140deg,var(--raise),var(--plate));
}

/* Status pill — tone classes mirror badge() tones in functions.php */
.cst-card__pill{
  position:absolute;left:.85rem;top:.85rem;z-index:2;
  padding:.28rem .68rem;border-radius:999px;
  font-size:.63rem;letter-spacing:.14em;text-transform:uppercase;
  background:rgba(10,10,11,.82);backdrop-filter:blur(6px);
  border:1px solid var(--line);color:var(--silver);
}
.cst-card__pill.is-ok{color:var(--ok);border-color:rgba(95,158,112,.42)}
.cst-card__pill.is-warn{color:var(--warn);border-color:rgba(201,151,63,.46)}
.cst-card__pill.is-gold{color:var(--gold);border-color:var(--gold-deep)}
.cst-card__pill.is-mute{color:var(--mute)}

.cst-card__body{display:flex;flex-direction:column;flex:1;padding:1.15rem 1.25rem 1.05rem}
.cst-card__kicker{
  font-size:.64rem;letter-spacing:.18em;text-transform:uppercase;color:var(--gold);
  margin-bottom:.5rem;
}
.cst-card__body h3{font-size:1.16rem;line-height:1.28;margin:0 0 .7rem}
.cst-card__body h3 a{color:var(--pearl)}
.cst-card__body h3 a:hover{color:var(--gold-hi)}

.cst-card__meta{
  list-style:none;margin:0 0 1.05rem;padding:0;
  display:flex;flex-wrap:wrap;gap:.3rem .5rem;
  font-size:.79rem;color:var(--silver);
}
.cst-card__meta li{display:flex;align-items:center}
.cst-card__meta li+li::before{
  content:'';width:3px;height:3px;border-radius:50%;
  background:var(--line);margin-right:.5rem;
}
.cst-card__meta li.is-pay{color:var(--gold)}

.cst-card__foot{
  margin-top:auto;padding-top:.9rem;border-top:1px solid var(--line-soft);
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
}
.cst-card__deadline{font-size:.74rem;letter-spacing:.06em;color:var(--mute)}
.cst-card__go{
  display:inline-flex;align-items:center;gap:.45rem;
  font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;color:var(--gold);
  white-space:nowrap;
}
.cst-card__go svg{width:20px;height:8px;transition:transform .35s var(--ease)}
.cst-card:hover .cst-card__go svg{transform:translateX(4px)}

/* ---------- Empty state ---------- */
.cst-empty{
  text-align:center;max-width:56ch;margin:0 auto;padding:3.5rem 0 1rem;
}
.cst-empty__icon{width:52px;height:52px;color:var(--line);margin-bottom:1.4rem}
.cst-empty h2{font-size:clamp(1.5rem,3vw,2.1rem)}
.cst-empty .hero__cta{justify-content:center;margin-top:1.8rem}

/* ---------- Pager ---------- */
.cst-pager{
  display:flex;align-items:center;justify-content:center;gap:1.6rem;
  margin-top:3rem;font-size:.85rem;color:var(--silver);
}
.cst-pager a{letter-spacing:.1em;text-transform:uppercase;font-size:.75rem}

/* =====================================================================
   DETAIL PAGE
   ===================================================================== */
.cdet{position:relative}

.cdet__hero{
  position:relative;padding:calc(120px + 4vw) 0 3rem;overflow:hidden;
  border-bottom:1px solid var(--line-soft);
  background:linear-gradient(150deg,var(--plate),var(--ink));
}
.cdet__hero-img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.3;
}
.cdet__hero-veil{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(10,10,11,.72) 0%,rgba(10,10,11,.86) 55%,var(--ink) 100%);
}
.cdet__hero-in{position:relative}

.cdet__crumbs{
  display:flex;gap:.6rem;align-items:center;margin-bottom:1.5rem;
  font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--mute);
}
.cdet__crumbs a{color:var(--silver)}
.cdet__crumbs a:hover{color:var(--gold)}

.cdet__hero h1{margin:.5em 0 .2em;max-width:22ch}
.cdet__client{
  font-size:.78rem;letter-spacing:.16em;text-transform:uppercase;color:var(--gold);
  margin:0 0 1.9rem;
}
.cdet__hero .cst-card__pill{position:static;display:inline-block}

.cdet__facts{
  list-style:none;margin:0;padding:0;
  display:grid;gap:1.1rem 2.2rem;
  grid-template-columns:repeat(auto-fit,minmax(140px,max-content));
}
.cdet__facts li{display:flex;flex-direction:column;gap:.28rem;font-size:.95rem}
.cdet__facts b{
  font-weight:400;font-size:.64rem;letter-spacing:.16em;
  text-transform:uppercase;color:var(--mute);
}

/* ---------- Body layout ---------- */
.cdet__body{
  display:grid;gap:3rem;align-items:start;
  grid-template-columns:minmax(0,1fr) 330px;
  padding-block:3.2rem 4rem;
}
.cdet__main{min-width:0}
.cdet__summary{
  font-size:clamp(1.05rem,1.7vw,1.25rem);line-height:1.7;color:var(--pearl);
  padding-bottom:1.8rem;margin-bottom:2rem;border-bottom:1px solid var(--line-soft);
}
.cdet__block{margin-bottom:2.6rem}
.cdet__block h2{font-size:clamp(1.25rem,2.2vw,1.6rem);margin-bottom:.9rem}
.cdet__prose{color:var(--silver);line-height:1.8}

.cdet__reqs{list-style:none;margin:0;padding:0;border-top:1px solid var(--line-soft)}
.cdet__reqs li{
  display:flex;gap:1.2rem;padding:.78rem 0;
  border-bottom:1px solid var(--line-soft);font-size:.95rem;
}
.cdet__reqs li span{
  flex:0 0 132px;font-size:.68rem;letter-spacing:.14em;
  text-transform:uppercase;color:var(--mute);padding-top:.2rem;
}

.cdet__chips{list-style:none;display:flex;flex-wrap:wrap;gap:.55rem;margin:0;padding:0}
.cdet__chips li{
  padding:.4rem .85rem;border:1px solid var(--line);border-radius:999px;
  font-size:.78rem;color:var(--silver);background:var(--plate);
}

.cdet__note{
  border:1px solid var(--line-soft);border-left:2px solid var(--gold-deep);
  border-radius:3px;padding:1.4rem 1.5rem;background:var(--plate);
}
.cdet__note h2{font-size:1.05rem;letter-spacing:.06em}
.cdet__note p{color:var(--silver);font-size:.92rem;margin-bottom:.7rem}
.cdet__note-more{margin-bottom:0;font-size:.85rem}

/* ---------- Sticky apply panel ---------- */
.cdet__side{position:sticky;top:96px;display:flex;flex-direction:column;gap:1rem}
.cdet__apply{
  background:var(--plate);border:1px solid var(--line);border-radius:4px;
  padding:1.5rem 1.4rem;
}
.cdet__deadline{
  display:flex;flex-direction:column;gap:.24rem;
  padding-bottom:1.15rem;margin-bottom:1.25rem;border-bottom:1px solid var(--line-soft);
}
.cdet__deadline span{
  font-size:.64rem;letter-spacing:.16em;text-transform:uppercase;color:var(--mute);
}
.cdet__deadline strong{font-family:var(--display);font-size:1.22rem;font-weight:400}
.cdet__deadline em{font-style:normal;font-size:.8rem;color:var(--warn)}

.btn--full{display:block;width:100%;text-align:center}
.cdet__hint{
  font-size:.79rem;color:var(--mute);line-height:1.6;margin:.85rem 0 0;
}
.cdet__signin{
  display:block;margin-top:.9rem;font-size:.82rem;
  color:var(--silver);text-align:center;
}
.cdet__signin:hover{color:var(--gold)}
.cdet__closed{color:var(--mute);font-size:.92rem;margin:0 0 1rem}
.cdet__applied{font-size:.92rem;margin:0 0 1rem;display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}

.cdet__ref{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:.8rem 1.1rem;border:1px dashed var(--line);border-radius:3px;
}
.cdet__ref span{font-size:.64rem;letter-spacing:.16em;text-transform:uppercase;color:var(--mute)}
.cdet__ref code{font-family:var(--body);font-size:.86rem;color:var(--silver);letter-spacing:.06em}

/* ---------- Mobile sticky action bar ---------- */
.cdet__bar{
  display:none;position:fixed;left:0;right:0;bottom:0;z-index:60;
  padding:.75rem var(--gut);padding-bottom:calc(.75rem + env(safe-area-inset-bottom));
  background:rgba(10,10,11,.94);backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
  align-items:center;justify-content:space-between;gap:1rem;
}
.cdet__bar-info{display:flex;flex-direction:column;min-width:0}
.cdet__bar-info strong{
  font-weight:400;font-size:.88rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cdet__bar-info span{font-size:.72rem;color:var(--warn)}

/* =====================================================================
   GUEST APPLY MODAL
   ===================================================================== */
.cmodal{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:var(--gut)}
.cmodal[hidden]{display:none}
.cmodal__scrim{
  position:absolute;inset:0;background:rgba(5,5,6,.82);
  backdrop-filter:blur(5px);animation:cmFade .3s var(--ease) both;
}
.cmodal__panel{
  position:relative;width:min(520px,100%);max-height:88vh;overflow-y:auto;
  background:linear-gradient(165deg,var(--raise),var(--plate));
  border:1px solid var(--line);border-radius:5px;
  padding:2.6rem 2.2rem 2rem;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.95);
  animation:cmRise .42s var(--ease) both;
}
@keyframes cmFade{from{opacity:0}to{opacity:1}}
@keyframes cmRise{from{opacity:0;transform:translateY(22px) scale(.985)}to{opacity:1;transform:none}}

.cmodal__x{
  position:absolute;right:1rem;top:1rem;width:34px;height:34px;
  display:grid;place-items:center;
  background:none;border:1px solid var(--line);border-radius:50%;
  color:var(--silver);cursor:pointer;transition:all .25s var(--ease);
}
.cmodal__x:hover{color:var(--gold);border-color:var(--gold-deep)}
.cmodal__x svg{width:12px;height:12px}

.cmodal__eyebrow{
  font-size:.64rem;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);
}
.cmodal h2{font-size:clamp(1.65rem,4vw,2.15rem);margin:.5rem 0 .7rem}
.cmodal__lede{color:var(--silver);font-size:.98rem;line-height:1.72;margin-bottom:1.4rem}
.cmodal__project{color:var(--pearl);font-weight:400}

.cmodal__points{list-style:none;margin:0 0 1.8rem;padding:0;display:grid;gap:.6rem}
.cmodal__points li{
  position:relative;padding-left:1.5rem;font-size:.88rem;color:var(--silver);
}
.cmodal__points li::before{
  content:'';position:absolute;left:0;top:.52em;
  width:7px;height:7px;border:1px solid var(--gold);
  transform:rotate(45deg);
}

.cmodal__acts{display:grid;gap:.7rem}
.cmodal__dismiss{
  background:none;border:0;padding:.5rem;cursor:pointer;
  font-family:var(--body);font-size:.84rem;color:var(--mute);
  letter-spacing:.04em;transition:color .2s var(--ease);
}
.cmodal__dismiss:hover{color:var(--silver)}

.cmodal__fine{
  margin:1.5rem 0 0;padding-top:1.2rem;border-top:1px solid var(--line-soft);
  font-size:.76rem;color:var(--mute);line-height:1.65;
}

body.cmodal-open{overflow:hidden}

/* =====================================================================
   HOMEPAGE LIVE CASTINGS STRIP
   ===================================================================== */
.cst-strip__head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:1.5rem;flex-wrap:wrap;margin-bottom:2rem;
}
.cst-strip__head .sec-head{margin-bottom:0}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width:1024px){
  .cdet__body{grid-template-columns:1fr;gap:2.2rem}
  .cdet__side{position:static;flex-direction:row;flex-wrap:wrap}
  .cdet__apply{flex:1 1 300px}
  .cdet__ref{flex:1 1 200px}
}

@media (max-width:760px){
  .cst-filters{position:static}
  .cst-filters__form{gap:.7rem}
  .cst-field{flex:1 1 calc(50% - .35rem);min-width:0}
  .cst-field--act{flex:1 1 100%;justify-content:space-between}
  .cst-grid{grid-template-columns:1fr;gap:1.2rem}

  /* The sticky panel becomes the sticky bar — never both at once.
     .has-bar is set by casting.php only when the bar actually renders,
     so closed and already-applied castings keep their panel on mobile. */
  .cdet.has-bar .cdet__apply{display:none}
  .cdet.has-bar .cdet__bar{display:flex}
  .cdet.has-bar .cdet__body{padding-bottom:6rem}
  .cdet__reqs li{flex-direction:column;gap:.25rem}
  .cdet__reqs li span{flex:none}
  .cdet__facts{grid-template-columns:repeat(2,1fr);gap:.9rem 1.2rem}

  .cmodal{padding:1rem}
  .cmodal__panel{padding:2.2rem 1.5rem 1.6rem}
}

@media (prefers-reduced-motion:reduce){
  .cst-card,.cst-card__media img,.cst-card__go svg{transition:none}
  .cst-card:hover{transform:none}
  .cmodal__panel,.cmodal__scrim{animation:none}
}
