/* The agency page, in the manner of rejouice.com but in our own night, warm white and mint: the page runs edge to edge,
   big type sits over a film that widens to the full screen, the work is shown as films, a row of facts slides across
   as you scroll, the two ways to work swap one huge word, and MonPro is shown as each person who signs in sees it. */
.ag-site { --ag-g: clamp(16px, 2.1vw, 40px); --ag-ease: cubic-bezier(.22, .61, .36, 1); }
/* the header keeps the homepage's own edge (header.css), so it doesn't step sideways between pages */
.ag-site main .wrap, .ag-site footer .wrap { max-width: none; padding-inline: var(--ag-g); }
.ag-site .c-sheet { margin-inline: 0; border-radius: 0; }
.ag-site .c-sheet + .c-sheet { margin-top: 0; border-top: 1px solid var(--sheet-line); }
.ag-for { margin: 0; font: 500 14px/1.3 var(--text-font); color: var(--mint); }

/* ---------- first screen: the line set huge, a quiet row under it, and the film rising from below ---------- */
.ag-hero { padding: clamp(118px, 10vw, 168px) 0 clamp(36px, 3vw, 56px); }
.ag-hero::before { opacity: .4; }
.ag-title.c-title { max-width: none; margin: 0 0 clamp(36px, 3.6vw, 64px) -.04em; font-size: clamp(52px, 8.6vw, 176px); line-height: .9; letter-spacing: -.055em; text-wrap: balance; }
.ag-hero-meta { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: 20px 32px; align-items: start; padding-top: 22px; border-top: 1px solid var(--line-2); }
.ag-hero-sub { margin: 0; max-width: 40ch; font: 400 clamp(17px, 1.25vw, 21px)/1.45 var(--text-font); color: var(--soft); }
.ag-hero .c-actions { justify-content: flex-end; }

/* The reel: inset like a card at first, then opening out to the whole screen as you scroll (agency.js sets --ag-p) */
.ag-reel { padding-bottom: clamp(20px, 2vw, 32px); }
.ag-reel-frame { --ag-p: 0; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 100svh; min-height: 560px; overflow: hidden; background: #000000;
  clip-path: inset(0 calc((1 - var(--ag-p)) * var(--ag-g)) round calc((1 - var(--ag-p)) * 14px)); }
.ag-reel-side { position: relative; margin: 0; overflow: hidden; }
.ag-reel-side video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.08 - var(--ag-p) * .08)); }
.ag-reel-side + .ag-reel-side { border-left: 1px solid rgba(0, 0, 0, .7); }
.ag-reel-side figcaption { position: absolute; z-index: 2; left: calc(var(--ag-g) + 8px); top: 26px; padding: 8px 12px; border-radius: 3px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 500 13.5px/1 var(--text-font); color: #EFECE5; }
.ag-reel-frame .c-toggle { right: calc(var(--ag-g) + 8px); bottom: 22px; }
.ag-credit { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 32px; margin: 16px 0 0; font: 400 13.5px/1.4 var(--text-font); color: var(--soft); }

/* ---------- the statement: one large paragraph that lights up word by word as you read down ---------- */
.ag-intro { padding: clamp(110px, 10vw, 190px) 0 clamp(90px, 8vw, 150px); color: var(--text); }
.ag-statement { max-width: 25ch; margin: 0 0 clamp(80px, 8vw, 150px); font: 400 clamp(32px, 3.9vw, 76px)/1.1 var(--font); letter-spacing: -.035em; text-wrap: pretty; }
.ag-statement .ag-word { opacity: .2; transition: opacity .5s var(--ag-ease); }
.ag-statement .ag-word.is-lit { opacity: 1; }
.ag-statement a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) left 92% / 100% 2px no-repeat; transition: color .3s; }
.ag-statement a:hover { color: var(--mint); }
.ag-intro-foot { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 20px 32px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.ag-intro-foot p { margin: 0 0 .8em; max-width: 38ch; font: 400 16px/1.55 var(--text-font); color: var(--soft); }
.ag-intro-foot > p { color: var(--text); }
.ag-line-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 6px; padding-bottom: 3px; font: 600 15px/1.2 var(--font); color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; transition: background-size .45s var(--ag-ease); }
.ag-line-link:hover { background-size: 30% 1px; }

/* ---------- what we build: the work as films, each in its own world ---------- */
.ag-work { padding: 0 0 clamp(100px, 9vw, 170px); color: var(--text); }
.ag-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); font: 500 15px/1.3 var(--text-font); }
.ag-bar p, .ag-bar h2 { margin: 0; font: inherit; letter-spacing: 0; }
.ag-bar a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; padding-bottom: 2px; transition: background-size .45s var(--ag-ease); }
.ag-bar a:hover { background-size: 100% 1px; }
.ag-work-title.c-h2 { margin: clamp(48px, 5vw, 96px) 0 clamp(40px, 4vw, 72px); font-size: clamp(48px, 7.4vw, 150px); line-height: .9; letter-spacing: -.055em; color: var(--text); }
.ag-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 4vw, 72px) clamp(10px, 1vw, 20px); margin: 0; padding: 0; list-style: none; }
.ag-tile--full { grid-column: 1 / -1; }
.ag-media { position: relative; overflow: hidden; isolation: isolate; border-radius: 6px; background: #000; aspect-ratio: 16 / 8.2; }
.ag-tile--half .ag-media { aspect-ratio: 1 / 1; }
.ag-media video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.6s var(--ag-ease); }
.ag-tile:hover .ag-media > video, .ag-tile:hover .ag-screen { transform: scale(1.035); }
.ag-hit { position: absolute; inset: 0; z-index: 3; }
.ag-media .c-toggle { z-index: 4; }
.ag-media--screen { background: radial-gradient(120% 120% at 20% 0%, #33475A 0%, #18222B 55%, #0B1014 100%); }
.ag-screen { position: absolute; left: 12%; top: 13%; width: 118%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #F4F2EC; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 60px 110px -40px rgba(0, 0, 0, .85); transform-origin: 0 0; transition: transform 1.6s var(--ag-ease); }
.ag-screen video { object-position: 0 0; transform: none !important; }
.ag-cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding-top: 18px; }
.ag-cap h3 { margin: 0; font: 500 clamp(22px, 1.7vw, 30px)/1.1 var(--font); letter-spacing: -.035em; color: var(--text); }
.ag-cap p { grid-column: 1; margin: 0; max-width: 46ch; font: 400 15.5px/1.5 var(--text-font); color: var(--soft); }
.ag-who { grid-column: 2; grid-row: 1; align-self: baseline; font: 500 14px/1.3 var(--text-font); color: var(--mint); white-space: nowrap; }

/* ---------- at a glance: a row of cards that slides sideways as you scroll down ---------- */
.ag-glance { padding: clamp(88px, 8vw, 140px) 0 clamp(96px, 9vw, 160px); overflow: hidden; }
.ag-bar--ink { border-top-color: var(--sheet-line); font-size: clamp(17px, 1.3vw, 22px); }
.ag-bar--ink a { color: var(--sheet-ink); }
.ag-rail-view { margin-top: clamp(28px, 2.6vw, 44px); }
.ag-rail { --ag-x: 0px; display: flex; align-items: flex-start; gap: clamp(14px, 1.6vw, 30px); width: max-content; margin: 0; padding: 0 var(--ag-g); list-style: none; transform: translate3d(var(--ag-x), 0, 0); will-change: transform; }
.ag-card { position: relative; flex: none; display: flex; flex-direction: column; justify-content: space-between; width: clamp(272px, 23vw, 440px); height: clamp(300px, 17vw, 330px); padding: clamp(22px, 2.2vw, 40px); overflow: hidden; border-radius: 6px; background: #E4E0D7; color: var(--sheet-ink); }
.ag-card--tall { height: clamp(380px, 26vw, 500px); }
.ag-card > p { position: relative; z-index: 2; margin: 0; font: 400 clamp(20px, 1.35vw, 24px)/1.2 var(--font); letter-spacing: -.02em; }
.ag-card > p b { display: block; font-weight: 500; }
.ag-card > p span { display: block; opacity: .55; }
.ag-card--night { background: #000; color: #EFECE5; }
.ag-card--paper { background: #F7F5F0; box-shadow: inset 0 0 0 1px var(--sheet-line); }
.ag-card--paper > p span { opacity: .62; }
.ag-card--pic { color: #EFECE5; background: #000; }
.ag-card--pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ag-card--pic::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .62), transparent 46%); }
.ag-card--film { color: #EFECE5; background: radial-gradient(90% 80% at 70% 100%, rgba(239, 236, 229, .08), transparent 70%), #000; }
.ag-card--film img { position: absolute; left: 22%; top: 46%; width: 118%; height: auto; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(0, 0, 0, .8); }
.ag-card-mark { align-self: flex-end; width: 48px; height: 48px; fill: #8CCFC6; }
.ag-card .ag-line-link { align-self: flex-start; color: #EFECE5; }
.ag-scope { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--sheet-line); }
.ag-scope > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--sheet-line); font: 400 14px/1.3 var(--text-font); }
.ag-scope dt { color: var(--sheet-soft); }
.ag-scope dd { margin: 0; font-weight: 500; }
.ag-card--tests { background: #0B2F2B; color: #EFECE5; }
.ag-tests { margin: 0; padding: 0; list-style: none; font: 400 14px/1.35 var(--text-font); }
.ag-tests li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid rgba(239, 236, 229, .12); color: rgba(239, 236, 229, .5); transition: color .4s var(--ag-ease); }
.ag-tests li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(239, 236, 229, .3); transform: translateY(2px); transition: background .4s var(--ag-ease), box-shadow .4s var(--ag-ease); }
.ag-tests li.is-pass { color: #EFECE5; }
.ag-tests li.is-pass::before { background: #8CCFC6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%230B2F2B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: none; }
.ag-card > p.ag-tests-score { margin: 0; font: 500 14px/1 var(--text-font); letter-spacing: 0; color: rgba(239, 236, 229, .6); }
.ag-card > p.ag-tests-score b { display: inline; margin-right: 6px; font: 500 28px/1 var(--font); letter-spacing: -.03em; color: #8CCFC6; }

/* ---------- two ways to work: the tabs, then one huge word that swaps ---------- */
.ag-terms { padding: clamp(88px, 8vw, 140px) 0 clamp(96px, 9vw, 160px); overflow: hidden; }
.ag-terms-bar { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px 32px; align-items: start; padding-top: 18px; border-top: 1px solid var(--sheet-line); }
.ag-terms-bar h2 { margin: 0; font: 500 clamp(17px, 1.3vw, 22px)/1.3 var(--text-font); letter-spacing: 0; }
.ag-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.ag-tabs button { display: grid; gap: 4px; padding: 14px 18px 16px; border: 0; border-radius: 4px; background: transparent; color: var(--sheet-soft); text-align: left; cursor: pointer; transition: background .4s var(--ag-ease), color .4s var(--ag-ease); }
.ag-tabs button b { font: 500 17px/1.2 var(--font); letter-spacing: -.02em; }
.ag-tabs button span { font: 400 14px/1.3 var(--text-font); }
.ag-tabs button[aria-pressed="true"] { background: #E4E0D7; color: var(--sheet-ink); }
.ag-tabs button:not([aria-pressed="true"]):hover { color: var(--sheet-ink); }
.ag-huge { margin: clamp(36px, 4vw, 72px) 0 0; padding-inline: var(--ag-g); overflow: hidden; font: 500 clamp(76px, 15.6vw, 320px)/.86 var(--font); letter-spacing: -.065em; white-space: nowrap; color: var(--sheet-ink); }
.ag-huge .c-swap { display: inline-block; padding: .04em 0 .12em; transition: opacity .5s var(--ag-ease), transform .9s cubic-bezier(.16, 1, .3, 1); }
.ag-huge .c-swap.is-entering { opacity: 0; transform: translateY(.5em); }
.ag-terms-line { max-width: 30ch; margin: clamp(36px, 3.6vw, 64px) 0 clamp(56px, 5vw, 96px) auto; font: 400 clamp(22px, 1.9vw, 34px)/1.25 var(--font); letter-spacing: -.025em; text-align: left; }
.ag-terms-line .c-swap { display: inline; }
.ag-list dt { font: 500 14px/1.3 var(--text-font); }
.ag-list > div { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }

/* ---------- a build you can open: MonPro straight on, one screen at a time, as each person who signs in sees it ---------- */
.ag-open { position: relative; overflow: hidden; isolation: isolate; padding: clamp(100px, 9vw, 170px) 0 clamp(90px, 8vw, 150px); color: #EFECE5; background: radial-gradient(110% 80% at 85% 100%, #24504A 0%, #12302C 48%, #0A1C19 100%); }
.ag-open .ag-bar { border-top-color: rgba(239, 236, 229, .18); }
.ag-open-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 32px; align-items: end; margin: clamp(48px, 5vw, 96px) 0 clamp(56px, 5vw, 96px); }
.ag-open-head .c-h2 { max-width: 12ch; margin: 0 0 0 -.04em; font-size: clamp(48px, 7.4vw, 150px); line-height: .9; letter-spacing: -.055em; text-wrap: balance; color: #EFECE5; }
.ag-open-side p { max-width: 34ch; margin: 0 0 28px; font: 400 clamp(17px, 1.25vw, 21px)/1.45 var(--text-font); color: rgba(239, 236, 229, .72); }

/* who is signed in: three quiet tabs. The open one's hairline counts down while its screen is up, then draws away to the
   right as the next one starts; a pick eases it full. agency.js moves the line (one transform, on the graphics card). */
.ag-logins { --ag-r: 1; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px 32px; align-items: start; }
.ag-who-tabs { display: grid; gap: clamp(22px, 2vw, 36px); align-content: start; }
.ag-who-tabs button { position: relative; display: grid; gap: 4px; padding: 18px 0 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; opacity: .45; transition: opacity .9s var(--ag-ease); }
.ag-who-tabs button:hover, .ag-who-tabs button[aria-selected="true"] { opacity: 1; }
.ag-who-tabs button:focus-visible { outline: 2px solid var(--mint); outline-offset: 6px; border-radius: 2px; }
.ag-who-tabs b { font: 500 clamp(17px, 1.3vw, 22px)/1.2 var(--font); letter-spacing: -.01em; }
.ag-who-tabs span { font: 400 14.5px/1.4 var(--text-font); color: rgba(239, 236, 229, .7); }
.ag-who-tabs i { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(239, 236, 229, .2); overflow: hidden; }
.ag-who-tabs i span { display: block; position: absolute; inset: 0; background: #EFECE5; transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }

/* the browser window: straight on and big enough to read, rising into place as it comes up the screen */
.ag-window { overflow: hidden; border-radius: clamp(8px, .8vw, 14px); background: #F4F2EC; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 80px 140px -60px rgba(0, 0, 0, .9);
  transform: translate3d(0, calc((1 - var(--ag-r)) * 90px), 0) scale(calc(.94 + var(--ag-r) * .06)); transform-origin: 50% 0; }
.ag-window-bar { position: relative; display: flex; align-items: center; height: clamp(34px, 2.6vw, 46px); padding: 0 16px; background: #E9E6DF; border-bottom: 1px solid rgba(0, 0, 0, .07); }
.ag-dots { display: flex; gap: 7px; }
.ag-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(0, 0, 0, .14); }
.ag-url { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 5px 22px; border-radius: 6px; background: rgba(255, 255, 255, .7); font: 500 12.5px/1.2 var(--text-font); color: rgba(0, 0, 0, .55); white-space: nowrap; }
.ag-panes { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.ag-pane { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ag-ease), visibility 0s linear .9s; }
.ag-pane.is-on { z-index: 1; opacity: 1; visibility: visible; transition: opacity .9s var(--ag-ease), visibility 0s; }
.ag-pane[hidden] { display: block; }
.ag-pane picture { display: contents; }
.ag-pane img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(1.025); transition: transform 2.4s cubic-bezier(.16, 1, .3, 1); }
.ag-pane.is-on img { transform: scale(1); }

/* ---------- phones and small screens ---------- */
@media (max-width: 1024px) {
  .ag-hero-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ag-for { grid-column: 1 / -1; }
  .ag-open-head { grid-template-columns: minmax(0, 1fr); }
  .ag-logins { grid-template-columns: minmax(0, 1fr); }
  .ag-who-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); margin-bottom: 4px; }
}
@media (max-width: 760px) {
  .ag-hero { padding-top: 104px; }
  .ag-title.c-title { font-size: clamp(46px, 13.4vw, 64px); line-height: .92; }
  .ag-hero-meta { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ag-hero .c-actions { justify-content: flex-start; }
  .ag-reel-frame { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; clip-path: none; margin-inline: var(--ag-g); border-radius: 8px; }
  .ag-reel-side video { aspect-ratio: 4 / 5; height: auto; transform: none; }
  .ag-reel-side + .ag-reel-side { border-left: 0; border-top: 1px solid rgba(0, 0, 0, .7); }
  .ag-reel-side figcaption { left: 14px; top: 14px; }
  .ag-reel-frame .c-toggle { right: 14px; bottom: 14px; }
  .ag-statement { font-size: clamp(28px, 8.2vw, 36px); }
  .ag-intro-foot { grid-template-columns: minmax(0, 1fr); }
  .ag-tiles { grid-template-columns: minmax(0, 1fr); }
  .ag-tile--half .ag-media { aspect-ratio: 4 / 4.4; }
  .ag-tile--full .ag-media { aspect-ratio: 16 / 9; }
  .ag-cap { grid-template-columns: minmax(0, 1fr); }
  .ag-who { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .ag-rail-view { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ag-rail-view::-webkit-scrollbar { display: none; }
  .ag-rail { transform: none; }
  .ag-card { width: 78vw; scroll-snap-align: start; scroll-margin-inline: var(--ag-g); }
  .ag-card--tall { height: 440px; }
  .ag-terms-bar { grid-template-columns: minmax(0, 1fr); }
  .ag-huge { font-size: 20vw; }
  .ag-terms-line { margin-left: 0; }
  .ag-list > div { grid-template-columns: minmax(0, 1fr); }
  .ag-who-tabs span { display: none; }
  .ag-who-tabs button { padding-top: 14px; }
  .ag-window { transform: none; border-radius: 12px; }
  .ag-window-bar { justify-content: center; height: 40px; }
  .ag-dots { display: none; }
  .ag-url { position: static; transform: none; padding: 5px 16px; }
  .ag-panes { aspect-ratio: 390 / 600; }
}

/* Laptops: the reel labels sit over playing films, and a live blur behind them is redrawn every frame of the film and
   of the scroll. A plain fill a shade darker reads the same and costs nothing. */
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .ag-reel-side figcaption { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(0, 0, 0, .66); }
}

/* The glance row's slide is set every frame while it glides; registered as not passed down, so only the row itself is
   restyled, not every card in it. */
@property --ag-x { syntax: '<length>'; inherits: false; initial-value: 0px; }
