/* ══ The Agents page ══════════════════════════════════════════════════════
   Five sections, light and dark in turn: the claim and the characters, what an
   agent is, calling one (the pinned scene), what keeps it in hand, where to start.
   The characters are the app's own (js/agent-characters.js). Their rules hold here
   as on the home page: never recoloured outside their eight colours, stretched or
   turned, nothing behind one but the ground it stands on, no shadow, and no gold
   beside them (amber already means something next to a character). */

/* ── 1. The top ── */
.ah{padding:clamp(140px,17vh,196px) 0 clamp(56px,6vw,88px);overflow:hidden}
.ah-h{font-size:clamp(38px,5.6vw,76px);line-height:1.02;letter-spacing:-.046em;max-width:1040px}
.ah-h span{display:block;margin-top:.1em}
.ah-btns{margin-top:clamp(28px,3vw,40px)}
.pill.ah-ink{background:var(--ltt);color:#fff}
.pill.ah-ink:hover{background:#2b2926;transform:translateY(-2px);box-shadow:0 10px 28px rgba(17,17,17,.18)}
.k-dark .pill.ah-ink{background:var(--w);color:#111}
.pill.ah-ink:focus-visible,.ah .pill-o:focus-visible,.ae .pill-o:focus-visible{outline:2px solid var(--ltt);outline-offset:3px}
/* the eight of them, each a little higher or lower than its neighbours (--j); js/agents.js is what they do */
.ag-row{--k:1;display:flex;justify-content:space-between;align-items:flex-start;margin-top:clamp(64px,7.4vw,112px)}
.ag-ch{flex:0 0 11.4%;aspect-ratio:1;transform:translateY(calc(var(--j,0) * var(--k) * 1px));-webkit-tap-highlight-color:transparent}
.ag-ch>*{display:block;width:100%;height:100%}
.ag-ctl{display:flex;justify-content:center;min-height:40px;margin-top:clamp(40px,4.4vw,64px)}
.ag-pause{display:inline-grid;place-items:center;width:40px;height:40px;padding:0;color:#747069;background:transparent;border:1px solid rgba(17,17,17,.14);border-radius:50%;cursor:pointer}
.ag-pause[hidden]{display:none}
.ag-pause:hover{color:var(--ltt);border-color:rgba(17,17,17,.3);background-color:rgba(17,17,17,.03);transition:color .2s ease,border-color .2s ease,background-color .2s ease}
.ag-pause:focus-visible{outline:2px solid var(--ltt);outline-offset:3px}
.ag-pause::before{content:'';width:10px;height:12px;border-left:3px solid currentColor;border-right:3px solid currentColor;box-sizing:border-box}
.ag-pause.is-paused::before{width:11px;height:12px;margin-left:2px;border:0;background:currentColor;clip-path:polygon(0 0,100% 50%,0 100%)}
@media(forced-colors:active){.ag-ch,.aw-face,.ae-face,.aw-forms button,.aw-colors button,.ph-ch{forced-color-adjust:none}.ag-pause.is-paused::before{background:ButtonText}}

/* ── 2. What an agent is ── */
.aw-g{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;align-items:start;margin-top:clamp(52px,5.6vw,84px)}
.aw-pick{grid-column:1 / span 5;margin:0}
.aw-face{width:clamp(176px,19vw,264px);aspect-ratio:1;margin-left:-6px}
.aw-face>*{display:block;width:100%;height:100%}
.aw-rows{display:grid;gap:18px;margin-top:clamp(28px,3vw,40px)}
/* eight to a row at every width: the columns narrow before anything wraps */
.aw-forms,.aw-colors{display:grid;grid-template-columns:repeat(8,minmax(0,50px));justify-items:center;align-items:center;margin-left:-2px}
.aw-forms button,.aw-colors button{flex:none;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;-webkit-tap-highlight-color:transparent}
.aw-forms button{width:100%;max-width:46px;aspect-ratio:1;padding:11%;border-radius:30%}
.aw-forms button>*{display:block;width:100%;height:100%}
.aw-forms button[aria-pressed="true"]{box-shadow:inset 0 0 0 1.5px rgba(238,236,234,.7)}
.aw-colors button{width:28px;height:28px;margin:9px 0;background:var(--sw,#888)}
.aw-colors button[aria-pressed="true"]{box-shadow:0 0 0 3px var(--bg),0 0 0 5px var(--w)}
.aw-forms button:focus-visible,.aw-colors button:focus-visible{outline:2px solid var(--w);outline-offset:4px}
.aw-pick .k-cap{max-width:25em}
.aw-list{grid-column:7 / span 6;list-style:none;display:grid}
.aw-list li{padding:clamp(26px,2.8vw,36px) 0;border-top:1px solid rgba(255,255,255,.1)}
.aw-list li:first-child{padding-top:0;border-top:0}
.aw-list .k-gi{color:var(--w)}
.aw-list h3{margin-top:18px;font-family:var(--fd);font-weight:500;font-size:clamp(21px,1.9vw,25px);line-height:1.2;letter-spacing:-.022em;color:var(--w)}
.aw-list p{margin-top:10px;font-size:17px;line-height:1.6;letter-spacing:-.006em;color:var(--w2);max-width:31em;text-wrap:pretty}

/* ── 4. What keeps it in hand ── */
.ak-g{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;align-items:start}
.ak-l{grid-column:1 / span 5}
.ak-more{margin-top:clamp(24px,2.6vw,34px);color:var(--w)}
.ak-rows{grid-column:7 / span 6;margin:0}
.ak-rows>div{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,9fr);column-gap:24px;padding:clamp(20px,2.2vw,28px) 0;border-top:1px solid rgba(255,255,255,.1)}
.ak-rows>div:last-child{border-bottom:1px solid rgba(255,255,255,.1)}
.ak-rows dt{font-family:var(--fd);font-weight:500;font-size:clamp(18px,1.6vw,21px);line-height:1.3;letter-spacing:-.02em;color:var(--w)}
.ak-rows dd{font-size:16.5px;line-height:1.6;color:var(--w2);text-wrap:pretty}

/* ── 5. Where to start ── */
.ae-top{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;align-items:center}
.ae-copy{grid-column:1 / span 8}
.ae-face{grid-column:10 / span 3;justify-self:end;width:clamp(150px,17vw,236px);aspect-ratio:1;-webkit-tap-highlight-color:transparent}
.ae-face>*{display:block;width:100%;height:100%}
.ae-btns{margin-top:clamp(28px,3vw,40px)}
.ae-links{list-style:none;display:flex;flex-wrap:wrap;gap:14px 36px;margin-top:clamp(40px,4.4vw,60px);padding-top:clamp(26px,2.8vw,34px);border-top:1px solid rgba(17,17,17,.1)}
.ae-links .k-link{color:var(--ltt)}

/* ── 3. Calling an agent ─────────────────────────────────────────────────
   The still version first (no script, or Reduce Motion): the headline, then the
   four sentences at the left and the phone at the right, on the call. */
.ac{padding:clamp(88px,11vw,140px) 0;overflow:clip}
.ac-pin{max-width:1248px;margin:0 auto;padding:0 24px;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;align-items:center}
.ac-ground{display:none}
.ac-h{grid-column:1 / -1;margin-bottom:clamp(48px,5.4vw,80px)}
.ac-h span{display:block}
.ac-caps{grid-column:1 / span 6;grid-row:2;list-style:none;display:grid;gap:clamp(28px,3vw,40px)}
.ac-caps .k-tt{font-size:clamp(21px,2.1vw,28px);line-height:1.18;letter-spacing:-.026em;max-width:20em}
.ac-note{margin-top:18px;max-width:34em;font-size:13.5px;line-height:1.55;color:#6b6760;text-wrap:pretty}
.ac-phone{grid-column:8 / span 5;grid-row:2;justify-self:center;width:calc(422px * var(--pk,.74));height:calc(894px * var(--pk,.74))}
.ac-phone .ph{transform:scale(var(--pk,.74));transform-origin:0 0}

/* The phone: a plain handset, 402 by 874 points of screen as an iPhone's, drawn at one point to a pixel and scaled as a
   whole. Nothing on it is a picture of a real device. */
.ph{position:relative;width:422px;height:894px;border-radius:66px;background:#17171a;
  box-shadow:inset 0 0 0 1.5px #46464c,inset 0 0 0 5px #0b0b0c,0 60px 110px -36px rgba(17,17,17,.42),0 22px 44px -22px rgba(17,17,17,.34)}
.ph-screen{position:absolute;inset:10px;border-radius:56px;overflow:hidden;background:#fafaf9;isolation:isolate}
.ph-screen::after{content:'';position:absolute;z-index:6;left:50%;top:11px;width:124px;height:36px;margin-left:-62px;border-radius:20px;background:#000}
/* the top of the screen (the time, the signal, the battery), which stays put while a screen slides under it */
.ph-bar{position:absolute;z-index:5;left:0;right:0;top:0;height:62px;background:#fafaf9 url(/images/agents/call/bar.png) center top / 100% 100% no-repeat;pointer-events:none}
/* the agent's conversation, under the call */
.ph-conv{position:absolute;inset:0;background:#fafaf9 url(/images/agents/call/conversation-on-call.webp) center top / 100% 100% no-repeat}
/* once the call is over: the same conversation with the Call button and the microphone back */
.ph-conv::after{content:'';position:absolute;inset:0;background:url(/images/agents/call/conversation-after.webp) center top / 100% 100% no-repeat;opacity:var(--after-o,0)}
/* the call while the member is back in the conversation: the green pill */
.ph-pill{position:absolute;z-index:4;left:50%;top:122px;display:flex;align-items:center;gap:8px;height:34px;padding:0 14.33px 0 14px;border-radius:17px;background:#21994d;color:#fff;
  font:600 14px/1 var(--f);white-space:nowrap;font-variant-numeric:tabular-nums;transform:translate(-50%,var(--pill-y,-130px));opacity:var(--pill-o,0)}
.ph-pill i{flex:none;width:15px;height:24px;background:url(/images/agents/call/pill-handset.png) center / 100% 100% no-repeat}
.ph-pill b{font-weight:600}
/* the call screen: the name and the time, the character, the controls, End (AgentCallView.swift, measure for measure) */
/* (the line heights are Onest's own 1.275 where the app asks for less: iOS does not set a line tighter than its font) */
.ph-call{position:absolute;z-index:3;inset:0;display:flex;flex-direction:column;align-items:center;padding:65px 0 34px;background:#fafaf9;transform:translateY(var(--sheet,0%))}
.ph-top{margin-top:auto;padding:0 24px;text-align:center;opacity:var(--ui,1)}
/* (the small offsets are what is left between a browser's line box and iOS's, measured against the app's own screens) */
.ph-name{position:relative;top:-1.5px;font:600 32px/1.275 var(--f);color:#1c1917}
.ph-time{position:relative;top:-2px;margin-top:6px;font:400 17px/1.3 var(--f);color:#57534e;font-variant-numeric:tabular-nums}
.ph-mid{position:relative;flex:none;margin-top:auto;width:210px;height:210px}
.ph-ch{position:absolute;left:0;top:0;width:210px;height:210px;transform-origin:0 0}
.ph-ch>*{display:block;width:100%;height:100%}
.ph-ctl{margin-top:auto;display:flex;gap:34px;padding-bottom:34px;opacity:var(--ui,1)}
.ph-btn{display:flex;flex-direction:column;align-items:center;gap:8px}
/* each control is the app's own picture of it (its symbol is Apple's, so it is never redrawn here) */
.ph-btn i{display:block;width:70px;height:70px;border-radius:50%;background:center / 100% 100% no-repeat;transform:scale(var(--press,1))}
.ph-btn[data-btn="mute"] i{background-image:url(/images/agents/call/mute.png)}
.ph-btn[data-btn="speaker"] i{background-image:url(/images/agents/call/speaker.png)}
.ph-btn[data-btn="message"] i{background-image:url(/images/agents/call/message.png)}
.ph-btn b{position:relative;top:.67px;font:500 13px/1.275 var(--f);color:#1c1917}
.ph-end{margin-bottom:44px;opacity:var(--ui,1)}
.ph-end i{display:block;width:78px;height:78px;border-radius:50%;background:url(/images/agents/call/end.png) center / 100% 100% no-repeat}

/* With motion: the stage pins for the length of the scene, and js/agents-page.js places everything on it from how far
   the page has scrolled. Nothing here moves on its own clock except the character, the call's time and what the
   character is doing. */
.ac.is-live{padding:0}
.ac.is-live .ac-pin{position:sticky;top:0;height:100vh;height:100svh;max-width:none;margin:0;padding:0;display:block;overflow:hidden}
.ac.is-live .ac-h{position:absolute;z-index:2;left:24px;right:24px;top:clamp(92px,13.5vh,150px);margin:0 auto;max-width:none;text-align:center;opacity:var(--ho,1);transform:translateY(var(--hy,0px));pointer-events:none}
.ac.is-live .ac-phone{position:absolute;z-index:1;left:0;top:0;width:422px;height:894px;transform-origin:0 0;will-change:transform}
.ac.is-live .ac-phone .ph{transform:none}
.ac.is-live .ph-ch{will-change:transform}
.ac.is-live .ac-caps{position:absolute;z-index:2;left:max(24px,calc(50% - 600px));top:0;bottom:0;width:min(440px,38vw);display:block;margin:0}
.ac.is-live .ac-caps li{position:absolute;left:0;right:0;top:50%;opacity:var(--o,0);transform:translateY(calc(-50% + var(--y,0px)))}
.ac.is-live .ac-caps .k-tt{font-size:clamp(27px,2.9vw,42px);line-height:1.08;letter-spacing:-.034em;max-width:none}
.ac.is-live .ac-caps .k-tt span{display:block;margin-top:.5em;font-family:var(--f);font-weight:400;font-size:clamp(16px,1.3vw,19px);line-height:1.55;letter-spacing:-.008em;color:#6b6760}

@media(max-width:1000px){
  .ae-top{display:block}
  .ae-face{display:none}
  .aw-g{display:block}
  .aw-list{margin-top:clamp(56px,8vw,72px)}
  .ak-g{display:block}
  .ak-rows{margin-top:clamp(40px,6vw,56px)}
  .ac-pin{display:block}
  .ac-caps{margin-top:clamp(40px,6vw,56px)}
  .ac-phone{margin:0 auto}
  .ac.is-live .ac-phone{margin:0}
}
@media(max-width:820px){
  /* the scene on a narrow screen: the phone above, the sentence under it */
  .ac.is-live .ac-caps{left:22px;right:22px;width:auto;top:auto;bottom:0;height:31%}
  .ac.is-live .ac-caps li{top:46%}
  .ac.is-live .ac-caps .k-tt{font-size:clamp(22px,6vw,28px)}
  .ac.is-live .ac-caps .k-tt span{font-size:15.5px;line-height:1.5;margin-top:.45em}
  .ac-note{margin-top:10px;font-size:12.5px;line-height:1.45}
  .ac.is-live .ac-h{top:clamp(84px,12vh,120px)}
}
@media(max-width:640px){
  .ah{padding-top:clamp(120px,16vh,150px)}
  .ag-row{--k:.5;flex-wrap:wrap;row-gap:30px;margin-top:52px}
  .ag-ch{flex-basis:21.5%}
  .aw-colors button{width:24px;height:24px}
  .aw-list p{font-size:16.5px}
  .ak-rows>div{grid-template-columns:minmax(0,1fr);row-gap:6px}
}
@media(prefers-reduced-motion:reduce){
  .ag-pause:hover{transition:none}
}
