/* TW² Hiring Partners: one-page site.
   Built to WCAG 2.1 AA: text contrast 4.5:1 or better, visible focus,
   44px minimum touch targets, rem-based sizing, reduced-motion support. */

:root {
  --navy: #0d265e;
  --navy-dark: #091b45;
  --grey: #555b66;      /* 7:1 on white, 6:1 on --soft */
  --text: #2f3641;
  --soft: #eef0f6;
  --line: #b9c0d3;
  --white: #ffffff;
  --error: #b3261e;
  --ok: #1b6e3c;
  --font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;   /* 18px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--navy); margin: 0; line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.005em; }
h3 { font-size: 1.25rem; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
a { color: var(--navy); text-underline-offset: 4px; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 12px 18px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; outline: 3px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px var(--navy); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 12px 28px;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  border: 2px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--navy-dark); }
.btn:disabled { opacity: 0.65; cursor: default; }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Hero ---------- */

.hero { background: var(--soft); padding: 72px 0; }
.hero-grid {
  display: grid; grid-template-columns: 1.4fr 0.6fr;
  gap: 48px; align-items: center;
}
.eyebrow {
  color: var(--grey);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
h1 {
  font-size: clamp(2.25rem, 5.6vw, 3.75rem);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead { margin-top: 22px; font-size: 1.3rem; color: var(--text); max-width: 34em; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-logo { display: block; width: 100%; max-width: 280px; height: auto; justify-self: center; mix-blend-mode: multiply; }

/* ---------- Sections ---------- */

.section { padding: 80px 0; }
.section.soft { background: var(--soft); }
.intro { margin-top: 16px; max-width: 42em; color: var(--text); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

.cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 40px;
}
.card {
  background: var(--soft);
  border-top: 4px solid var(--navy);
  padding: 28px 26px 32px;
}
.card p { margin-top: 12px; font-size: 1.0625rem; }

/* Hover: card lifts and fills navy (white on navy is 14:1) */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.card h3, .card p { transition: color 0.2s ease; }
.card:hover {
  background: var(--navy);
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(13, 38, 94, 0.25);
}
.card:hover h3, .card:hover p { color: var(--white); }

.checklist li {
  position: relative;
  padding: 14px 0 14px 40px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--navy);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute; left: 6px; top: 20px;
  width: 8px; height: 16px;
  border: solid var(--navy); border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 40px;
}
.step { border: 2px solid var(--navy); padding: 28px 26px 32px; background: var(--white); }
.step-label {
  color: var(--navy); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.9375rem; margin-bottom: 12px;
}
.step-label span { color: var(--grey); margin-right: 6px; }
.step p:last-child { margin-top: 10px; }

/* ---------- About ---------- */

.about-grid {
  display: grid; grid-template-columns: 340px 1fr;
  gap: 64px; align-items: center;
}
.portrait {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 5; object-fit: cover;
  background: var(--white);
  box-shadow: 14px 14px 0 var(--navy);
}
.about-copy h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.role { margin-top: 6px; color: var(--grey); font-weight: 700; }
.about-copy p + p { margin-top: 16px; }
.about-copy .role + p { margin-top: 22px; }

/* ---------- Contact ---------- */

.contact { background: var(--navy); color: var(--white); padding: 80px 0; }
.contact h2, .contact .eyebrow { color: var(--white); }
.contact .eyebrow { color: #d5dcf0; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info p { margin-top: 18px; }
.contact-info .person { font-size: 1.15rem; margin-top: 28px; }
.contact-info .links { font-size: 1.25rem; font-weight: 700; margin-top: 6px; }
.contact a { color: var(--white); text-decoration-thickness: 2px; }
.contact-info .note { color: #d5dcf0; font-size: 1rem; }
.contact :focus-visible { outline-color: var(--white); }

.form {
  background: var(--white); color: var(--text);
  padding: 32px; display: grid; gap: 20px;
}
.form h3 { font-size: 1.35rem; }
.form :focus-visible { outline-color: var(--navy); }
.req-note { font-size: 0.9375rem; color: var(--grey); margin-top: -10px; }

.field { display: grid; gap: 6px; }
.field label { font-weight: 700; color: var(--navy); }
.field .opt { font-weight: 400; color: var(--grey); }
.field input, .field textarea {
  font: inherit; color: var(--text);
  background: var(--white);
  border: 2px solid #6b7280;
  border-radius: 0;
  padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--navy); outline: 3px solid var(--navy); outline-offset: 2px;
}
.field.invalid input { border-color: var(--error); }
.field .error { color: var(--error); font-size: 1rem; font-weight: 600; }
.field .error::before { content: "Error: "; }

.honeypot { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
.form .btn { justify-self: start; }
.form-status { min-height: 1.6em; font-weight: 700; }
.form-status.ok { color: var(--ok); }
.form-status.fail { color: var(--error); }

/* ---------- Footer ---------- */

.footer { padding: 28px 0; font-size: 1rem; color: var(--grey); }
.footer a { color: var(--navy); font-weight: 700; display: inline-block; padding: 8px 0; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 260px 1fr; gap: 40px; }
}

@media (max-width: 820px) {
  .hero { padding: 48px 0; }
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-logo { max-width: 200px; justify-self: start; order: -1; }
  .section, .contact { padding: 56px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { max-width: 300px; box-shadow: 10px 10px 0 var(--navy); }
}

@media (max-width: 620px) {
  body { font-size: 1.0625rem; }
  .wrap { padding: 0 18px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .hero .btn { width: 100%; }
  .form .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .card, .card h3, .card p { transition: none; }
  .card:hover { transform: none; }
}

/* Windows high-contrast / forced colors */
@media (forced-colors: active) {
  .card, .step { border: 2px solid CanvasText; }
  .checklist li::before { border-color: CanvasText; }
}


/* =====================================================================
   Depth, width and motion
   ===================================================================== */

:root {
  --shadow-sm: 0 1px 2px rgba(13, 38, 94, 0.08), 0 4px 12px rgba(13, 38, 94, 0.06);
  --shadow-md: 0 2px 4px rgba(13, 38, 94, 0.08), 0 12px 28px rgba(13, 38, 94, 0.12);
  --shadow-lg: 0 4px 8px rgba(13, 38, 94, 0.10), 0 24px 56px rgba(13, 38, 94, 0.20);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Wider, airier rhythm */
.section { padding: 104px 0; }
.contact { padding: 104px 0; }
.hero { padding: 104px 0 112px; }
.hero-grid { gap: 72px; }
.about-grid { grid-template-columns: 380px 1fr; gap: 80px; }
.contact-grid { gap: 80px; }
.split { gap: 80px; }
.cards, .steps { gap: 24px; margin-top: 48px; }
.card, .step { padding: 34px 32px 38px; }
h2 { letter-spacing: -0.015em; }

/* Hero: layered gradient with an echo of the logo's square frame */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 88% 20%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(135deg, #e6eaf5 0%, #f4f6fb 55%, #e9edf7 100%);
}
.hero::before {
  content: "";
  position: absolute;
  right: -140px; bottom: -200px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: rgba(13, 38, 94, 0.04);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: -120px; top: -140px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(13, 38, 94, 0.04);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; }
.hero-logo {
  mix-blend-mode: multiply;
  filter: drop-shadow(0 18px 24px rgba(13, 38, 94, 0.15));
}

/* Cards and steps: raised surfaces */
.card {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--navy);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-8px); }
.step {
  box-shadow: var(--shadow-sm);
  border: 0;
  border-top: 4px solid var(--navy);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* Soft sections get a gentle gradient instead of flat grey */
.section.soft { background: linear-gradient(180deg, #eef0f6 0%, #f6f7fb 100%); }

/* Photo: deeper, layered offset */
.portrait { box-shadow: 16px 16px 0 var(--navy), 28px 36px 60px rgba(13, 38, 94, 0.25); }

/* Contact band: depth */
.contact {
  background:
    radial-gradient(700px 420px at 12% 0%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #123078 0%, #0d265e 45%, #081a44 100%);
}
.form { box-shadow: var(--shadow-lg); }

/* Buttons */
.btn { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s ease, color 0.2s ease; box-shadow: 0 2px 6px rgba(13, 38, 94, 0.18); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(13, 38, 94, 0.28); }
.btn:active { transform: translateY(0); }
.btn-outline { box-shadow: none; }
.btn-outline:hover { box-shadow: 0 10px 20px rgba(13, 38, 94, 0.28); }

/* Checklist ticks */
.checklist li { transition: padding-left 0.2s var(--ease), background-color 0.2s ease; }
.checklist li:hover { padding-left: 46px; }

@media (max-width: 960px) {
  .about-grid { grid-template-columns: 280px 1fr; gap: 48px; }
}
@media (max-width: 820px) {
  .section, .contact { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }
  .hero-grid, .split, .contact-grid { gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero::before { width: 320px; height: 320px; right: -120px; bottom: -120px; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .card, .step { padding: 26px 22px 30px; }
}

/* ---------- Motion (only for people who have not asked for less) ---------- */

@media (prefers-reduced-motion: no-preference) {

  /* Hero entrance */
  @keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  @keyframes pop  { from { opacity: 0; transform: scale(0.92) translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  @keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-18px, -14px); } }

  .hero-copy > * { animation: rise 0.8s var(--ease) both; }
  .hero-copy > :nth-child(1) { animation-delay: 0.05s; }
  .hero-copy > :nth-child(2) { animation-delay: 0.15s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.28s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.40s; }
  .hero-logo { animation: pop 1s var(--ease) 0.25s both, float 7s ease-in-out 1.4s infinite; }
  .hero::before { animation: drift 14s ease-in-out infinite; }

  /* Scroll reveal. Only applies when JavaScript has added .js to <html>,
     so the page is fully visible without it. */
  .js :is(.section .eyebrow, .section h2, .section .intro, .contact .eyebrow, .contact h2,
          .card, .step, .checklist li, .portrait, .about-copy > *, .contact-info > *, .form):not(.in) {
    opacity: 0;
    transform: translateY(26px);
  }
  .js :is(.section .eyebrow, .section h2, .section .intro, .contact .eyebrow, .contact h2,
          .step, .checklist li, .portrait, .about-copy > *, .contact-info > *, .form) {
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.25s var(--ease), padding-left 0.2s var(--ease);
  }
  .js .card {
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s ease;
  }
  .js .portrait:not(.in) { transform: translateX(-30px); }
  .js .card.in:hover { transform: translateY(-8px); transition-duration: 0.2s; }
}


/* ---------- Simple text pages (accessibility statement, 404) ---------- */
.doc { padding: 72px 0 96px; min-height: 70vh; }
.doc-wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 28px 0 16px; text-transform: none; }
.doc h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.doc p { margin-top: 14px; }
.doc .plain { list-style: disc; padding-left: 1.4em; margin-top: 12px; }
.doc .plain li { margin: 8px 0; }
.doc-note { color: var(--grey); font-size: 1rem; margin-top: 40px; }

/* ---------- Print ---------- */
@media print {
  .hero::before, .hero::after, .skip { display: none; }
  .js * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero, .section, .section.soft, .contact { background: #fff !important; color: #000; padding: 24px 0; }
  .contact h2, .contact .eyebrow, .contact a { color: #000 !important; }
  .card, .step, .form { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .form, .actions { display: none; }
  a[href^="http"]:not([href*="twsquared"])::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
