/* ============================================================
   Habitation Checks Scotland — Careers pill (home hero) + Careers page
   (pages/careers.html). Dark Hab-navy card over the hero video, blurred,
   with gold accents — same look as the Albyn MOT careers form.
   Hab palette: navy #0A1F3D / #0B1C33, gold #C9A227 / #D4AF37, cream #F7F3EA.
   All classes prefixed hcw-.
   ============================================================ */

/* ---- Hero corner pill (bottom-right of .hero.hcs-wind) ---- */
.hero.hcs-wind .hcw-pill{
  position:absolute; right:clamp(1rem,2.4vw,2rem); bottom:clamp(3.4rem,7vh,4.4rem);
  z-index:1023; /* hero-inner sits at 1022 */ display:inline-flex; align-items:center; gap:.55rem;
  padding:.55rem 1rem .55rem .85rem; border-radius:999px;
  font:600 .66rem/1 'Montserrat','Segoe UI',sans-serif; letter-spacing:.16em; text-transform:uppercase;
  color:#F7F3EA!important; text-decoration:none!important;
  background:linear-gradient(180deg,rgba(11,28,51,.78),rgba(10,31,61,.92));
  border:1px solid rgba(212,175,55,.75);
  box-shadow:0 8px 22px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  transition:border-color .25s ease,transform .25s ease,box-shadow .25s ease,background .25s ease;
}
.hcw-pill .hcw-pill-icon{color:#D4AF37;font-size:.85rem;line-height:1}
.hcw-pill .hcw-arrow{color:#D4AF37;font-size:.85rem;line-height:1;transition:transform .25s ease}
.hcw-pill:hover,.hcw-pill:focus-visible{border-color:#D4AF37;transform:translateY(-2px);background:linear-gradient(180deg,rgba(201,162,39,.22),rgba(10,31,61,.95));
  box-shadow:0 12px 26px rgba(0,0,0,.4),0 0 18px rgba(212,175,55,.3)}
.hcw-pill:hover .hcw-arrow{transform:translateX(3px)}
.hcw-pill:focus-visible{outline:2px solid #D4AF37;outline-offset:3px}
@media (max-width:991.98px){
  /* hero is a nowrap flex row; let the pill drop onto its own line under the buttons */
  .hero.hcs-wind{flex-wrap:wrap;align-content:center}
  .hero.hcs-wind .hcw-pill{position:relative;z-index:1023;right:auto;bottom:auto;display:flex;flex:0 0 auto;width:max-content;max-width:calc(100% - 2rem);margin:.2rem auto 1.1rem;font-size:.62rem;letter-spacing:.14em;line-height:1.2}
}

/* ---- Careers page: form card over the blurred hero video ---- */
.hcw-stage{position:relative;isolation:isolate;overflow:hidden;clip-path:inset(0);background:#06101f;
  padding:clamp(1.25rem,4vh,3rem) .75rem clamp(2.5rem,7vh,4.5rem);font-family:'Montserrat','Segoe UI',sans-serif;color:#F7F3EA}
@media (min-width:992px){.main-wrapper>section.hcw-stage{padding-top:2.5rem}}
.main-wrapper>section.hcw-stage{padding-left:.75rem;padding-right:.75rem;padding-bottom:clamp(2.5rem,7vh,4.5rem)}
.main-wrapper>section.hcw-stage::before,.main-wrapper>section.hcw-stage::after{display:none!important;content:none!important} /* no site saltire watermark over the video */
.hcw-stage-bg{position:fixed!important;inset:0;z-index:-1!important;pointer-events:none} /* !important: site-wide "section > *{position:relative}" */
.hcw-stage-video{position:absolute;top:-40px;left:-40px;width:calc(100% + 80px);height:calc(100% + 80px);object-fit:cover;object-position:center;
  filter:blur(9px) saturate(1.1)}
.hcw-stage-bg::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,10,20,.42) 0%,rgba(6,16,32,.5) 55%,rgba(4,10,20,.68) 100%)}
@media (prefers-reduced-motion:reduce){.hcw-stage-video{display:none}}
.hcw-page{position:relative;max-width:900px;margin:0 auto}
.hcw-card{position:relative;background:rgba(9,22,41,.94);border:1px solid rgba(212,175,55,.32);border-radius:12px;overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.hcw-card{scroll-margin-top:6rem} /* clear the sticky mobile header */
@media (min-width:992px){.hcw-card{scroll-margin-top:1.5rem}}
.hcw-noscript{padding:1.4rem 1.7rem;margin:0}
.hcw-noscript a{color:#D4AF37}

.hcw-head{padding:1.6rem 1.7rem 1.3rem;border-bottom:1px solid rgba(212,175,55,.22)}
.hcw-kicker{font-size:.62rem;font-weight:700;letter-spacing:.24em;text-transform:uppercase;color:#D4AF37}
.hcw-head h1{margin:.45rem 0 .4rem;font-family:'Montserrat','Segoe UI',sans-serif;font-size:clamp(1.35rem,3vw,1.85rem);font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#fff;line-height:1.15}
.hcw-head h1 em{color:#D4AF37;font-style:normal}
.hcw-head p{margin:0;font-size:.84rem;color:rgba(247,243,234,.72);max-width:64ch}
.hcw-preview-note{margin:1rem 1.7rem 0;font-size:.72rem;color:#D4AF37;border:1px dashed rgba(212,175,55,.6);border-radius:6px;padding:.35rem .6rem;display:inline-block}
.hcw-thanks .hcw-preview-note{margin:1rem 0 0}

.hcw-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;padding:1.1rem 1.7rem 0}
.hcw-tab{display:block;cursor:pointer;text-decoration:none!important;text-align:left;padding:.8rem .95rem;border:1px solid rgba(247,243,234,.16);border-radius:6px;background:rgba(255,255,255,.04);color:#F7F3EA!important;
  font:700 .68rem/1.3 'Montserrat',sans-serif;letter-spacing:.12em;text-transform:uppercase;transition:border-color .2s,box-shadow .2s,background .2s}
.hcw-tab small{display:block;margin-top:.3rem;font-weight:500;letter-spacing:.02em;text-transform:none;font-size:.72rem;color:rgba(247,243,234,.6)}
.hcw-tab:hover{border-color:rgba(212,175,55,.6)}
.hcw-tab[aria-selected="true"]{background:rgba(212,175,55,.1);border-color:#D4AF37;box-shadow:0 0 0 1px #D4AF37 inset}
.hcw-tab[aria-selected="true"] small{color:rgba(247,243,234,.85)}
.hcw-tab:focus-visible{outline:2px solid #D4AF37;outline-offset:2px}

.hcw-body{padding:1.2rem 1.7rem 1.8rem}
.hcw-role-intro{font-size:.84rem;color:rgba(247,243,234,.8);margin:0 0 1rem;border-left:3px solid #C9A227;padding-left:.75rem}
.hcw-sec{border:1px solid rgba(247,243,234,.12);border-radius:8px;background:rgba(255,255,255,.02);padding:1.1rem 1.1rem .7rem;margin:0 0 1rem;min-width:0}
.hcw-sec>legend{float:none;width:auto;font-size:.66rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:#D4AF37;margin:0 0 .8rem;padding:0 .4rem}
.hcw-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem 1rem}
.hcw-grid .hcw-full{grid-column:1/-1}
.hcw-f{display:flex;flex-direction:column;gap:.3rem;min-width:0;margin-bottom:.2rem}
.hcw-f>label,.hcw-q{font-size:.76rem;font-weight:600;color:#F7F3EA}
.hcw-hint{font-size:.7rem;color:rgba(247,243,234,.55);font-weight:400}
.hcw-req{color:#D4AF37}
.hcw-app input[type=text],.hcw-app input[type=email],.hcw-app input[type=tel],.hcw-app input[type=number],.hcw-app input[type=month],.hcw-app select,.hcw-app textarea,.hcw-app input[type=file]{
  width:100%;box-sizing:border-box;background:#050d1a;color:#F7F3EA;border:1px solid rgba(247,243,234,.18);border-radius:4px;padding:.6rem .7rem;font:500 .88rem 'Montserrat',sans-serif;min-height:44px;color-scheme:dark}
.hcw-app input::placeholder,.hcw-app textarea::placeholder{color:rgba(247,243,234,.35)}
.hcw-app select option{background:#0B1C33;color:#F7F3EA}
.hcw-app input[type=file]{background:rgba(255,255,255,.03);border-style:dashed}
.hcw-app input[type=file]::file-selector-button{margin-right:.7rem;border:1px solid rgba(212,175,55,.6);border-radius:4px;background:transparent;color:#D4AF37;font:700 .66rem 'Montserrat';letter-spacing:.12em;text-transform:uppercase;padding:.4rem .7rem;cursor:pointer}
.hcw-app textarea{min-height:84px;resize:vertical}
.hcw-app input:focus,.hcw-app select:focus,.hcw-app textarea:focus{outline:none;border-color:#D4AF37;box-shadow:0 0 0 3px rgba(212,175,55,.2)}
.hcw-opts{display:flex;flex-wrap:wrap;gap:.45rem}
.hcw-opts label{display:inline-flex;align-items:center;gap:.45rem;min-height:40px;padding:.4rem .8rem;border:1px solid rgba(247,243,234,.18);border-radius:4px;background:rgba(255,255,255,.03);font-size:.78rem;color:#F7F3EA;cursor:pointer}
.hcw-opts label:has(input:checked){border-color:#D4AF37;background:rgba(212,175,55,.12)}
.hcw-opts input{accent-color:#D4AF37;width:16px;height:16px;margin:0}
.hcw-check{display:flex;gap:.6rem;align-items:flex-start;font-size:.78rem;line-height:1.45;color:rgba(247,243,234,.8)}
.hcw-check input{accent-color:#D4AF37;width:18px;height:18px;margin-top:.1rem;flex:0 0 auto}
.hcw-files{list-style:none;margin:.2rem 0 0;padding:0;font-size:.74rem;color:#F7F3EA}
.hcw-files li{padding:.25rem 0;border-bottom:1px dotted rgba(247,243,234,.15)}
.hcw-files li span{color:rgba(247,243,234,.55)}

.hcw-mode{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin-bottom:1rem}
.hcw-mode label{display:flex;gap:.6rem;align-items:flex-start;padding:.85rem;border:1px solid rgba(247,243,234,.16);border-radius:6px;cursor:pointer;background:rgba(255,255,255,.03);color:#F7F3EA}
.hcw-mode label strong{display:block;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase}
.hcw-mode label span{font-size:.74rem;color:rgba(247,243,234,.6)}
.hcw-mode label:has(input:checked){border-color:#D4AF37;box-shadow:0 0 0 1px #D4AF37 inset;background:rgba(212,175,55,.08)}
.hcw-mode input{accent-color:#D4AF37;margin-top:.15rem}

.hcw-hist{border:1px solid rgba(247,243,234,.14);border-radius:6px;padding:.8rem;margin-bottom:.7rem;position:relative;background:rgba(255,255,255,.02)}
.hcw-hist-n{font-size:.62rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:rgba(247,243,234,.55);margin-bottom:.5rem}
.hcw-rm{position:absolute;top:.5rem;right:.5rem;border:1px solid rgba(247,243,234,.25);border-radius:4px;background:transparent;color:#F7F3EA;font-size:.7rem;padding:.25rem .55rem;cursor:pointer;min-height:32px}
.hcw-add{border:1px dashed #D4AF37;border-radius:4px;background:transparent;color:#D4AF37;font:700 .68rem 'Montserrat';letter-spacing:.14em;text-transform:uppercase;padding:.6rem .9rem;cursor:pointer;min-height:42px;margin-bottom:.6rem}

/* accreditation rows: Yes/No toggle that reveals number, expiry + upload */
.hcw-cred-intro{margin:0 0 .2rem}
.hcw-cred-welcome{margin:0 0 .3rem;padding:.6rem .8rem;border-left:3px solid #D4AF37;background:rgba(212,175,55,.08);border-radius:4px;color:#F7F3EA;font-size:.85rem;font-weight:600}
.hcw-cred{grid-column:1/-1;border:1px solid rgba(247,243,234,.12);border-radius:6px;background:rgba(255,255,255,.02);transition:border-color .2s}
.hcw-cred:has(>.hcw-cred-row input[value="Yes"]:checked){border-color:rgba(212,175,55,.55)}
.hcw-cred-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.4rem 1rem;padding:.7rem .8rem}
.hcw-cred-q{display:flex;flex-direction:column;gap:.2rem;min-width:0}
.hcw-cred-row>.hcw-err{grid-column:1/-1}
.hcw-yn{display:inline-flex;border:1px solid rgba(247,243,234,.22);border-radius:999px;overflow:hidden;flex:0 0 auto}
.hcw-yn label{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:40px;padding:0 1rem;font-size:.74rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgba(247,243,234,.75);cursor:pointer}
.hcw-yn label+label{border-left:1px solid rgba(247,243,234,.22)}
.hcw-yn input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.hcw-yn label:has(input:checked){background:#D4AF37;color:#0A1F3D}
.hcw-yn label:has(input[value="No"]:checked){background:rgba(247,243,234,.16);color:#F7F3EA}
.hcw-yn label:has(input:focus-visible){outline:2px solid #D4AF37;outline-offset:-3px}
.hcw-cred-row.is-bad .hcw-yn{border-color:#f04438}
.hcw-cred-more{border-top:1px dashed rgba(247,243,234,.14);padding:.8rem .8rem .5rem;background:rgba(212,175,55,.04)}

.hcw-err{display:none;font-size:.72rem;color:#ff9b8f}
.hcw-f.is-bad input,.hcw-f.is-bad select,.hcw-f.is-bad textarea{border-color:#f04438}
.hcw-f.is-bad .hcw-err,.hcw-group.is-bad>.hcw-err{display:block}
.hcw-summary{display:none;border:1px solid #f04438;border-radius:6px;background:rgba(240,68,56,.12);color:#ffd1cc;font-size:.8rem;padding:.7rem .9rem;margin-bottom:1rem}
.hcw-summary.is-on{display:block}

.hcw-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:.8rem 1.2rem;margin-top:1rem}
.hcw-alt{font-size:.76rem;color:rgba(247,243,234,.6)}
.hcw-alt a{color:#D4AF37;font-weight:700}
.hcw-submit{appearance:none;cursor:pointer;min-height:3.1rem;padding:.85rem 1.8rem;border-radius:4px;color:#0A1F3D;font:700 .76rem 'Montserrat';letter-spacing:.12em;text-transform:uppercase;
  border:1px solid #a8841a;background:linear-gradient(180deg,#D4AF37,#C9A227);box-shadow:0 10px 22px rgba(0,0,0,.35)}
.hcw-submit:hover{background:linear-gradient(180deg,#e0bd4a,#D4AF37)}
.hcw-submit:disabled{opacity:.6;cursor:wait}

.hcw-thanks{text-align:center;padding:2.5rem 1rem}
.hcw-thanks .hcw-tick{width:58px;height:58px;margin:0 auto 1rem;border-radius:50%;background:rgba(212,175,55,.12);display:grid;place-items:center;color:#D4AF37;font-size:1.6rem;border:2px solid #D4AF37}
.hcw-thanks h3{font-family:'Montserrat',sans-serif;font-weight:700;font-size:1.3rem;letter-spacing:.06em;text-transform:uppercase;margin:0 0 .5rem;color:#fff}
.hcw-thanks p{color:rgba(247,243,234,.78);font-size:.86rem;margin:0 auto;max-width:46ch}
.hcw-thanks a{color:#D4AF37}

@media (max-width:640px){
  .main-wrapper>section.hcw-stage{padding:1rem .5rem 5.5rem}
  .hcw-head{padding:1.3rem 1rem 1rem}
  .hcw-preview-note{margin:.9rem 1rem 0}
  .hcw-tabs{grid-template-columns:1fr;padding:.9rem 1rem 0}
  .hcw-tab{padding:.7rem .8rem}
  .hcw-body{padding:1rem 1rem 1.6rem}
  .hcw-grid,.hcw-mode{grid-template-columns:1fr}
  .hcw-sec{padding:.9rem .8rem .5rem}
  .hcw-cred-row{grid-template-columns:1fr}
  .hcw-yn{justify-self:start}
  .hcw-yn label{min-width:84px;min-height:44px}
  .hcw-cred-more{padding:.7rem .6rem .4rem}
  .hcw-actions{justify-content:stretch}
  .hcw-actions .hcw-submit{width:100%}
  .hcw-alt{width:100%;text-align:center}
}
.hcw-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
