/* ResourceQ — shared styles.
   Page layouts use inline styles carried over from the approved designs;
   this file holds the base, interactive states, the mobile menu and the forms. */

:root {
  --rq-blue: #0097db;
  --rq-navy: #2c3d90;
  --rq-grey: #404041;
  --rq-yellow: #fbaf3f;
  --rq-orange: #e85024;
  --rq-muted: #5F6062;
  --rq-line: #D9DEE5;
  --rq-ground: #F3F5F7;
  --rq-error: #B42318;
  --rq-ok: #1B6B3A;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--rq-ground); }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--rq-navy); }
a:hover { color: #1F2C6E; }
a[style*="background: #2c3d90"]:hover, button[style*="background: #2c3d90"]:hover { filter: brightness(1.12); }
a[style*="background: #fbaf3f"]:hover { filter: brightness(1.05); }
:focus-visible { outline: 3px solid var(--rq-blue); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--rq-navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* ---------- Header & mobile menu ---------- */
.site-header { position: sticky; top: 0; z-index: 50; }
.menu-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; min-width: 46px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid #B8C1CD; background: #fff; color: var(--rq-navy);
  font: 600 15px 'IBM Plex Sans', 'Segoe UI', sans-serif; cursor: pointer;
}
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--rq-navy); }
.site-nav .nav-contact { display: none; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none !important; }
  .site-nav {
    display: none !important; flex-basis: 100%;
    flex-direction: column !important; gap: 0 !important; padding: 4px 0 8px;
  }
  .site-nav.is-open { display: flex !important; }
  .site-nav a { padding: 14px 4px !important; border-top: 1px solid var(--rq-line); font-size: 17px; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--rq-blue); padding-left: 14px !important; }
  .site-nav .nav-contact { display: block; }
}

/* Wide image heights on small screens */
@media (max-width: 640px) {
  .hero-photo { height: 380px !important; }
  section > div[style*="border-radius: 28px; padding: 64px 48px"] { padding: 40px 24px !important; }
  [style*="minmax(340px"] { grid-template-columns: 1fr !important; }
  [style*="minmax(520px"], [style*="minmax(560px"] { grid-template-columns: 1fr !important; }
}

/* ---------- Careers filter ---------- */
.pill {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #B8C1CD; background: #fff; color: var(--rq-navy);
  font: 500 15px 'IBM Plex Sans', 'Segoe UI', sans-serif;
}
.pill[aria-pressed="true"] { border-color: var(--rq-navy); background: var(--rq-navy); color: #fff; font-weight: 600; }
.job[hidden] { display: none !important; }

/* ---------- Contact form ---------- */
.seg {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  padding: 6px; background: var(--rq-ground); border-radius: 999px;
}
.seg button {
  min-height: 46px; border-radius: 999px; border: 0; background: transparent; color: var(--rq-navy);
  font: 500 15px 'IBM Plex Sans', 'Segoe UI', sans-serif; cursor: pointer;
}
.seg button[aria-selected="true"] { background: var(--rq-navy); color: #fff; font-weight: 600; }

.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--rq-grey); }
.field .opt { font-weight: 400; color: var(--rq-muted); }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 0 14px; width: 100%;
  border: 1.5px solid #B8C1CD; border-radius: 10px; background: #fff; color: var(--rq-grey);
  font: 400 16px 'IBM Plex Sans', 'Segoe UI', sans-serif;
}
.field textarea { padding: 12px 14px; resize: vertical; min-height: 120px; }
.field input[type="file"] { padding: 10px 14px; border-style: dashed; background: var(--rq-ground); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--rq-blue); outline: 3px solid rgba(0,151,219,.25); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--rq-error); }
.field .hint { font-size: 13px; color: var(--rq-muted); }
.field .err { font-size: 13px; color: var(--rq-error); font-weight: 500; }
.field .err:empty { display: none; }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields) */
.hp-field { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

.human-check {
  border: 1.5px solid var(--rq-line); border-radius: 16px; padding: 18px 20px; background: var(--rq-ground);
  display: flex; flex-direction: column; gap: 12px;
}
.human-check .title { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--rq-grey); }
.human-check p { margin: 0; font-size: 13px; color: var(--rq-muted); }
.cf-turnstile { min-height: 65px; }

.form-error {
  margin: 0; padding: 12px 16px; border-radius: 12px; background: #FEF3F2; border: 1px solid #FECDCA;
  color: var(--rq-error); font-size: 15px; font-weight: 500;
}
.form-error:empty { display: none; }

.submit-btn {
  min-height: 54px; border-radius: 999px; border: 0; background: var(--rq-yellow); color: var(--rq-navy);
  font: 600 17px 'IBM Plex Sans', 'Segoe UI', sans-serif; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.submit-btn:hover { filter: brightness(1.05); }
.submit-btn:disabled { background: var(--rq-line); color: var(--rq-muted); cursor: not-allowed; filter: none; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 12px 0 8px; }
.form-success[hidden] { display: none; }
.form-success .tick {
  width: 56px; height: 56px; border-radius: 50%; background: var(--rq-yellow); color: var(--rq-navy);
  display: inline-flex; align-items: center; justify-content: center;
}
.form-success h2 { margin: 0; font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif; font-weight: 700; font-size: 28px; letter-spacing: -0.02em; color: var(--rq-grey); }
.form-success p { margin: 0; color: var(--rq-muted); }
.btn-outline {
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--rq-navy);
  background: #fff; color: var(--rq-navy); font: 600 15px 'IBM Plex Sans', 'Segoe UI', sans-serif; cursor: pointer;
}

/* Footer links: at least 24px tall tap targets (WCAG 2.2) */
footer a { display: inline-block; padding-block: 3px; }
