/* ══════════════════════════════════════════════════════════════════════
   mjmcompanies.com — the careers site

   Type-led on purpose. We can't photograph the businesses (their names
   stay off this page) and stock photography of a forecourt that isn't
   ours would read as fake to exactly the local people we're talking to.
   So the interest comes from type, space and motion.

   Light only. A public page has one job: look the same for everyone.
   ══════════════════════════════════════════════════════════════════════ */

:root{
  color-scheme: only light;

  --ink:      #0E0F0D;
  --ink-2:    #4A4E47;
  --ink-3:    #7C817A;
  --paper:    #F6F4EF;
  --card:     #FFFFFF;
  --line:     rgba(14,15,13,.13);
  --line-2:   rgba(14,15,13,.07);

  --pine:     #1C4432;
  --pine-2:   #2A6349;
  --pine-ink: #ECF2ED;
  --ember:    #B8532A;

  --shadow:   0 1px 2px rgba(14,15,13,.04), 0 12px 32px -12px rgba(14,15,13,.14);
  --shadow-lg:0 2px 4px rgba(14,15,13,.05), 0 28px 60px -20px rgba(14,15,13,.22);

  --display: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gut:  clamp(20px, 5vw, 64px);
  --maxw: 1180px;
  --r:    18px;
}

*,*::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(--paper);
  color:var(--ink);
  font-family:var(--body);
  font-size:17px;
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

img{ max-width:100%; display:block; }
a{ color:inherit; }

h1,h2,h3,h4{
  font-family:var(--display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-.028em;
  margin:0;
  text-wrap:balance;
}

.wrap{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--gut); }

.eyebrow{
  font-family:var(--display);
  font-size:.72rem; font-weight:700;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--ink-3);
  margin:0 0 18px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.eyebrow .bar{ width:26px; height:2px; background:var(--pine); display:inline-block; }

/* ── skip link ─────────────────────────────────────────────────────── */
.skip{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--ink); color:var(--paper);
  padding:12px 18px; border-radius:0 0 10px 0; font-weight:600;
}
.skip:focus{ left:0; }

/* ── nav ───────────────────────────────────────────────────────────── */
.nav{
  position:sticky; top:0; z-index:100;
  background:rgba(246,244,239,.82);
  backdrop-filter:saturate(1.4) blur(14px);
  -webkit-backdrop-filter:saturate(1.4) blur(14px);
  border-bottom:1px solid transparent;
  transition:border-color .25s, background .25s;
}
.nav.stuck{ border-bottom-color:var(--line); }
.nav__in{
  display:flex; align-items:center; gap:18px;
  height:70px;
}
.brand{
  font-family:var(--display); font-weight:800;
  font-size:1.03rem; letter-spacing:-.02em;
  text-decoration:none; display:flex; align-items:center; gap:10px;
  margin-right:auto; white-space:nowrap;
}
.brand svg{ width:26px; height:26px; flex:none; }
.brand span.sub{
  font-weight:600; color:var(--ink-3); letter-spacing:.01em;
  font-size:.86rem;
}
.nav__links{ display:flex; align-items:center; gap:30px; }
.nav__links a{
  text-decoration:none; font-size:.93rem; font-weight:500; color:var(--ink-2);
  position:relative; padding:4px 0;
}
.nav__links a::after{
  content:''; position:absolute; left:0; right:100%; bottom:0; height:1.5px;
  background:var(--ink); transition:right .28s cubic-bezier(.22,1,.36,1);
}
.nav__links a:hover{ color:var(--ink); }
.nav__links a:hover::after{ right:0; }
@media (max-width: 880px){ .nav__links{ display:none; } }

/* Below ~520px the brand, the language switch and Apply stop fitting on one
   row — measured at 396px inside a 375px viewport, which clipped the whole
   page. Everything in the bar gives up a few pixels rather than one thing
   being dropped: a careers site is read on phones first. */
@media (max-width: 520px){
  .nav__in{ gap:10px; height:62px; }
  .brand{ font-size:.94rem; gap:8px; min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .brand svg{ width:22px; height:22px; }
  .btn--sm{ padding:9px 14px; font-size:.82rem; }

  /* Two language buttons cost ~86px and squeeze the wordmark into an
     ellipsis. Show only the language you would switch TO — the same control,
     half the width, and the wordmark survives intact. */
  .lang{ border:0; padding:0; background:transparent; }
  .lang button[aria-pressed="true"]{ display:none; }
  .lang button{
    padding:8px 13px; font-size:.76rem;
    border:1px solid var(--line); border-radius:999px; background:var(--card);
    color:var(--ink);
  }
}
/* Measured: the full wordmark still fits at 375px (the iPhone floor for most
   people), so it only shortens to MJM on the genuinely tiny 320px screens. */
@media (max-width: 345px){
  .nav .brand .word{ display:none; }
}

.lang{
  display:inline-flex; border:1px solid var(--line); border-radius:999px;
  padding:2px; background:var(--card); flex:none;
}
.lang button{
  font:600 .78rem/1 var(--body); letter-spacing:.04em;
  padding:7px 11px; border:0; border-radius:999px; background:transparent;
  color:var(--ink-3); cursor:pointer;
}
.lang button[aria-pressed="true"]{ background:var(--ink); color:var(--paper); }

/* ── buttons ───────────────────────────────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--display); font-weight:700; font-size:.94rem;
  letter-spacing:-.005em;
  padding:14px 24px; border-radius:999px; border:1.5px solid transparent;
  text-decoration:none; cursor:pointer; white-space:nowrap;
  transition:transform .2s cubic-bezier(.22,1,.36,1), background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:active{ transform:translateY(1px); }
.btn--primary{ background:var(--ink); color:var(--paper); box-shadow:var(--shadow); }
.btn--primary:hover{ background:var(--pine); box-shadow:var(--shadow-lg); }
.btn--ghost{ border-color:var(--line); color:var(--ink); background:transparent; }
.btn--ghost:hover{ border-color:var(--ink); background:var(--card); }
.btn--sm{ padding:10px 18px; font-size:.86rem; }
.btn .arw{ transition:transform .25s cubic-bezier(.22,1,.36,1); }
.btn:hover .arw{ transform:translateX(3px); }

/* ── hero ──────────────────────────────────────────────────────────── */
.hero{ padding:clamp(56px,9vw,116px) 0 clamp(48px,7vw,84px); position:relative; }
.hero::before{
  content:''; position:absolute; inset:0 0 auto; height:520px; z-index:-1;
  background:
    radial-gradient(80% 90% at 8% 0%, rgba(28,68,50,.09), transparent 62%),
    radial-gradient(60% 70% at 96% 6%, rgba(184,83,42,.07), transparent 60%);
  pointer-events:none;
}
.hero h1{
  font-size:clamp(2.55rem, 7.4vw, 5.1rem);
  max-width:16ch;
  margin-bottom:26px;
}
.hero h1 .rot{
  display:inline-block; position:relative;
  color:var(--pine);
}
.hero h1 .rot i{
  font-style:normal; display:inline-block;
  /* NO fill-mode. With `both` the element holds the keyframe's `from`
     state (opacity:0) until the animation actually starts — and if it
     never starts, the headline renders as "Work close to ." with the
     word invisible but still taking up its width. Seen in production.
     Without a fill mode the word is opaque by default and the animation
     is decoration on top, so the worst case is a missing fade. */
  animation:rotIn .5s cubic-bezier(.22,1,.36,1);
}
@keyframes rotIn{
  from{ opacity:0; transform:translateY(.42em) rotate(2deg); filter:blur(4px); }
  to  { opacity:1; transform:none; filter:none; }
}
.hero p.lede{
  font-size:clamp(1.05rem, 1.9vw, 1.24rem);
  color:var(--ink-2); max-width:60ch; margin:0 0 34px;
}
.hero .cta{ display:flex; gap:13px; flex-wrap:wrap; align-items:center; }
.hero .cta .note{ font-size:.85rem; color:var(--ink-3); }

.livedot{
  display:inline-flex; align-items:center; gap:8px;
  font:600 .78rem/1 var(--body); letter-spacing:.06em; text-transform:uppercase;
  color:var(--pine); background:var(--pine-ink);
  padding:8px 14px; border-radius:999px; margin-bottom:22px;
}
.livedot .d{
  width:7px; height:7px; border-radius:50%; background:var(--ember);
  box-shadow:0 0 0 0 rgba(184,83,42,.55); animation:pulse 2.4s infinite;
}
@keyframes pulse{
  70%{ box-shadow:0 0 0 9px rgba(184,83,42,0); }
  100%{ box-shadow:0 0 0 0 rgba(184,83,42,0); }
}

/* ── stats ─────────────────────────────────────────────────────────── */
.stats{
  display:grid; grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--line); margin-top:clamp(44px,6vw,72px);
}
.stats div{
  padding:26px 22px 26px 0;
  border-right:1px solid var(--line-2);
}
.stats div:last-child{ border-right:0; }
.stats b{
  font-family:var(--display); font-weight:800;
  font-size:clamp(2rem,4.4vw,3rem); letter-spacing:-.04em;
  display:block; line-height:1; margin-bottom:8px;
  font-variant-numeric:tabular-nums;
}
.stats small{
  font-size:.83rem; color:var(--ink-3); font-weight:500;
  letter-spacing:.02em; line-height:1.4; display:block;
}
@media (max-width:720px){
  .stats{ grid-template-columns:1fr 1fr; }
  .stats div{ border-bottom:1px solid var(--line-2); padding-right:16px; }
  .stats div:nth-child(2n){ border-right:0; }
  .stats div:nth-last-child(-n+2){ border-bottom:0; }
}

/* ── sections ──────────────────────────────────────────────────────── */
section{ padding:clamp(64px,9vw,120px) 0; }
section.tinted{ background:var(--card); border-block:1px solid var(--line-2); }
.sec-head{ max-width:66ch; margin-bottom:clamp(38px,5vw,58px); }
.sec-head h2{ font-size:clamp(1.9rem,4.2vw,3rem); margin-bottom:18px; }
.sec-head p{ font-size:1.06rem; color:var(--ink-2); margin:0; }

/* ── sectors ───────────────────────────────────────────────────────── */
.sectors{ display:grid; gap:14px; grid-template-columns:repeat(3,1fr); }
@media (max-width:980px){ .sectors{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:620px){ .sectors{ grid-template-columns:1fr; } }

.sector{
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--r); padding:28px 26px 24px;
  display:flex; flex-direction:column; gap:14px;
  transition:transform .32s cubic-bezier(.22,1,.36,1), box-shadow .32s, border-color .32s;
  position:relative; overflow:hidden;
}
section.tinted .sector{ background:var(--paper); }
.sector::after{
  content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:var(--pine); transform:scaleY(0); transform-origin:top;
  transition:transform .38s cubic-bezier(.22,1,.36,1);
}
.sector:hover{ transform:translateY(-4px); box-shadow:var(--shadow-lg); border-color:transparent; }
.sector:hover::after{ transform:scaleY(1); }
.sector .ic{
  width:38px; height:38px; color:var(--pine);
}
.sector h3{ font-size:1.22rem; letter-spacing:-.02em; }
.sector p{ margin:0; font-size:.96rem; color:var(--ink-2); }
.sector .roles{
  margin:auto 0 0; padding:16px 0 0; border-top:1px solid var(--line-2);
  list-style:none; display:flex; flex-wrap:wrap; gap:6px;
}
.sector .roles li{
  font-size:.78rem; font-weight:500; color:var(--ink-2);
  background:var(--pine-ink); border-radius:999px; padding:5px 11px;
}
section.tinted .sector .roles li{ background:var(--card); border:1px solid var(--line-2); }
.sector .pick{
  align-self:flex-start; margin-top:4px;
  font:700 .82rem/1 var(--display); color:var(--pine);
  background:none; border:0; padding:0; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px;
}
.sector .pick:hover{ text-decoration:underline; }

/* ── life / why ────────────────────────────────────────────────────── */
.life{ display:grid; gap:0; grid-template-columns:1fr 1fr; }
@media (max-width:820px){ .life{ grid-template-columns:1fr; } }
.life article{
  padding:32px 34px 32px 0; border-top:1px solid var(--line);
  display:flex; gap:22px; align-items:flex-start;
}
@media (min-width:821px){ .life article:nth-child(2n){ padding-left:34px; border-left:1px solid var(--line-2); } }
@media (max-width:820px){ .life article{ padding-right:0; } }
.life .n{
  font-family:var(--display); font-weight:800; font-size:.82rem;
  color:var(--pine); flex:none; padding-top:5px; letter-spacing:.04em;
}
.life h3{ font-size:1.24rem; margin-bottom:10px; }
.life p{ margin:0; color:var(--ink-2); font-size:.98rem; }

/* ── reviews ───────────────────────────────────────────────────────── */
.reviews-grid{ display:grid; gap:14px; grid-template-columns:repeat(3,1fr); }
@media (max-width:980px){ .reviews-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:620px){ .reviews-grid{ grid-template-columns:1fr; } }
.review{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  padding:26px 24px; display:flex; flex-direction:column; gap:14px;
}
section.tinted .review{ background:var(--paper); }
.review .stars{ display:flex; gap:3px; color:var(--ember); }
.review .stars svg{ width:15px; height:15px; }
.review blockquote{
  margin:0; font-size:1rem; line-height:1.6; color:var(--ink);
}
.review footer{
  margin-top:auto; font-size:.82rem; color:var(--ink-3);
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
}
.review footer .tag{
  background:var(--pine-ink); color:var(--pine); border-radius:999px;
  padding:3px 9px; font-weight:600; font-size:.74rem;
}

/* ── roles ─────────────────────────────────────────────────────────── */
.rolelist{ border-top:1px solid var(--line); }
.role{
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  padding:24px 0; border-bottom:1px solid var(--line-2);
  transition:padding-left .3s cubic-bezier(.22,1,.36,1);
}
.role:hover{ padding-left:10px; }
.role h3{ font-size:1.18rem; margin:0; flex:1 1 260px; }
.role .meta{ display:flex; gap:8px; flex-wrap:wrap; }
.role .meta span{
  font-size:.78rem; font-weight:500; color:var(--ink-2);
  border:1px solid var(--line); border-radius:999px; padding:5px 11px;
}
.role p{ flex:1 1 100%; margin:8px 0 0; color:var(--ink-2); font-size:.95rem; }
.empty{
  border:1px dashed var(--line); border-radius:var(--r);
  padding:40px 32px; text-align:center; color:var(--ink-2);
}
.empty strong{ display:block; font-family:var(--display); font-size:1.15rem; color:var(--ink); margin-bottom:8px; }

/* ── apply ─────────────────────────────────────────────────────────── */
.apply{ background:var(--ink); color:var(--paper); }
.apply .sec-head h2{ color:#fff; }
.apply .sec-head p{ color:rgba(246,244,239,.72); }
.apply .eyebrow{ color:rgba(246,244,239,.55); }
.apply .eyebrow .bar{ background:var(--ember); }

.form{
  display:grid; gap:20px; grid-template-columns:1fr 1fr;
  max-width:880px;
}
@media (max-width:720px){ .form{ grid-template-columns:1fr; } }
.field{ display:flex; flex-direction:column; gap:8px; }
.field.full{ grid-column:1/-1; }
.field label{
  font-family:var(--display); font-weight:700; font-size:.84rem;
  letter-spacing:.01em; color:rgba(246,244,239,.9);
  display:flex; gap:8px; align-items:baseline;
}
.field label em{
  font-style:normal; font-weight:500; font-family:var(--body);
  font-size:.78rem; color:rgba(246,244,239,.45);
}
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field textarea{
  font:400 1rem/1.5 var(--body);
  background:rgba(255,255,255,.06); color:#fff;
  border:1px solid rgba(255,255,255,.16); border-radius:12px;
  padding:14px 16px; width:100%;
  transition:border-color .2s, background .2s;
}
.field textarea{ min-height:130px; resize:vertical; }
.field input::placeholder,.field textarea::placeholder{ color:rgba(246,244,239,.35); }
.field input:focus,.field textarea:focus{
  outline:none; border-color:var(--ember); background:rgba(255,255,255,.1);
}
.chips{ display:flex; flex-wrap:wrap; gap:9px; }
.chip{
  position:relative; display:inline-flex;
}
.chip input{ position:absolute; opacity:0; width:0; height:0; }
.chip span{
  display:inline-block; cursor:pointer;
  font:600 .87rem/1 var(--body);
  padding:11px 16px; border-radius:999px;
  border:1px solid rgba(255,255,255,.2); color:rgba(246,244,239,.8);
  transition:background .2s, color .2s, border-color .2s, transform .2s;
}
.chip span:hover{ border-color:rgba(255,255,255,.45); }
.chip input:checked + span{ background:var(--paper); color:var(--ink); border-color:var(--paper); }
.chip input:focus-visible + span{ outline:2px solid var(--ember); outline-offset:2px; }

.drop{
  border:1px dashed rgba(255,255,255,.26); border-radius:12px;
  padding:22px; text-align:center; cursor:pointer;
  transition:border-color .2s, background .2s;
  color:rgba(246,244,239,.6); font-size:.9rem;
}
.drop:hover,.drop.over{ border-color:var(--ember); background:rgba(255,255,255,.05); }
.drop b{ color:var(--paper); font-family:var(--display); }
.drop input{ display:none; }
.filerow{
  display:flex; align-items:center; gap:10px; justify-content:space-between;
  background:rgba(255,255,255,.07); border-radius:10px; padding:11px 14px;
  font-size:.88rem; margin-top:10px;
}
.filerow button{
  background:none; border:0; color:rgba(246,244,239,.6); cursor:pointer;
  font-size:1.15rem; line-height:1; padding:0 4px;
}
.filerow button:hover{ color:var(--ember); }

.hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

.formfoot{
  grid-column:1/-1; display:flex; align-items:center; gap:18px; flex-wrap:wrap;
  margin-top:4px;
}
.apply .btn--primary{ background:var(--paper); color:var(--ink); }
.apply .btn--primary:hover{ background:var(--ember); color:#fff; }
.apply .btn--primary[disabled]{ opacity:.5; cursor:progress; }
.formfoot .fine{ font-size:.82rem; color:rgba(246,244,239,.5); max-width:44ch; }

.msg{ grid-column:1/-1; font-size:.92rem; padding:13px 16px; border-radius:11px; }
.msg.err{ background:rgba(184,83,42,.18); color:#F6C9B4; border:1px solid rgba(184,83,42,.4); }

.done{
  max-width:620px; padding:46px 0 0;
}
.done h3{ font-size:clamp(1.7rem,3.6vw,2.4rem); color:#fff; margin-bottom:16px; }
.done p{ color:rgba(246,244,239,.75); font-size:1.05rem; }
.done .ref{
  font-family:var(--display); font-weight:800; letter-spacing:.05em;
  background:rgba(255,255,255,.1); border-radius:10px; padding:4px 12px;
  display:inline-block; color:#fff;
}

/* ── footer ────────────────────────────────────────────────────────── */
.foot{ padding:52px 0 60px; font-size:.9rem; color:var(--ink-3); }
.foot__in{ display:flex; gap:26px; flex-wrap:wrap; align-items:flex-start; }
.foot .brand{ margin-right:auto; color:var(--ink); }
.foot a{ color:var(--ink-2); text-decoration:none; }
.foot a:hover{ color:var(--ink); text-decoration:underline; }
.foot .legal{ flex-basis:100%; padding-top:26px; margin-top:8px; border-top:1px solid var(--line-2); max-width:70ch; }

/* ── reveal on scroll ──────────────────────────────────────────────── */
.rv{ opacity:0; transform:translateY(18px); }
.rv.in{ opacity:1; transform:none; transition:opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.rv.d1.in{ transition-delay:.06s; }
.rv.d2.in{ transition-delay:.12s; }
.rv.d3.in{ transition-delay:.18s; }
.rv.d4.in{ transition-delay:.24s; }

@media (prefers-reduced-motion: reduce){
  .rv{ opacity:1; transform:none; }
  .hero h1 .rot i{ animation:none; }
  .livedot .d{ animation:none; }
  *{ transition-duration:.01ms !important; }
}

:focus-visible{ outline:2.5px solid var(--pine); outline-offset:3px; border-radius:4px; }
.apply :focus-visible{ outline-color:var(--ember); }
