
/* Desktop-only refreshed layout for Join Our Team (non-destructive; mobile untouched) */
@media (min-width: 1024px) {

  /* Atmosphere */
  main.join-refresh {
    position: relative;
    isolation: isolate;
  }
  main.join-refresh::before {
    content: "";
    position: absolute; inset: -80px -40px -120px -40px;
    background:
      radial-gradient(800px 400px at 10% -10%, rgba(17,196,106,0.12), transparent 60%),
      radial-gradient(700px 500px at 110% 10%, rgba(27,171,255,0.10), transparent 60%),
      linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.00));
    filter: blur(0.2px);
    z-index: -1;
  }

  /* Two-column layout */
  .join-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    align-items: start;
  }

  /* Elevate the main card */
  .join-layout > section.card {
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  }

  /* Hero header inside form card */
  .join-hero {
    padding: 10px 6px 18px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
  }
  .join-hero h1 {
    font-size: 44px;
    line-height: 1.08;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 18px rgba(17,196,106,0.18);
  }
  .join-hero p {
    font-size: 16px;
    color: #9fb1bf;
    margin: 0;
  }

  /* Right rail */
  .join-aside.card {
    background: linear-gradient(180deg, rgba(17,17,17,0.7), rgba(17,17,17,0.5));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 22px;
    position: sticky;
    top: 24px;
    box-shadow: 0 18px 54px rgba(0,0,0,0.35);
  }
  .join-aside .join-aside-header h2 {
    font-size: 22px;
    margin: 0 0 6px 0;
  }
  .join-aside .join-aside-header p {
    margin: 0 0 14px 0; color: #a7b6c3;
  }
  .join-benefits {
    list-style: none; padding: 0; margin: 0 0 14px 0;
  }
  .join-benefits li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 0;
  }
  .join-benefits li::before {
    content: "◆"; margin-top: 2px;
    font-size: 10px;
    opacity: .9;
    transform: scale(0.9);
    color: #11c46a;
  }
  .patent-pills { display:flex; flex-wrap: wrap; gap:8px; margin-top: 8px; }
  .patent-pills .pill {
    font-size: 12px; padding: 6px 10px; border-radius: 999px;
    border: 1px solid rgba(17,196,106,0.45);
    background: rgba(17,196,106,0.08);
    color: #b5f1d3;
    letter-spacing: .02em;
  }
  .join-cta { margin-top: 16px; padding: 14px; border:1px dashed rgba(255,255,255,0.12); border-radius: 14px; }
  .join-cta h3 { margin: 0 0 6px 0; }
  .join-cta p { margin: 0 0 10px 0; color:#9fb1bf; }

  /* Form polish & alignment */
  #joinForm .grid {
    display: grid !important;
    gap: 16px !important;
  }
  /* 3-up and 2-up grids on desktop */
  #joinForm h2 + .grid[style*="repeat(3"] { grid-template-columns: repeat(3, 1fr) !important; }
  #joinForm h2 + .grid[style*="repeat(2"] { grid-template-columns: repeat(2, 1fr) !important; }

  #joinForm .field label {
    font-weight: 600;
    letter-spacing: .01em;
    margin-bottom: 6px;
  }
  #joinForm input[type="text"],
  #joinForm input[type="email"],
  #joinForm input[type="tel"],
  #joinForm input[type="date"],
  #joinForm input[type="number"],
  #joinForm select,
  #joinForm textarea {
    width: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 12px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
  }
  #joinForm textarea { min-height: 120px; }
  #joinForm input:focus, #joinForm select:focus, #joinForm textarea:focus {
    border-color: rgba(17,196,106,0.6);
    box-shadow: 0 0 0 3px rgba(17,196,106,0.15);
  }

  /* Equal height tiles & horizontal alignment for metrics/checkbox rows */
  #joinForm .result-tile { min-height: 120px !important; }
  #joinForm .check-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  }
  #joinForm .check-row .field { display: flex; align-items: center; gap: 10px; }
  #joinForm .check-row .field label { margin: 0; font-weight: 500; }

  /* Buttons */
  #joinForm .actions, .apply-card .actions {
    display: flex; gap: 12px; justify-content: flex-end; margin-top: 12px;
  }
  #joinForm .actions .btn-primary {
    background: linear-gradient(180deg, #15d374, #0fb463);
    color: #06110a; font-weight: 700; border-radius: 12px; padding: 12px 16px;
    border: none; cursor: pointer;
    box-shadow: 0 10px 30px rgba(17,196,106,0.25);
  }
  #joinForm .actions .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(17,196,106,0.35); }
  #joinForm .actions .btn-secondary {
    background: transparent; border:1px solid rgba(255,255,255,0.16);
    border-radius: 12px; padding: 12px 16px; color: #cfe1d8; cursor: pointer;
  }
}


/* === Grit Texture & Visuals for Join Aside (Desktop Only) === */
@media (min-width: 1024px) {
  .join-aside.card.grit {
    position: sticky;
    top: 24px;
    border-radius: 18px;
    overflow: hidden;
    /* Layered industrial look: dark steel + brushed noise + subtle ATS glow */
    background:
      radial-gradient(120% 60% at 0% 0%, rgba(17,196,106,0.12), transparent 60%),
      radial-gradient(120% 60% at 100% 10%, rgba(27,171,255,0.10), transparent 60%),
      linear-gradient(180deg, rgba(18,22,26,0.88), rgba(14,17,20,0.75));
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 54px rgba(0,0,0,0.35);
    padding: 22px;
    isolation: isolate;
  }
  .join-aside.card.grit::before {
    /* brushed-metal-ish texture using repeating gradients */
    content: "";
    position: absolute; inset: 0;
    background:
      repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.03) 0px,
        rgba(255,255,255,0.03) 1px,
        transparent 2px,
        transparent 6px
      ),
      repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.06) 0px,
        rgba(0,0,0,0.06) 2px,
        transparent 3px,
        transparent 7px
      );
    mix-blend-mode: overlay;
    opacity: .35;
    pointer-events: none;
  }

  /* Headings with gradient ink */
  .join-aside .join-aside-header h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #11c46a, #dfe9ef);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .join-aside .join-aside-header p { color:#a7b6c3; margin: 0 0 14px; }

  .join-aside .eyebrow {
    margin: 12px 0 6px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #cfe1d8;
  }

  /* Bolt list */
  .bolt-list { list-style: none; padding: 0; margin: 0 0 16px 0; }
  .bolt-list li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 0;
    position: relative;
  }
  .bolt-list li::before {
    content: "⚙︎";
    font-size: 12px;
    line-height: 1;
    margin-top: 2px;
    opacity: .95;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,.35));
  }

  /* Gauge-accent box with diagonal pressure line */
  .gauge-accent {
    margin-top: 16px; padding: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.00));
    border: 1px solid rgba(255,255,255,0.14);
    position: relative;
  }
  .gauge-accent::after {
    content: "";
    position: absolute; inset: -1px;
    /* red-to-green diagonal like a pressure swing */
    background: linear-gradient(135deg, rgba(220,70,70,0.25), rgba(17,196,106,0.25));
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    padding: 2px;
    border-radius: 14px;
    pointer-events: none;
  }
  .gauge-accent h3 { margin: 0 0 6px; }
  .gauge-accent p { margin: 0 0 8px; color: #a9bac7; }
  .gauge-accent a { color: #bff5d8; text-decoration: underline; }
}


/* === Position & Availability desktop layout === */
@media (min-width: 1024px) {
  #joinForm .pa-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px !important;
    margin-top: 10px;
  }
  /* Row 1: make Current Job Openings span two columns for breathing room */
  #joinForm .pa-row-1 .field:first-child {
    grid-column: span 2;
  }
  #joinForm .pa-row .field label {
    font-weight: 600;
    margin-bottom: 6px;
  }
  /* Ensure selects/inputs are uniform */
  #joinForm .pa-row .field select,
  #joinForm .pa-row .field input {
    width: 100%;
  }
}


/* === Desktop PA rows: lock label height so inputs align on one horizontal line === */
@media (min-width: 1024px) {
  #joinForm .pa-row .field {
    display: flex;
    flex-direction: column;
    align-self: start;
  }
  #joinForm .pa-row .field label {
    display: block;
    font-size: 16px;
    line-height: 1.3;
    /* Ensure consistent vertical space for 1–2 lines of label on desktop widths */
    min-height: 48px;
    margin-bottom: 6px;
  }
  #joinForm .pa-row .field input,
  #joinForm .pa-row .field select,
  #joinForm .pa-row .field textarea {
    margin-top: 0; /* keep inputs tight after label */
  }
}


/* === Desktop PA rows: baseline-align inputs regardless of label wrapping === */
@media (min-width: 1024px) {
  /* Reserve space for up to ~2 label lines and pin inputs to a flat baseline */
  #joinForm .pa-row .field {
    position: relative;
    padding-top: 44px; /* space for label text (1–2 lines) */
  }
  #joinForm .pa-row .field label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    line-height: 1.3;
  }
  #joinForm .pa-row .field input,
  #joinForm .pa-row .field select,
  #joinForm .pa-row .field textarea {
    margin-top: 0; /* keep inputs tight to the reserved baseline */
  }
}


/* === Global desktop baseline alignment for all join form rows === */
@media (min-width: 1024px) {
  /* Reserve consistent space for labels; pin inputs to a flat line */
  #joinForm .grid .field {
    position: relative;
    padding-top: 44px; /* ~2 lines max for labels */
  }
  #joinForm .grid .field > label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    line-height: 1.3;
  }
  /* Headings rhythm */
  #joinForm h2 {
    margin: 18px 0 10px !important;
  }
}


/* === Desktop: lift entire row containing 'contactEmployers' so label + inputs stay inline and never overlap === */
@media (min-width: 1024px) {
  /* Find the grid row that includes the long label and raise the baseline for ALL its fields */
  #joinForm .grid:has(> .field > label[for="contactEmployers"]) .field {
    padding-top: 60px !important; /* previously 44px; aligns all inputs in this row while giving the long label breathing room */
  }
}


/* === Desktop: raise the entire employers row so label + inputs never overlap, baseline stays flat === */
@media (min-width: 1024px) {
  #joinForm .row-contact-employers .field {
    padding-top: 76px !important; /* supports up to ~3 lines of label at 16px/1.3 */
  }
}


/* === Consent section exceptions & styling (desktop) === */
@media (min-width: 1024px) {
  /* Do not apply baseline absolute-label rules to the consent field */
  #joinForm .agree-field {
    position: static !important;
    padding-top: 0 !important;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #a7b6c3;
  }
  #joinForm .agree-field > label {
    position: static !important;
    margin: 0;
    line-height: 1.35;
  }
  #joinForm .agree-field input[type="checkbox"] {
    margin-top: 3px;
  }
}


/* === Consent: require clicking the small checkbox; text is not clickable === */
@media (min-width: 0px) {
  #joinForm .agree-field > label {
    pointer-events: none;    /* words cannot be clicked */
    cursor: default;
  }
  #joinForm .agree-field input[type="checkbox"] {
    width: 16px; height: 16px;   /* keep checkbox small and precise */
    cursor: pointer;
  }
}


/* === Consent checkbox must be directly clicked; label no longer toggles it === */
@media (min-width: 0px) {
  #joinForm .agree-field > label {
    pointer-events: auto; /* allow text selection; doesn't toggle since 'for' removed */
  }
  #joinForm .agree-field input[type="checkbox"] {
    position: relative;
    z-index: 2; /* ensure checkbox is always on top and clickable */
  }
}


/* === CONSENT: Make checkbox always clickable; words non-clickable, across all viewports === */
@media (min-width: 0px) {
  #joinForm .agree-field {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    z-index: 10; /* lift above neighboring content */
  }
  #joinForm .agree-field > label {
    position: static !important;
    pointer-events: none; /* text doesn't catch clicks */
    margin: 0;
    line-height: 1.35;
    max-width: calc(100% - 28px);
  }
  #joinForm .agree-field input[type="checkbox"] {
    position: relative;
    z-index: 5;          /* ensure on top of label */
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    cursor: pointer;
    margin-top: 3px;
  }
}


/* === Checkbox visibility & behavior fix === */
@media (min-width: 0px) {
  /* Force native look so the checkmark is actually visible */
  #joinForm input[type="checkbox"] {
    -webkit-appearance: checkbox;
            appearance: checkbox;
    accent-color: #11c46a; /* ATS green */
    background: transparent;
    border: initial;
    padding: 0;
  }
  /* If any global input styles bleed into checkboxes, neutralize them */
  #joinForm .grid .field input[type="checkbox"] {
    box-shadow: none;
    border-radius: 2px;
    min-height: auto;
  }
  /* Focus ring for accessibility */
  #joinForm input[type="checkbox"]:focus {
    outline: 2px solid rgba(17,196,106,0.6);
    outline-offset: 2px;
  }
}


/* === Align checkbox perfectly inline with text === */
@media (min-width: 0px) {
  #joinForm .agree-field {
    display: flex;
    align-items: center; /* Align checkbox and text on same baseline */
    gap: 10px;
  }
  #joinForm .agree-field input[type="checkbox"] {
    margin-top: 0;
    align-self: center;
    vertical-align: middle;
  }
  #joinForm .agree-field > label {
    line-height: 1.3;
    margin: 0;
  }
}


/* === Notes section: personal touch emphasis === */
@media (min-width: 1024px) {
  #joinForm #notes {
    min-height: 160px;
  }
  #joinForm #notes:focus {
    box-shadow: 0 0 0 3px rgba(17,196,106,0.15);
    border-color: rgba(17,196,106,0.6);
  }
  #joinForm .help-text {
    color: #9fb1bf;
    font-size: 14px;
    margin: 4px 0 8px 0;
  }
  #joinForm .char-counter {
    text-align: right;
    font-size: 12px;
    color: #8fa3b4;
    margin-top: 6px;
  }
}


/* === Submit Application button: ATS-green with subtle professional pulse === */
@media (min-width: 0px) {
  #joinForm .actions #joinSubmit {
    background: linear-gradient(180deg, #15d374, #0fb463);
    color: #06110a;
    font-weight: 700;
    border-radius: 12px;
    padding: 12px 18px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(17,196,106,0.25);
    transition: transform .15s ease, box-shadow .2s ease;
  }
  #joinForm .actions #joinSubmit:hover {
    transform: translateY(-1px);
    animation: joinSubmitPulse 1.2s ease-out 1;
    box-shadow: 0 16px 38px rgba(17,196,106,0.35);
  }
  @keyframes joinSubmitPulse {
    0%   { box-shadow: 0 10px 30px rgba(17,196,106,0.25); }
    50%  { box-shadow: 0 18px 48px rgba(17,196,106,0.35); }
    100% { box-shadow: 0 12px 34px rgba(17,196,106,0.28); }
  }
}
\n
/* === Join form invalid highlight === */
@media (min-width: 0px) {
  #joinForm input:invalid,
  #joinForm select:invalid,
  #joinForm textarea:invalid {
    border-color: rgba(220,70,70,0.8);
    box-shadow: 0 0 0 2px rgba(220,70,70,0.15);
  }
}

/* ATS_JOIN_INVALID_HL */
@media (min-width:0px){
  #joinForm input:invalid, #joinForm select:invalid, #joinForm textarea:invalid{
    border-color: rgba(220,70,70,.85);
    box-shadow: 0 0 0 2px rgba(220,70,70,.15);
  }
}


/* === Harden submit button clickability === */
#joinForm .actions{display:flex; gap:12px;}
#joinSubmit{position:relative; z-index:5; pointer-events:auto;}
