/* ── DPS Hinjawadi · Teacher Recruitment ───────────────────────────────────
   Page-level styles. Everything colour/type/space related comes from the
   design-system tokens in _ds/…/tokens/. This file only carries the resets,
   the hover/animation states the design specifies, and the responsive rules
   that the fixed-width artboard could not express. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--dps-orange-dark); text-decoration: none; }
a:hover { color: var(--dps-orange); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--dps-orange);
  outline-offset: 2px;
}

@keyframes dpsspin { to { transform: rotate(360deg); } }
@keyframes dpsfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.dps-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Layout primitives ─────────────────────────────────────────────────── */

.dps-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.dps-sticky { position: sticky; top: 88px; }

/* ── Text-link buttons (the design's `style-hover` on bare <button>) ────── */

.dps-linkbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink-3);
  padding: var(--space-2) var(--space-1);
  transition: color 140ms ease;
}
.dps-linkbtn:hover { color: var(--dps-orange-dark); }

.dps-navbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 13px;
  color: var(--ink-2);
  padding: var(--space-2) var(--space-1);
  transition: color 140ms ease;
}
.dps-navbtn:hover { color: var(--dps-orange-dark); }

/* ── CV drop zone ──────────────────────────────────────────────────────── */

.dps-drop {
  display: block;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: border-color 140ms ease, background 140ms ease;
}
.dps-drop:hover,
.dps-drop.is-over { border-color: var(--dps-orange); background: var(--dps-orange-soft); }

/* ── Document row ──────────────────────────────────────────────────────── */

.dps-doc {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  transition: border-color 140ms ease, background 140ms ease;
}
.dps-doc.is-pending:hover { border-color: var(--dps-orange); }

/* ── Eyebrow ───────────────────────────────────────────────────────────── */

.dps-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

/* ── Brand lockup ───────────────────────────────────────────────────────
   The Hinjawadi header: the real crest beside the school's name set in the
   brand heading face. This deliberately does NOT imitate the shield-plus-
   wordmark lockup governed by the DPS brand guideline — drawing a substitute
   mark would be a brand violation, not a placeholder. */

.dps-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  line-height: 1.15;
}
.dps-lockup__crest { height: 38px; width: auto; display: block; flex: none; }
.dps-lockup__name {
  font-weight: var(--fw-bold);
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.dps-lockup__name span {
  display: block;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Grids from the artboard ────────────────────────────────────────────
   The design expresses its breakpoints intrinsically: auto-fit + minmax, so
   tracks wrap on the space actually available rather than at fixed viewport
   widths. Heading sizes use clamp() for the same reason. */

.dps-hero-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 40px 56px; align-items: start; }
.dps-stats-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-6) var(--space-5); }
.dps-video-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-5); align-items: stretch; }
.dps-why-grid     { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-4); }
.dps-roles-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-4); }
.dps-process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px 56px; align-items: start; }
.dps-ready-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px var(--space-10); align-items: start; }
/* The design asks for minmax(240px, 1fr) here, which needs 512px to sit 2-up.
   Inside the Card the track is 511px — the 1px borders eat the difference — so
   the four items collapse to a single column at every desktop width. 230px
   restores the intended 2-up and still drops to 1-up on a narrow screen. */
.dps-ready-list   { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px var(--space-8); }
.dps-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: var(--space-6); }
.dps-rail         { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 14px 10px; }
.dps-field-grid   { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px var(--space-4); }

/* The application form: main column plus the summary rail, which drops below
   it once there is no longer room for both. */
.dps-form-layout  { display: flex; flex-wrap: wrap; gap: var(--space-8) 44px; align-items: flex-start; }
.dps-form-main    { flex: 1 1 420px; min-width: 0; }
.dps-form-side    { flex: 1 1 260px; min-width: 0; }

/* The "at a glance" timeline: stage-name column plus one column per week.
   Too wide to reflow honestly, so it scrolls inside the card. */
.dps-gantt-scroll { overflow-x: auto; }
.dps-gantt        { min-width: 520px; }
.dps-gantt-row    { display: grid; grid-template-columns: minmax(120px, 200px) repeat(4, minmax(70px, 1fr)); }

/* Below 760px every form field goes full width. The design does this with a
   JS resize listener that rewrites each field's span; this is the same result
   without the listener, so layout stays a pure CSS concern. */
@media (max-width: 760px) {
  .dps-field-grid > * { grid-column: 1 / -1 !important; }
  .dps-sticky { position: static; }
}

/* ── Role tiles and the job-description dialog ─────────────────────────── */

.dps-role-card {
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.dps-role-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--dps-orange) !important;
}
.dps-role-card:focus-visible {
  outline: 2px solid var(--dps-orange);
  outline-offset: 3px;
}
.dps-role-card .dps-role-cta { opacity: 0.75; transition: opacity 120ms ease; }
.dps-role-card:hover .dps-role-cta,
.dps-role-card:focus-visible .dps-role-cta { opacity: 1; }

.dps-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  padding: var(--space-5);
  animation: dpsfade 160ms ease;
}
.dps-modal {
  width: min(680px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  outline: none;
}
/* Stop the page behind scrolling while the dialog is up. */
body.dps-modal-open { overflow: hidden; }

.dps-modal-close {
  flex: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-3);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color 120ms ease, background 120ms ease;
}
.dps-modal-close:hover { color: var(--dps-orange-dark); background: var(--dps-orange-soft); }

@media (max-width: 720px) {
  .dps-modal-backdrop { place-items: start center; padding: var(--space-3); }
  .dps-modal { max-height: 92vh; }
}

/* ── Open positions directory ──────────────────────────────────────────── */

.dps-roles-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.dps-rolesearch { position: relative; flex: 1 1 260px; max-width: 340px; color: var(--ink-3); }
.dps-rolesearch svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.dps-rolesearch input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.dps-rolesearch input:focus {
  border-color: var(--dps-orange);
  box-shadow: 0 0 0 var(--ring-width) var(--dps-orange-soft);
}

.dps-catpills { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 22px; }
.dps-catpill {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 13.5px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--ink-2);
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.dps-catpill:hover { border-color: var(--dps-orange); }
.dps-catpill.is-on {
  border-color: var(--dps-orange);
  background: var(--dps-orange-soft);
  color: var(--dps-orange-dark);
}
.dps-catpill .n { opacity: .62; font-weight: var(--fw-medium); margin-left: 5px; }
/* A group with nothing listed: visible at 0, dimmed, not clickable. */
.dps-catpill.is-empty { opacity: .45; cursor: default; }
.dps-catpill.is-empty:hover { border-color: var(--border-soft); }

.dps-rolesbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.dps-clearbtn {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 13px;
  color: var(--dps-orange-dark);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.dps-clearbtn:hover { text-decoration: underline; }

/* Twenty-seven roles is too many to show at full height, so the list scrolls
   in place and the page keeps its shape while you filter. */
.dps-rolelist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.dps-rolerow {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  transition: border-color 140ms ease;
}
.dps-rolerow.is-open { cursor: pointer; }
.dps-rolerow:hover { border-color: var(--dps-orange); }
.dps-rolerow.is-open:focus-visible { outline: 2px solid var(--dps-orange); outline-offset: 2px; }

.dps-rolerow__text { flex: 1 1 220px; min-width: 0; }
.dps-rolerow__title {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 16.5px;
  color: var(--ink);
}
.dps-rolerow__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 2px;
}
/* Only some roles have a job description written; this says which, so the
   rows that do not open a dialog are not a dead click. */
.dps-rolerow__jd {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dps-orange-dark);
  background: var(--dps-orange-soft);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}
.dps-rolerow__n {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 15px;
  color: var(--dps-green-dark);
  background: var(--dps-green-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  flex: none;
  white-space: nowrap;
}
.dps-applybtn {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 13.5px;
  color: var(--dps-orange-dark);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  flex: none;
}
.dps-applybtn:hover { text-decoration: underline; }

.dps-roleempty {
  padding: var(--space-8);
  text-align: center;
  font-size: var(--text-base);
  color: var(--ink-3);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
}

/* ── Process ───────────────────────────────────────────────────────────── */

.dps-mixpill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: 26px;
  padding: 12px 18px 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}
.dps-mixpill__dots { display: flex; gap: 4px; }
.dps-mixpill__dots > span { width: 16px; flex: none; }
.dps-mixpill__text {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  color: var(--ink);
}

.dps-splitcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-4); }
.dps-dotbar { display: flex; gap: 6px; margin-top: var(--space-5); }

/* Six stages side by side. Too wide to reflow honestly, so it scrolls inside
   the card rather than being squashed. */
.dps-track-scroll { overflow-x: auto; margin-top: var(--space-6); }
.dps-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: var(--space-3);
  min-width: 820px;
}

@media (max-width: 720px) {
  .dps-rolesearch { max-width: none; }
  .dps-rolerow { flex-wrap: wrap; gap: var(--space-3); }
  .dps-rolerow__text { flex: 1 1 140px; }
  .dps-rolelist { max-height: none; overflow-y: visible; padding-right: 0; }
  .dps-mixpill { display: flex; }
}

/* ── Landing tabs ───────────────────────────────────────────────────────
   Six tabs, one panel at a time. The strip sticks under the header so the
   way back to the other five never scrolls off. On a narrow screen it
   scrolls sideways rather than wrapping into a second row, which would push
   the panel down the page every time a label got long.                     */

.dps-tabbar {
  position: sticky;
  top: var(--dps-header-h, 60px);
  z-index: 30;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.dps-tabbar__scroll {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
}

.dps-tabbar__scroll::-webkit-scrollbar { display: none; }

.dps-tab {
  flex: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink-3);
  padding: 14px var(--space-3) 12px;
  transition: color 140ms ease, border-color 140ms ease;
}

.dps-tab:hover { color: var(--ink); }

.dps-tab.is-on {
  color: var(--dps-orange-dark);
  border-bottom-color: var(--dps-orange);
}

.dps-tab:focus-visible {
  outline: 2px solid var(--dps-orange);
  outline-offset: -2px;
  border-radius: 4px;
}

/* The upload card carries the weight here, so it gets the wider column. */
.dps-apply-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 860px) {
  .dps-apply-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  /* Two sticky strips eat a phone screen; the header alone keeps the top. */
  .dps-tabbar { position: static; }
}
