/* =========================
   Star Project Careers UI
   Sleek, modern, cinematic
   ========================= */

*{box-sizing:border-box}
html,body{height:100%}
:root{
  --bg0:#05060a;
  --bg1:#070a12;
  --text:#ffffff;
  --muted:rgba(255,255,255,.72);

  --card:rgba(255,255,255,.06);
  --card2:rgba(0,0,0,.25);
  --border:rgba(255,255,255,.10);
  --border2:rgba(255,255,255,.14);

  --r:18px;
  --r2:24px;

  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --glow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 80px rgba(0,0,0,.55);

  --accent: rgba(140, 190, 255, .95);
  --accentBg: rgba(90, 160, 255, .16);
  --accentBd: rgba(90, 160, 255, .35);

  --danger: rgba(255, 120, 120, .9);
  --dangerBg: rgba(255, 120, 120, .12);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

body{
  margin:0;
  font-family:var(--font);
  background:radial-gradient(1200px 800px at 50% -10%, rgba(110,170,255,.18), transparent 60%),
             radial-gradient(900px 700px at 15% 10%, rgba(255,255,255,.10), transparent 55%),
             radial-gradient(1000px 800px at 70% 110%, rgba(255,160,90,.10), transparent 55%),
             linear-gradient(180deg, var(--bg0), var(--bg1));
  color:var(--text);
  overflow-x:hidden;
}

a{color:inherit}
.muted{color:var(--muted)}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.hr{height:1px;background:rgba(255,255,255,.09);margin:14px 0}

/* ---------- Background ---------- */
.bg{
  position:fixed; inset:0;
  z-index:-3;
  opacity:.70;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(255,255,255,.12), transparent 55%),
    radial-gradient(700px 500px at 85% 0%, rgba(77,163,255,.16), transparent 55%),
    radial-gradient(700px 600px at 50% 110%, rgba(255,155,61,.10), transparent 55%),
    url("back.png");
  background-size:cover;
  background-position:center;
  filter:saturate(.95) contrast(1.05);
}
.bg::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.78));
}

.grain{
  position:fixed; inset:-20%;
  z-index:-2;
  pointer-events:none;
  opacity:.10;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  transform:translateZ(0);
}

/* ---------- Layout ---------- */
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:18px 18px 28px;
}

/* ---------- Top Nav ---------- */
.top{
  position:sticky; top:0; z-index:10;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.40);
  backdrop-filter: blur(14px);
}

.brand{
  display:flex; gap:12px; align-items:center;
  text-decoration:none;
  font-weight:800;
  letter-spacing:.2px;
}
.brandMark{
  width:34px; height:34px;
  display:grid; place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.spark{
  width:10px;height:10px;border-radius:999px;
  background:rgba(255,255,255,.92);
  box-shadow: 0 0 18px rgba(255,255,255,.25), 0 0 36px rgba(120,180,255,.22);
}
.brandText{font-size:14px}

.nav{display:flex; gap:8px; align-items:center}
.nav a{
  text-decoration:none;
  color:rgba(255,255,255,.70);
  padding:8px 10px;
  border-radius:12px;
  border:1px solid transparent;
}
.nav a:hover{
  color:#fff;
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.08);
}
.nav a.active{
  color:#fff;
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.10);
}

/* ---------- Hero ---------- */
.hero{
  margin-top:14px;
  border-radius:var(--r2);
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--glow);
  overflow:hidden;
  position:relative;
}
.hero::before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(700px 240px at 10% 10%, rgba(120,180,255,.22), transparent 60%),
    radial-gradient(640px 260px at 90% 20%, rgba(255,190,120,.14), transparent 62%),
    radial-gradient(900px 340px at 50% 110%, rgba(255,255,255,.08), transparent 60%);
  pointer-events:none;
  opacity:.9;
}
.heroTop{
  position:relative;
  padding:22px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}
@media (max-width: 980px){
  .heroTop{grid-template-columns:1fr}
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:rgba(255,255,255,.78);
  margin-bottom:10px;
}
.kicker::before{
  content:"";
  width:10px;height:10px;border-radius:999px;
  background:rgba(255,255,255,.75);
  box-shadow:0 0 18px rgba(255,255,255,.20);
}

.hero h1{
  margin:0 0 8px 0;
  font-size:44px;
  line-height:1.05;
  letter-spacing:-.02em;
}
@media (max-width: 520px){
  .hero h1{font-size:36px}
}

.controls{
  margin-top:16px;
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

.field{
  position:relative;
  flex:1 1 420px;
  min-width: 260px;
}

.icon{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  width:18px;height:18px;
  color:rgba(255,255,255,.68);
}
.icon svg{width:18px;height:18px;display:block}

.label{
  display:block;
  font-size:12px;
  color:rgba(255,255,255,.68);
  margin:2px 0 6px 2px;
  letter-spacing:.02em;
}

input, textarea, select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
  color:#fff;
  outline:none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.field input{
  padding-left:40px;
}

input::placeholder, textarea::placeholder{
  color:rgba(255,255,255,.45);
}

input:focus, textarea:focus, select:focus{
  border-color: rgba(120,180,255,.55);
  background:rgba(0,0,0,.28);
}

textarea{min-height:120px;resize:vertical}

.submeta{
  margin-top:14px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.dotMini{
  width:8px;height:8px;border-radius:999px;
  background:rgba(255,255,255,.72);
  box-shadow:0 0 18px rgba(120,180,255,.22);
}

/* ---------- Hero side card ---------- */
.heroCard{
  border-radius:20px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  overflow:hidden;
}
.heroCardInner{
  padding:18px;
  display:grid;
  gap:12px;
}
.chip{
  display:inline-flex;
  width:max-content;
  gap:10px;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.82);
  font-size:12px;
}
.heroStat{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}
.heroStatNum{
  width:34px;height:34px;
  border-radius:14px;
  display:grid; place-items:center;
  background:rgba(120,180,255,.14);
  border:1px solid rgba(120,180,255,.22);
}
.heroStatTitle{
  font-weight:800;
  margin-bottom:2px;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:hover{background:rgba(255,255,255,.12)}
.btn:active{transform:translateY(1px)}
.btnIcon svg{width:18px;height:18px;display:block}

.btn.primary{
  background:var(--accentBg);
  border-color:var(--accentBd);
}
.btn.primary:hover{
  background:rgba(90,160,255,.22);
  border-color:rgba(120,180,255,.52);
}
.btn.ghost{
  background:transparent;
  border-color:rgba(255,255,255,.12);
}
.btn.ghost:hover{
  background:rgba(255,255,255,.06);
}

/* ---------- Positions grid & cards ---------- */
.grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
}
@media (max-width: 900px){
  .grid{grid-template-columns:1fr}
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--r2);
  padding:16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(120,180,255,.20);
  background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
}
.card h2{
  margin:0;
  font-size:18px;
  letter-spacing:-.01em;
}
.pills{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  font-size:12px;
  color:rgba(255,255,255,.72);
}
.card .muted{
  margin-top:10px;
  white-space:pre-wrap;
}

/* Your script uses .pill for MC labels too; make those feel clickable */
label.pill{
  width:100%;
  cursor:pointer;
}
label.pill input{
  width:auto;
}

/* ---------- Questionnaire ---------- */
.qform{
  display:grid;
  gap:12px;
  margin-top:14px;
}
.q{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  border-radius:18px;
  padding:12px;
}
.q label{
  display:block;
  font-weight:800;
  margin-bottom:8px;
  letter-spacing:-.01em;
}
.q .help{
  font-size:12px;
  color:rgba(255,255,255,.62);
  margin-top:8px;
}

/* ---------- Apply panel (looks like a modern drawer/card) ---------- */
.apply{
  margin-top:16px;
  border-radius:var(--r2);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding:16px;
}
.applyHeader{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.apply h2{
  margin:0;
  font-size:20px;
  letter-spacing:-.01em;
}
.applyActions{
  margin-top:14px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

/* ---------- Footer ---------- */
.footer{
  margin-top:26px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px 2px;
  border-top:1px solid rgba(255,255,255,.10);
}
.footerLinks{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}
.footer a{
  text-decoration:none;
}
.footer a:hover{
  color:#fff;
  text-decoration:underline;
  text-underline-offset: 3px;
}

/* ---------- Small screen polish ---------- */
@media (max-width: 520px){
  .top{padding:12px 14px}
  .wrap{padding:14px 14px 22px}
  .heroTop{padding:16px}
  .btn{width:100%; justify-content:center}
  .field{flex:1 1 100%}
}
/* ---------- Modal overlay + drawer ---------- */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
  opacity:0;
  transition: opacity .18s ease;
  z-index:50;
}

.drawer{
  position:fixed;
  inset:0;
  display:flex;
  justify-content:flex-end;
  pointer-events:none;
  z-index:60;
}

.drawerPanel{
  width:min(620px, 92vw);
  height:100%;
  border-left:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(16px);
  box-shadow: -30px 0 80px rgba(0,0,0,.55);
  padding:16px;
  transform: translateX(18px);
  opacity:0;
  transition: transform .22s ease, opacity .22s ease;
}

/* open state */
body.modalOpen .overlay{ opacity:1; }
body.modalOpen .drawer{ pointer-events:auto; }
body.modalOpen .drawerPanel{
  transform: translateX(0);
  opacity:1;
}

/* reduce motion accessibility */
@media (prefers-reduced-motion: reduce){
  .overlay, .drawerPanel { transition: none; }
}
