/* /about: globe hero (cobe, js/globe.js with spin), team accordion (after 21st "image accordion"),
   team pop-ups (<dialog>, js/team.js), open roles list. */

/* Hero */
/* Full-screen hero like /audit: header sits on it (body.has-photo-hero). Big H1, then a huge globe cut by the bottom edge that fades into the white section below.
   The orange light is one small blurred disc behind the globe, moved by transform only (js/team.js), so it never repaints. */
.about-hero { position: relative; isolation: isolate; height: 100svh; min-height: 680px; margin-top: calc(-1 * var(--ev-hdr)); padding-top: calc(var(--ev-hdr) + 20px); overflow: hidden; background: #0d0b0a; color: var(--on-dark); }
.about-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 28%; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, rgba(255, 253, 251, 0), var(--white) 92%); }
.about-hero .crumbs a { color: var(--on-dark-3); }
.about-hero [aria-current] { color: var(--on-dark-2); }
.about-hero__light { position: absolute; left: 0; top: 0; z-index: -1; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(240, 85, 26, .5), rgba(240, 85, 26, .16) 40%, transparent 70%); transform: translate3d(20vw, 30vh, 0); will-change: transform; }
.about-hero__top { position: relative; z-index: 1; display: grid; justify-items: center; }
.about-hero__top .crumbs { justify-self: start; }
.about-hero__title { margin: clamp(.5rem, 3svh, 2rem) 0 0; font-size: clamp(4rem, 15vw, 12.5rem); line-height: .95; letter-spacing: -0.05em; font-weight: 600; background: linear-gradient(180deg, #fff 10%, rgba(255, 255, 255, .45)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-hero__title span { background: linear-gradient(180deg, #F6A06B 10%, #C45A1A); -webkit-background-clip: text; background-clip: text; }
.about-hero__globe { position: absolute; left: 50%; top: clamp(250px, 42svh, 460px); width: min(1500px, 125vw); translate: -50% 0; }
.globe--team { max-width: none; width: 100%; }
.globe--team canvas { filter: drop-shadow(0 0 40px rgba(255, 255, 255, .35)); }
.about-intro { padding-top: clamp(1rem, 3vw, 2rem); }
.about-intro__inner { display: grid; justify-items: center; text-align: center; }
.about-intro .lead { max-width: 52ch; margin: 0; color: var(--ink); }
.about-intro__note { margin: var(--s-5) 0 0; font-size: var(--t-xs); color: var(--ink-3, #78716c); }
.about-hero__skills { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }
.about-hero__cta { justify-content: center; margin-top: var(--s-6); }
@media (max-width: 700px) { .about-hero { height: 78svh; min-height: 560px; } .about-hero__globe { width: 150vw; top: 34svh; } .about-hero__light { width: 220px; height: 220px; margin: -110px 0 0 -110px; } .globe__tag { display: none; } }
.globe__job { display: grid; gap: 1px; line-height: 1.2; }
.globe--team .globe__tag > .globe__job { opacity: 1; padding-left: 2px; border-left: 0; }
.globe__job small { font-size: 0.68rem; opacity: 0.72; }
.globe--team .globe__tag { padding: 6px 12px 6px 9px; border-radius: 14px; }
.globe--team .globe__faces img { object-position: center 20%; }

/* Team accordion: hovered portrait opens, the others shrink to a fifth */
.tacc { display: flex; gap: 8px; height: clamp(440px, 46vw, 580px); margin-top: var(--s-6); }
.tacc__item { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--dark-2); color: #fff; text-decoration: none; transition: flex 0.6s var(--ease-out, ease); }
.tacc__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: filter 0.6s, scale 0.8s var(--ease-out, ease); }
.tacc__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20, 17, 15, 0.88)); }
.tacc__cap { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 18px; display: grid; gap: 4px; transition: opacity 0.35s; }
.tacc__cap b { font-size: var(--t-h4); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.tacc__cap span { font-size: var(--t-xs); color: rgba(255, 255, 255, 0.78); }
.tacc__plus { position: absolute; z-index: 1; top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: 1.3rem; line-height: 1; opacity: 0; scale: 0.7; transition: opacity 0.3s, scale 0.3s; }
@media (min-width: 760px) {
  .tacc:hover .tacc__item, .tacc:has(:focus-visible) .tacc__item { flex-grow: 0.2; }
  .tacc .tacc__item:hover, .tacc .tacc__item:focus-visible { flex-grow: 1; }
  .tacc:hover .tacc__item:not(:hover) img, .tacc:has(:focus-visible) .tacc__item:not(:focus-visible) img { filter: grayscale(1) brightness(0.65); }
  .tacc:hover .tacc__item:not(:hover) .tacc__cap, .tacc:has(:focus-visible) .tacc__item:not(:focus-visible) .tacc__cap { opacity: 0; }
  .tacc__item:hover img, .tacc__item:focus-visible img { scale: 1.04; }
  .tacc__item:hover .tacc__plus, .tacc__item:focus-visible .tacc__plus { opacity: 1; scale: 1; }
  .tacc__cap b, .tacc__cap span { overflow: hidden; text-overflow: ellipsis; }
  .tacc__item:hover .tacc__cap b, .tacc__item:focus-visible .tacc__cap b { font-size: var(--t-h3); }
}
@media (max-width: 759px) {
  .tacc { display: grid; grid-template-columns: 1fr 1fr; height: auto; }
  .tacc__item { aspect-ratio: 4 / 5; border-radius: var(--r-md); }
  .tacc__cap { left: 12px; right: 12px; bottom: 12px; }
  .tacc__cap b { font-size: 0.95rem; }
  .tacc__plus { opacity: 1; scale: 0.8; top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .tacc__item, .tacc__item img { transition: none; } }

/* Team pop-up */
.tm { margin: auto; width: min(920px, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--white); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow: auto; }
.tm[open] { display: grid; animation: tm-in 0.35s var(--ease-out, ease); }
@media (min-width: 760px) { .tm[open] { grid-template-columns: 0.8fr 1.2fr; } }
.tm::backdrop { background: rgba(17, 15, 13, 0.6); backdrop-filter: blur(3px); }
.tm__photo { position: relative; min-height: 280px; background: var(--dark-2); }
.tm__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.tm__body { padding: clamp(1.25rem, 3vw, 2.5rem); display: grid; gap: var(--s-3); align-content: start; }
.tm__body h3 { margin: 0; padding-right: 40px; }
.tm__role { margin: 0; color: var(--accent-ink); font-weight: 600; font-size: var(--t-small); }
.tm__body p { margin: 0; }
.tm__body h4 { margin: var(--s-3) 0 0; font-size: var(--t-small); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); }
.tm__body .creds { display: flex; flex-wrap: wrap; gap: 6px; }
.tm__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tm__list li { position: relative; padding-left: 18px; font-size: var(--t-small); }
.tm__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.tm__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-3); }
.tm__link { font-size: var(--t-small); font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.tm__link:hover { text-decoration-color: var(--accent); }
.tm__close { position: absolute; top: 12px; right: 12px; z-index: 2; margin: 0; }
.tm__close button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ink); color: var(--on-dark); font-size: 1.6rem; line-height: 1; rotate: 45deg; cursor: pointer; }
@keyframes tm-in { from { opacity: 0; translate: 0 16px; } }
@media (prefers-reduced-motion: reduce) { .tm[open] { animation: none; } }

/* Open roles */
.roles { list-style: none; padding: 0; margin: var(--s-6) 0 0; border-top: 1px solid var(--dark-3); }
.roles__row { display: grid; gap: var(--s-3); align-items: center; padding: var(--s-5) 0; border-bottom: 1px solid var(--dark-3); }
@media (min-width: 860px) { .roles__row { grid-template-columns: 1.1fr 1.4fr auto; gap: var(--s-5); } }
.roles__row h3 { margin: 0; font-size: var(--t-h4); font-weight: 600; }
.roles__row p { margin: 4px 0 0; font-size: var(--t-small); color: var(--on-dark-3); }
.roles__skills { display: flex; flex-wrap: wrap; gap: 6px; }
.roles__row .btn { justify-self: start; }
.roles__row:hover h3 { color: var(--accent-soft); }

/* Application pop-up (js/team.js + forms.js) */
.apply { width: min(560px, calc(100vw - 2rem)); }
.tm.apply[open] { display: block; }
.apply__body { padding: clamp(1.25rem, 4vw, 2.25rem); display: grid; gap: var(--s-2); }
.apply__body > .h3 { margin: 0 0 var(--s-3); padding-right: 40px; }
.apply .qform { display: grid; gap: var(--s-4); }
.qdone { display: none; justify-items: center; text-align: center; gap: var(--s-3); padding: var(--s-6) 0 var(--s-4); }
.qdone .h3, .qdone p { margin: 0; }
.qform.is-done > :not(.qdone) { display: none; }
.qform.is-done .qdone { display: grid; animation: qstep-in 0.5s var(--ease-out, ease); }
.qdone__tick { width: 84px; height: 84px; fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.qdone__tick circle { stroke-dasharray: 183; stroke-dashoffset: 183; transform: rotate(-90deg); transform-origin: center; }
.qdone__tick path { stroke-dasharray: 44; stroke-dashoffset: 44; }
.is-done .qdone__tick { animation: qdone-pop 0.5s 0.9s var(--ease-out, ease) both; }
.is-done .qdone__tick circle { animation: qdone-draw 0.6s 0.1s ease-out forwards; }
.is-done .qdone__tick path { animation: qdone-draw 0.35s 0.6s ease-out forwards; }
@keyframes qdone-draw { to { stroke-dashoffset: 0; } }
@keyframes qdone-pop { 50% { scale: 1.12; } }
@media (prefers-reduced-motion: reduce) { .is-done .qdone__tick circle, .is-done .qdone__tick path { animation: none; stroke-dashoffset: 0; } .is-done .qdone__tick { animation: none; } }
.apply__links { display: grid; gap: var(--s-2); }
.apply__add { justify-self: start; margin-top: var(--s-2); padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: var(--t-small); font-weight: 600; cursor: pointer; }
.drop { position: relative; display: grid; gap: 2px; justify-items: center; text-align: center; padding: var(--s-5) var(--s-4); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--d-fast), background-color var(--d-fast); }
.drop:hover, .drop:focus-within { border-color: var(--accent); background: var(--accent-wash); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop span { font-size: var(--t-xs); color: var(--muted-2); }
.drop__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: var(--t-small); }
.drop__list:empty { display: none; }
.drop__list li { display: flex; justify-content: space-between; gap: var(--s-3); padding: 6px 10px; border-radius: 8px; background: var(--accent-wash); overflow-wrap: anywhere; }
.drop__list span { color: var(--muted-2); white-space: nowrap; }
.drop__list .is-bad { color: #b42318; }
.apply__photo { display: flex; align-items: center; gap: var(--s-4); }
.apply__photo-ctl { display: grid; gap: var(--s-2); flex: 1; }
.crop { position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--accent-wash); display: grid; place-items: center; color: var(--accent-ink); font-size: 1.8rem; touch-action: none; }
.crop.has-img { cursor: grab; box-shadow: 0 0 0 3px var(--accent); }
.crop.has-img span { display: none; }
.crop img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center; user-select: none; -webkit-user-drag: none; pointer-events: none; }
