/* Icons and motion for the public site.
   Motion follows Emil Kowalski's rules: transform and opacity only, strong ease-out curves for
   anything entering, ease-in-out for things moving on screen, UI feedback under 300ms, hover
   motion only where a real pointer hovers, and a gentler version for reduced motion. Longer,
   staggered motion is kept to first impressions (the hero, a section scrolling into view, the
   product preview explaining itself); things people do all day stay instant. */
:root { --ease-out:cubic-bezier(0.23,1,0.32,1); --ease-in-out:cubic-bezier(0.77,0,0.175,1);
  /* A damped spring (one gentle overshoot, about 12%, then settles), for the few entrances that may bounce. */
  --ease-spring:linear(0, 0.047, 0.163, 0.318, 0.487, 0.65, 0.795, 0.914, 1.005, 1.068, 1.107, 1.124, 1.125, 1.115, 1.098, 1.077, 1.056, 1.036, 1.019, 1.006, 0.996, 0.989, 0.985, 0.984, 0.985, 0.986, 0.989, 0.991, 1); }
@supports not (animation-timing-function:linear(0, 1)) { :root { --ease-spring:cubic-bezier(0.34,1.36,0.64,1); } }

.icon { width:1.15em; height:1.15em; flex-shrink:0; vertical-align:-0.18em; }
button .icon,a.button .icon { width:1.05em; height:1.05em; }

/* Press feedback on everything pressable. */
button,a.button { transition:transform 160ms var(--ease-out),filter 160ms ease,background-color 160ms ease,color 160ms ease; }
button:active,a.button:active { transform:scale(0.97); }

/* Header */
.menu-toggle .icon { width:20px; height:20px; }
.menu-toggle .when-open,.menu-toggle[aria-expanded="true"] .when-closed { display:none; }
.menu-toggle[aria-expanded="true"] .when-open { display:block; }
#header .nav { transition:opacity 200ms var(--ease-out),transform 200ms var(--ease-out); }
@starting-style { #header.menu-open .nav { opacity:0; transform:translateY(-6px); } }

/* Hero: the copy rises in, line by line, once per visit to the page. */
.rise { animation:rise 640ms var(--ease-out) both; animation-delay:calc(var(--i,0) * 70ms); }
@keyframes rise { from { opacity:0; transform:translateY(12px); } }
.home-hero { position:relative; overflow:hidden; isolation:isolate; }
/* A slow drifting glow behind the preview: decoration on a marketing page, so it may move constantly. */
.home-hero::before { content:''; position:absolute; z-index:-1; width:620px; height:620px; right:-140px; top:-160px; border-radius:50%; background:radial-gradient(circle,#2f7a5f 0%,#2f7a5f00 68%); opacity:.55; animation:drift 16s var(--ease-in-out) infinite alternate; pointer-events:none; }
@keyframes drift { from { transform:translate(0,0) scale(1); } to { transform:translate(-120px,90px) scale(1.15); } }

.hero-mode { position:relative; display:inline-grid; grid-template-columns:1fr 1fr; }
.hero-mode button { position:relative; z-index:1; transition:color 250ms ease,transform 160ms var(--ease-out); }
.hero-mode button[aria-pressed="true"] { background:transparent; }
.mode-thumb { position:absolute; z-index:0; top:4px; bottom:4px; left:4px; width:calc(50% - 4px); border-radius:26px; background:var(--lime); transition:transform 280ms var(--ease-in-out); }
.hero-mode:has([data-home-mode="workers"][aria-pressed="true"]) .mode-thumb { transform:translateX(100%); }
.hero-copy .searchbar { align-items:center; }
.search-glyph { color:var(--muted); margin-left:14px; width:18px; height:18px; }
.hero-copy .searchbar input { padding-left:10px; }
.hero-popular a { display:inline-flex; align-items:center; gap:6px; }
.hero-popular a .icon { width:14px; height:14px; transition:transform 200ms var(--ease-out); }

/* Product preview: the cards settle in, then the preview acts out an application (motion.js). */
.hero-preview { animation:card-in 760ms var(--ease-out) 120ms both; }
.hero-preview .pv-card { animation:card-in 720ms var(--ease-out) both; animation-delay:calc(260ms + var(--i,0) * 110ms); }
@keyframes card-in { from { opacity:0; transform:translateY(16px) scale(0.97); } }
.pv-verified { width:15px; height:15px; color:var(--accent); vertical-align:-2px; }
.pv-label { display:flex; align-items:center; gap:6px; }
.pv-label .icon { width:14px; height:14px; color:var(--accent); }
.pv-bar i { width:100%; transform-origin:left; transform:scaleX(0.86); }
.hero-preview.is-playing .pv-bar i { animation:fill 1100ms var(--ease-out) 200ms both; }
@keyframes fill { from { transform:scaleX(0); } }
/* The step highlight is one element sliding under the labels, so the fill and the text change together. */
.pv-card:has(.pv-steps) { position:relative; }
.pv-steps li span { position:relative; z-index:1; transition:color 300ms ease; }
.pv-thumb { position:absolute; left:0; top:0; border-radius:8px; background:var(--accent); opacity:0; transition:transform 480ms var(--ease-in-out); }
.hero-preview.pv-ready .pv-thumb { opacity:1; }
.hero-preview.pv-ready .pv-steps li.now { background:#f0f5ec; }
.pv-message p { margin:0; transition:opacity 220ms ease,filter 220ms ease; }
.pv-message p.is-changing { opacity:0; filter:blur(2px); }

/* Below the hero */
.trust { list-style:none; margin:0; padding:22px var(--edge) 0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px 28px; }
.trust li { display:flex; align-items:center; gap:10px; font-size:14px; color:#3f524c; }
.trust .icon { width:20px; height:20px; padding:8px; box-sizing:content-box; border-radius:10px; background:var(--tint); color:var(--accent); }
.section-top>a { display:inline-flex; align-items:center; gap:6px; }
.section-top>a .icon,.cta .button .icon { transition:transform 200ms var(--ease-out); }
.empty-icon { display:inline-grid; place-items:center; width:52px; height:52px; border-radius:16px; background:var(--tint); color:var(--accent); margin-bottom:14px; }
.empty-icon .icon { width:24px; height:24px; }

/* Sign-in, onboarding and the jobs and talent intros come in once when the page opens. */
/* Sign-in steps: the card springs up, the heading's letters pop in one by one, hold a beat, then a
   wave runs across them once; the rest of the form follows. A first impression, so it may bounce. */
section.card.narrow { animation:card-spring 760ms var(--ease-spring) both; }
@keyframes card-spring { from { opacity:0; transform:translateY(28px) scale(0.96); } }
/* .entering is on the first render only (motion.js drops it), so what replaces the form later,
   like "Check your inbox", isn't held back by the stagger. */
.entering>.eyebrow { animation:rise 480ms var(--ease-out) 160ms both; }
.entering>:not(.eyebrow):not(.bounce-title):not(form),.entering form>* { animation:rise 520ms var(--ease-out) both; animation-delay:720ms; }
.entering form>:nth-child(2) { animation-delay:800ms; }
.entering form>:nth-child(3) { animation-delay:880ms; }
.entering form>:nth-child(n+4) { animation-delay:960ms; }
.bounce-title .word { display:inline-block; white-space:nowrap; }
.bounce-title .ch { display:inline-block; animation:letter-in 640ms var(--ease-spring) calc(240ms + var(--i) * 32ms) both,letter-wave 560ms var(--ease-in-out) calc(1500ms + var(--i) * 45ms); }
@keyframes letter-in { from { opacity:0; transform:translateY(0.5em) rotate(6deg); } }
@keyframes letter-wave { 40% { transform:translateY(-0.14em); } }
.discovery-intro>* { animation:rise 560ms var(--ease-out) both; }
.discovery-intro>:nth-child(2) { animation-delay:60ms; }
.discovery-intro>:nth-child(3) { animation-delay:120ms; }

/* Sign-in sent state */
.sent { display:flex; gap:14px; align-items:flex-start; padding:18px; border-radius:14px; background:var(--tint); animation:sent-in 420ms var(--ease-out) both; }
.sent>.icon { width:26px; height:26px; color:var(--accent); flex-shrink:0; animation:sent-icon 520ms var(--ease-out) 80ms both; }
.sent strong { font:700 16px 'Manrope',sans-serif; }
.sent p { margin:4px 0 0; font-size:14px; color:#4c5f58; }
@keyframes sent-in { from { opacity:0; transform:translateY(8px); } }
@keyframes sent-icon { from { opacity:0; transform:scale(0.8) rotate(-8deg); } }

/* Sections reveal once as they scroll into view (motion.js sets is-visible); children follow in a short stagger. */
.motion-ready .reveal { opacity:0; transform:translateY(18px); transition:opacity 700ms var(--ease-out),transform 700ms var(--ease-out); }
.motion-ready .reveal.is-visible { opacity:1; transform:none; }
.motion-ready .reveal .stagger>* { opacity:0; }
.motion-ready .reveal.is-visible .stagger>* { opacity:1; animation:rise 560ms var(--ease-out) both; }
.reveal.is-visible .stagger>:nth-child(2) { animation-delay:50ms; }
.reveal.is-visible .stagger>:nth-child(3) { animation-delay:100ms; }
.reveal.is-visible .stagger>:nth-child(4) { animation-delay:150ms; }
.reveal.is-visible .stagger>:nth-child(5) { animation-delay:200ms; }
.reveal.is-visible .stagger>:nth-child(n+6) { animation-delay:250ms; }

#toast.show { animation:toast-in 320ms var(--ease-out); }
@keyframes toast-in { from { opacity:0; transform:translate(-50%,10px); } }

/* Guide */
.guide-page .ticket { display:flex; gap:16px; align-items:center; animation:card-in 720ms var(--ease-out) both; animation-delay:calc(200ms + var(--i,0) * 110ms); }
.guide-page .ticket .icon { width:26px; height:26px; flex-shrink:0; color:var(--accent); }
.guide-page .flags ul,.guide-page ul.flags { list-style:none; }
.guide-page .flags li { display:flex; gap:12px; align-items:flex-start; }
.guide-page .flags li>.icon { color:#a8571c; margin-top:4px; }
.guide-page .faq summary { display:flex; justify-content:space-between; align-items:center; gap:16px; list-style:none; }
.guide-page .faq summary::-webkit-details-marker { display:none; }
.guide-page .faq summary .icon { color:var(--accent); transition:transform 220ms var(--ease-out); }
.guide-page .faq details[open] summary .icon { transform:rotate(180deg); }
.guide-page .faq details[open]>p { animation:rise 320ms var(--ease-out) both; }

/* Mock-up screens swap with a short blurred crossfade; each one then plays its own little sequence. */
.flow-stage>.mock-window,.roles-stage>.role-card { opacity:0; transform:translateY(12px) scale(0.98); filter:blur(4px); pointer-events:none; transition:opacity 420ms var(--ease-out),transform 420ms var(--ease-out),filter 420ms var(--ease-out); }
.flow-stage>.mock-window.is-active,.roles-stage>.role-card.is-active { opacity:1; transform:none; filter:none; }
/* 1. A job post: the title types itself, the details settle, review turns it Live. */
.is-active .mock-type { animation:type 900ms steps(19,end) 250ms both; }
@keyframes type { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0 0 0); } }
.is-active .mock-pair,.is-active .mock-chips,.is-active .mock-note { animation:rise 520ms var(--ease-out) both; }
.is-active .mock-pair { animation-delay:900ms; } .is-active .mock-chips { animation-delay:1050ms; } .is-active .mock-note { animation-delay:1200ms; }
.st-live { opacity:0; }
.is-active .st-review { animation:status-out 260ms var(--ease-out) 2000ms both; }
.is-active .st-live { animation:status-in 360ms var(--ease-out) 2050ms both; }
@keyframes status-out { to { opacity:0; transform:scale(0.9); } }
@keyframes status-in { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:none; } }
/* 2. Assessments: each score fills in turn, then the result. */
.is-active .mock-bar i { animation:fill 900ms var(--ease-out) both; }
.is-active .mock-score:nth-of-type(2) .mock-bar i { animation-delay:150ms; }
.is-active .mock-score:nth-of-type(3) .mock-bar i { animation-delay:300ms; }
.is-active .mock-score:nth-of-type(4) .mock-bar i { animation-delay:450ms; }
.is-active .mock-pass { animation:status-in 360ms var(--ease-out) 1300ms both; }
/* 3. A conversation: two messages, someone typing, then the interview invite lands in its place. */
.is-active .mock-chat .msg:nth-child(1) { animation:msg-in 420ms var(--ease-out) 200ms both; }
.is-active .mock-chat .msg:nth-child(2) { animation:msg-in 420ms var(--ease-out) 1000ms both; }
.is-active .mock-typing { animation:typing-life 1400ms var(--ease-out) 1700ms both; }
.is-active .mock-invite { animation:msg-in 420ms var(--ease-out) 3100ms both; }
.mock-typing i { animation:dot 900ms ease-in-out infinite; }
.mock-typing i:nth-child(2) { animation-delay:150ms; } .mock-typing i:nth-child(3) { animation-delay:300ms; }
@keyframes msg-in { from { opacity:0; transform:translateY(8px) scale(0.97); } }
@keyframes typing-life { 0% { opacity:0; transform:translateY(6px); } 15%,80% { opacity:1; transform:none; } 100% { opacity:0; transform:scale(0.95); } }
@keyframes dot { 0%,80%,100% { transform:translateY(0); opacity:.45; } 40% { transform:translateY(-3px); opacity:1; } }
/* 4. Hired: the tick draws, then the onboarding list fills in. */
.mock-tick circle,.mock-tick path { stroke-dasharray:1; }
.is-active .mock-tick circle { animation:draw 700ms var(--ease-out) 150ms both; }
.is-active .mock-tick path { animation:draw 420ms var(--ease-out) 700ms both; }
@keyframes draw { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
.is-active .mock-hired b,.is-active .mock-hired small { animation:rise 480ms var(--ease-out) 800ms both; }
.is-active .mock-todo li { animation:rise 480ms var(--ease-out) both; }
.is-active .mock-todo li:nth-child(1) { animation-delay:1000ms; } .is-active .mock-todo li:nth-child(2) { animation-delay:1150ms; } .is-active .mock-todo li:nth-child(3) { animation-delay:1300ms; }
.is-active .mock-todo li .icon { animation:status-in 320ms var(--ease-out) both; animation-delay:inherit; }
.role-card.is-active .mock-todo li:nth-child(1) { animation-delay:250ms; } .role-card.is-active .mock-todo li:nth-child(2) { animation-delay:400ms; } .role-card.is-active .mock-todo li:nth-child(3) { animation-delay:550ms; }
.role-card.is-active .mock-chips { animation-delay:700ms; }

/* Steps: the lit one is full strength; its bar runs the clock (motion.js moves on when it ends). */
.flow-item { opacity:.45; transition:opacity 300ms ease,transform 160ms var(--ease-out); }
.flow-item[aria-pressed="true"] { opacity:1; }
.flow-icon { transition:background-color 300ms ease,color 300ms ease,transform 220ms var(--ease-out); }
.flow-item[aria-pressed="true"] .flow-icon { background:var(--accent); color:#fff; }
.flow.is-running .flow-item[aria-pressed="true"] .flow-progress i { animation:progress 5200ms linear both; }
.accordion.is-running .acc-item.is-open .acc-progress i { animation:progress 6000ms linear both; }
@keyframes progress { from { transform:scaleX(0); } to { transform:scaleX(1); } }
.flow-grid:hover .flow-progress i,.flow.is-paused .flow-progress i,.accordion:hover .acc-progress i,.accordion.is-paused .acc-progress i { animation-play-state:paused; }

/* The accordion opens by height (the one sanctioned layout animation) with the text fading in after. */
.acc-panel { transition:grid-template-rows 320ms var(--ease-out); }
.acc-inner { opacity:0; transition:opacity 200ms ease; }
.acc-item.is-open .acc-inner { opacity:1; transition:opacity 260ms ease 80ms; }
.acc-trigger { transition:color 200ms ease; }
.acc-plus::after { transition:transform 280ms var(--ease-out); }
.acc-item.is-open .acc-plus::after { transform:rotate(0deg); }
.acc-icon { transition:background-color 220ms ease,color 220ms ease; }
.acc-item.is-open .acc-icon { background:var(--accent); color:#fff; }

/* The closing mark draws itself when it scrolls in. */
.motion-ready .cta-mark path { stroke-dasharray:1; stroke-dashoffset:1; }
.motion-ready .cta.is-visible .cta-mark path:first-child { animation:draw 1100ms var(--ease-in-out) 200ms both; }
.motion-ready .cta.is-visible .cta-mark path:last-child { animation:draw 420ms var(--ease-out) 1200ms both; }

/* Hover motion only where a real pointer hovers; touch fires hover on tap. */
@media (hover:hover) and (pointer:fine) {
  .hero-popular a:hover .icon { transform:translate(2px,-2px); }
  .flow-item:not([aria-pressed="true"]):hover { opacity:.75; }
  .flow-item:hover .flow-icon { transform:translateY(-2px); }
  .job-card { transition:transform 220ms var(--ease-out),border-color 220ms ease; }
  .job-card:hover { transform:translateY(-3px); border-color:#b9cfc1; }
  .guide-page .ticket { transition:transform 220ms var(--ease-out); }
  .guide-page .ticket:hover { transform:translateX(4px); }
}

@media (max-width:860px) {
  .trust { grid-template-columns:1fr 1fr; padding-top:18px; }
  .home-hero::before { width:420px; height:420px; right:-160px; top:auto; bottom:-120px; }
}
@media (max-width:480px) {
  .trust { grid-template-columns:1fr; gap:12px; }
  .hero-copy .searchbar { flex-direction:row; flex-wrap:wrap; }
  .hero-copy .searchbar input { flex:1; }
  .hero-copy .searchbar button { flex-basis:100%; }
}

/* Reduced motion: fewer and gentler, not none. Keep fades, drop movement and the looping preview. */
@media (prefers-reduced-motion:reduce) {
  .rise,section.card.narrow,.entering>*,.entering form>*,.bounce-title .ch,.discovery-intro>*,.hero-preview,.hero-preview .pv-card,.guide-page .ticket,.motion-ready .reveal.is-visible .stagger>*,.guide-page .faq details[open]>p,.sent,.sent>.icon,#toast.show { animation-name:fade; }
  @keyframes fade { from { opacity:0; } }
  .home-hero::before { animation:none; }
  .motion-ready .reveal,.motion-ready .reveal .stagger>* { transform:none; }
  button:active,a.button:active { transform:none; }
  .mode-thumb,.pv-thumb { transition-duration:0ms; }
  .flow-stage>.mock-window,.roles-stage>.role-card { transform:none; filter:none; }
  .is-active .mock-type { animation:none; }
  .is-active .mock-pair,.is-active .mock-chips,.is-active .mock-note,.is-active .mock-todo li,.is-active .mock-hired b,.is-active .mock-hired small,.is-active .mock-chat .msg,.is-active .mock-invite { animation-name:fade; }
  .is-active .mock-bar i,.is-active .mock-tick circle,.is-active .mock-tick path,.motion-ready .cta.is-visible .cta-mark path { animation:none; stroke-dashoffset:0; }
  .is-active .mock-typing { display:none; }
  .mock-typing i { animation:none; }
}
