/* Original careers hero, restored from the pre-review design. */
.careers-hero { min-height: 440px; display: flex; align-items: center; }
/* A separate sky layer fills wide screens without moving either building layer. */
@media (min-width: 901px) {
  .careers-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(13,12,10,.28), rgba(13,12,10,.58) 38%, rgba(13,12,10,.08) 70%),
      linear-gradient(0deg, var(--black), transparent 45%),
      url('/brand/hero-sky-extension.png') center / cover no-repeat;
  }
}
.careers-hero.hero-toggle { cursor: pointer; }
.careers-hero.hero-toggle :is(a, h1, p, .eyebrow) { cursor: auto; }
.careers-hero.hero-toggle a { cursor: pointer; }
.careers-hero::after { display: none; }   /* the soft fade below replaces the gold rule */
/* The hero dissolves into the page instead of ending on a hard line. Eased stops avoid a visible band. */
.hero-fade { position: relative; z-index: 1; height: 0; pointer-events: none; }
.hero-fade::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 64px;
  background: linear-gradient(180deg, #0d0c0a 0%, #0d0c0a99 14%, #0d0c0a52 32%, #0d0c0a26 55%, #0d0c0a0d 78%, #0d0c0a00 100%); }
@media (max-width: 900px) { .hero-fade::before { height: 44px; } }
.careers-hero .inner { max-width: 1360px; grid-template-columns: minmax(0, 680px); padding: 44px 40px 112px; gap: 72px; align-items: center; }
.careers-hero h1 { font-size: clamp(39px, 4.2vw, 63px); margin: 16px 0 0; line-height: 1.02; letter-spacing: -.015em; text-wrap: wrap; text-shadow: 0 2px 30px #0006; }
.careers-hero h1 em { color: var(--gold); display: block; }
/* "Build a career in real estate" sits on one line on desktop; the gold line goes below it. */
@media (min-width: 901px) {
  .careers-hero .inner { grid-template-columns: minmax(0, 980px); }
  .careers-hero .lead { max-width: 580px; }
}
.careers-hero .lead { font-size: 16.8px; max-width: 580px; margin-top: 20px; line-height: 1.65; color: #cfcac0; }
.careers-hero .eyebrow { font-size: 10.8px; }
.careers-hero .ctas { margin-top: 30px; gap: 12px; }
.careers-hero .ctas .btn { flex: initial; padding: 14px 24px; font-size: 11.1px; letter-spacing: .16em; line-height: 1.55; }
/* Keep the image full-height when max-width constrains its preferred aspect ratio. */
.careers-hero .hero-bg { inset: 0 0 0 auto; width: auto; height: 100%; aspect-ratio: 2.25 / 1; max-width: 86%; background-position: 55% 58%; filter: saturate(.9) contrast(1.05) brightness(.96); -webkit-mask-image: linear-gradient(90deg, transparent, #0005 10%, #000b 24%, #000 40%); mask-image: linear-gradient(90deg, transparent, #0005 10%, #000b 24%, #000 40%); }
.careers-hero .hero-bg::after { background: linear-gradient(0deg, #0d0c0a, #0d0c0ae6 7%, #0d0c0a00 30%), linear-gradient(180deg, #0d0c0a73, #0d0c0a00 16%); }
body.careers-home { background: #f2efe9; overflow-x: clip; }
.careers-home .site-main { --site-pad: 40px; }
.careers-home .search2 { z-index: 2; margin-top: -60px; padding: 26px 28px; grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 260px)); gap: 16px; border-radius: 0; box-shadow: var(--shadow-lg); }
.careers-home .search2 label { font-size: .7rem; letter-spacing: .16em; color: var(--gold-2); }
.careers-home .search2 input, .careers-home .search2 select { border-color: #d9d2c2; }
.careers-home .search2 input:focus, .careers-home .search2 select:focus { border-color: var(--gold); }
@media (min-width: 1500px) {
  .careers-hero h1 { font-size: clamp(41.6px, 4.2vw, 67.2px); }
  .careers-hero .lead { font-size: 17.92px; }
  .careers-hero .eyebrow { font-size: 11.52px; }
  .careers-hero .ctas .btn { font-size: 11.84px; }
}
@media (max-width: 900px) {
  .careers-hero { min-height: 420px; }
  .careers-hero .inner { padding: 36px 20px 112px; gap: 40px; }
  .careers-hero .hero-bg { left: 0; width: 100%; max-width: none; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; }
  .careers-hero .hero-bg::after { background: linear-gradient(180deg, #0d0c0a73, #0d0c0aad 45%, #0d0c0aeb); }
  .careers-home .site-main { --site-pad: 20px; }
  .careers-home .search2 { grid-template-columns: minmax(0, 1fr); padding: 20px; }
}

.hero-photo .hero-bg.layered { background-image: none; animation: none; }
.hero-bg .layer { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; background-position: 55% 58%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 300% 100%; mask-size: 300% 100%;
  /* visible side on the left of the sweep edge; a narrow feather keeps the "pen" edge crisp */
  -webkit-mask-image: linear-gradient(100deg, #000 47%, transparent 53%); mask-image: linear-gradient(100deg, #000 47%, transparent 53%);
  -webkit-mask-position: 100% 0; mask-position: 100% 0; }
.hero-bg .layer.sketch { background-image: url('/brand/hero-sketch.webp'); filter: contrast(1.08) brightness(1.05); }
.hero-bg .layer.photo  { background-image: url('/brand/hero-city.webp'); }
@media (max-width: 900px) {
  .hero-bg .layer.sketch { background-image: url('/brand/hero-sketch-1672.webp'); background-position: 68% center; }
  .hero-bg .layer.photo  { background-image: url('/brand/hero-city-1672.webp'); background-position: 68% center; }
}

/* Reveal (left → right) and erase (left → right, uncovering the sketch) */
@keyframes sweep-in  { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0% 0; mask-position: 0% 0; } }
.hero-bg .layer.erasing { -webkit-mask-image: linear-gradient(100deg, transparent 47%, #000 53%); mask-image: linear-gradient(100deg, transparent 47%, #000 53%); }

/* States */
.hero-bg[data-state="draw"]    .sketch { animation: sweep-in 2.6s cubic-bezier(.6,.05,.35,1) forwards; }
.hero-bg[data-state="paint"]   .sketch,
.hero-bg[data-state="photo"]   .sketch,
.hero-bg[data-state="unpaint"] .sketch,
.hero-bg[data-state="sketch"]  .sketch { -webkit-mask-position: 0% 0; mask-position: 0% 0; }
.hero-bg[data-state="paint"]   .photo  { animation: sweep-in 2.6s cubic-bezier(.6,.05,.35,1) forwards; }
.hero-bg[data-state="photo"]   .photo  { -webkit-mask-position: 0% 0; mask-position: 0% 0; }
.hero-bg[data-state="unpaint"] .photo  { -webkit-mask-image: linear-gradient(100deg, transparent 47%, #000 53%); mask-image: linear-gradient(100deg, transparent 47%, #000 53%);
  -webkit-mask-position: 100% 0; mask-position: 100% 0; animation: sweep-in 2.6s cubic-bezier(.6,.05,.35,1) forwards; }
.hero-bg[data-state="sketch"]  .photo  { -webkit-mask-position: 100% 0; mask-position: 100% 0; }

/* The pen: a glowing gold stroke that rides exactly on the sweep edge (edge travels -50% → 150%) */
.hero-bg .pen { position: absolute; top: -12%; bottom: -12%; left: -50%; width: 0; transform: rotate(10deg); opacity: 0; pointer-events: none; z-index: 1; }
.hero-bg .pen::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px;
  background: linear-gradient(180deg, transparent, #f3dc9a 18%, #fff4d6 50%, #f3dc9a 82%, transparent);
  box-shadow: 0 0 12px 2px rgba(225,192,103,.85), 0 0 40px 10px rgba(201,168,76,.35); }
.hero-bg .pen::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 140px;   /* warm trailing light */
  background: linear-gradient(90deg, rgba(201,168,76,0), rgba(201,168,76,.16)); filter: blur(6px); }
.hero-bg .pen i { position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #fff4d6;
  box-shadow: 0 0 18px 6px rgba(243,220,154,.9); }
.hero-bg[data-state="draw"] .pen i, .hero-bg[data-state="paint"] .pen i, .hero-bg[data-state="unpaint"] .pen i { animation: pen-tip 2.6s cubic-bezier(.6,.05,.35,1) forwards; }
@keyframes pen-travel { 0% { left: -50%; opacity: 0; } 22% { opacity: 1; } 78% { opacity: 1; } 100% { left: 150%; opacity: 0; } }
@keyframes pen-tip { 0% { top: 70%; } 30% { top: 35%; } 55% { top: 60%; } 80% { top: 28%; } 100% { top: 50%; } }
.hero-bg[data-state="draw"] .pen, .hero-bg[data-state="paint"] .pen, .hero-bg[data-state="unpaint"] .pen {
  animation: pen-travel 2.6s cubic-bezier(.6,.05,.35,1) forwards; }
/* Drawing the sketch uses a finer, whiter pen; painting uses a broader golden brush */
.hero-bg[data-state="draw"] .pen::before { background: linear-gradient(180deg, transparent, #fff 20%, #fff 80%, transparent); box-shadow: 0 0 10px 2px rgba(255,255,255,.7), 0 0 30px 6px rgba(201,168,76,.3); }
.hero-bg[data-state="paint"] .pen::after, .hero-bg[data-state="unpaint"] .pen::after { width: 260px; background: linear-gradient(90deg, rgba(201,168,76,0), rgba(225,192,103,.28)); }

/* Reduced motion: just the photograph */
.hero-bg[data-state="photo"] .pen, .hero-bg[data-state="sketch"] .pen, .hero-bg[data-state="idle"] .pen { display: none; }
@media (prefers-reduced-motion: reduce) { .hero-bg .layer, .hero-bg .pen, .hero-bg .pen i { animation: none !important; } }

/* v11b — one clock drives everything: JS sets --s (sketch), --pp (photo), --pen, --pen-o, --tip */
.hero-bg.layered .layer, .hero-bg.layered .pen, .hero-bg.layered .pen i { animation: none !important; }
.hero-bg.layered .layer.sketch { -webkit-mask-position: calc(100% - var(--s, 0) * 100%) 0; mask-position: calc(100% - var(--s, 0) * 100%) 0; }
.hero-bg.layered .layer.photo  { -webkit-mask-position: calc(100% - var(--pp, 0) * 100%) 0; mask-position: calc(100% - var(--pp, 0) * 100%) 0; }
.hero-bg.layered.erasing .layer.photo { -webkit-mask-image: linear-gradient(100deg, transparent 47%, #000 53%); mask-image: linear-gradient(100deg, transparent 47%, #000 53%); }
.hero-bg.layered .pen { display: block; left: calc(-50% + var(--pen, 0) * 200%); opacity: var(--pen-o, 0); }
.hero-bg.layered .pen i { top: var(--tip, 50%); }
.hero-bg.layered.drawing .pen::before { background: linear-gradient(180deg, transparent, #fff 20%, #fff 80%, transparent); box-shadow: 0 0 10px 2px rgba(255,255,255,.75), 0 0 32px 8px rgba(201,168,76,.32); }
.hero-bg.layered.drawing .pen::after { width: 120px; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.08)); }
.hero-bg.layered.painting .pen::after, .hero-bg.layered.erasing .pen::after { width: 260px; background: linear-gradient(90deg, rgba(201,168,76,0), rgba(225,192,103,.28)); }

