/* ============================================================
   Home page only: hero, #agencies, #about
   ============================================================ */
/* ============================================================
   Tunables — photo framing (numbers are multiplied by u)
   ============================================================ */
:root{
  --photo-w:1230;        /* desktop image width            */
  --photo-ml:-615;       /* desktop margin-left (−w/2)     */
  --photo-top:195;       /* desktop top inside the panel   */
  --photo-w-m:660;       /* phone image width              */
  --photo-ml-m:-330;     /* phone margin-left              */
  --photo-bottom-m:-10;  /* phone: image bottom vs panel bottom (negative = runs past the edge) */
}

/* ============================================================
   HERO
   ============================================================ */
.hero{height:calc(956 * var(--u));padding-top:calc(16 * var(--u));touch-action:pan-y}

/* photo */
.photo-wrap{position:absolute;inset:0;z-index:2;pointer-events:none}
/* .figure holds the photo (img, for loading + alt) and the brush-reveal canvas (paints both layers) */
.figure{position:absolute;left:50%;transform-origin:50% 0;
  width:calc(var(--photo-w) * var(--u));height:calc(var(--photo-w) * var(--u) * 860 / 1106);
  margin-left:calc(var(--photo-ml) * var(--u));top:calc(var(--photo-top) * var(--u))}
.figure .photo,.figure canvas{position:absolute;inset:0;width:100%;height:100%;display:block;max-width:none;
  -webkit-user-drag:none;user-select:none}
.figure canvas{opacity:0}

/* headline + CTAs */
.head{position:absolute;left:0;right:0;top:calc(120 * var(--u));z-index:4;text-align:center}
.ctas{display:flex;justify-content:center;gap:calc(12 * var(--u));margin-top:calc(30 * var(--u))}
.ctas .pill{height:max(44px, calc(54 * var(--u)));padding:0 calc(30 * var(--u));font-size:max(14px, calc(16.5 * var(--u)))}

/* left block + right card share one top line so they read as a pair */
:root{--pair-top:calc(617 * var(--u))}

/* left block */
.left{position:absolute;z-index:5;left:calc(40 * var(--uw));top:var(--pair-top);width:calc(400 * var(--u))}
.tag{display:flex;width:fit-content;align-items:center;gap:calc(8 * var(--u));height:calc(31 * var(--u));padding:0 calc(18 * var(--u));border-radius:999px;
  background:var(--pill);color:#EAF2FC;font-size:calc(15 * var(--u));font-weight:470;letter-spacing:.01em;line-height:1;white-space:nowrap}
.tag::before{content:'';width:calc(8 * var(--u));height:calc(8 * var(--u));border-radius:50%;background:var(--accent);flex:none}
.left h2{margin:calc(18 * var(--u)) 0 0;font-size:calc(34 * var(--u));font-weight:680;letter-spacing:-.02em;line-height:1.1;color:var(--ink)}
.left p{margin:calc(12 * var(--u)) 0 0;font-size:calc(19 * var(--u));line-height:1.45;color:var(--muted);letter-spacing:-.01em;text-wrap:balance}

/* right card (16:9 thumbnail) */
.card{position:absolute;z-index:5;right:calc(42 * var(--uw));top:var(--pair-top);width:calc(320 * var(--u));height:calc(180 * var(--u));
  border-radius:calc(16 * var(--u));overflow:hidden;background:linear-gradient(180deg,#5E8FD0,#C9DDF3);
  display:block;transition:box-shadow .25s var(--ease)}
.card:hover{box-shadow:0 18px 40px rgba(12,30,56,.25)}
.card-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;display:block}
/* tilt (home.js): the card turns in 3D, the image drifts the other way, a glare follows the cursor */
.card{transform-style:preserve-3d;-webkit-tap-highlight-color:transparent;isolation:isolate}   /* isolation: Safari keeps the rounded clip while the image moves */
.card-glare{position:absolute;inset:0;opacity:0;pointer-events:none;
  background:radial-gradient(circle at 50% 50%, rgba(255,255,255,.22), transparent 55%)}

/* ---------- #agencies ---------- */
#agencies .s-panel{background:var(--panel)}
.ag-para{position:absolute;z-index:4;right:calc(40 * var(--u));top:calc(36 * var(--u));width:calc(330 * var(--u));margin:0;
  font-size:max(15px, calc(18 * var(--u)));line-height:1.45;color:var(--muted)}
.ag-word{position:absolute;z-index:2;left:calc(12 * var(--u));top:calc(330 * var(--u));margin:0;
  font-size:calc(250 * var(--u));font-weight:300;font-stretch:100%;line-height:1;white-space:nowrap;
  color:transparent;-webkit-text-stroke:calc(1.6 * var(--u)) var(--line);pointer-events:none;-webkit-user-select:none;user-select:none}
.ag-card{position:absolute;z-index:3;width:calc(470 * var(--u));height:calc(640 * var(--u));border-radius:calc(28 * var(--u));overflow:hidden}
.ag-tenh{left:calc(214 * var(--u));top:calc(130 * var(--u));background:linear-gradient(160deg,#0F2A4F 0%,#1D4C8A 100%)}
.ag-mimi{left:calc(724 * var(--u));top:calc(190 * var(--u));background:#DCE8F5}
.ag-inner{position:absolute;inset:0;border-radius:inherit;padding:calc(36 * var(--u));display:flex;flex-direction:column}
.ag-tenh .ag-inner{background:linear-gradient(160deg,#0F2A4F 0%,#1D4C8A 100%);color:var(--on-deep)}
.ag-mimi .ag-inner{background:#fff;border:1px solid var(--line);color:var(--ink)}
.ag-top{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:flex-start}
.ag-tag{display:inline-flex;align-items:center;height:calc(32 * var(--u));padding:0 calc(16 * var(--u));border-radius:999px;
  font-size:max(13px, calc(14.5 * var(--u)));font-weight:470;letter-spacing:.02em;line-height:1;white-space:nowrap}
.ag-tenh .ag-tag{background:rgba(255,255,255,.12);color:var(--on-deep)}
.ag-mimi .ag-tag{background:var(--pill);color:#EAF2FC}
.ag-index{font-size:calc(96 * var(--u));font-weight:360;line-height:.8;letter-spacing:-.01em}
.ag-index .ch{display:inline-block;opacity:.22}
.ag-bottom{position:relative;z-index:1;margin-top:auto}
.ag-name{margin:0;font-size:calc(76 * var(--u));line-height:.92;font-weight:760;letter-spacing:-.035em;text-transform:uppercase}
.ag-one{margin:calc(16 * var(--u)) 0 0;font-size:max(15px, calc(22 * var(--u)));font-weight:620;letter-spacing:-.01em;line-height:1.25}
.ag-desc{margin:calc(10 * var(--u)) 0 0;width:calc(390 * var(--u));max-width:100%;font-size:max(15px, calc(17.5 * var(--u)));line-height:1.5}
.ag-tenh .ag-desc{color:var(--on-deep-muted)}
.ag-mimi .ag-desc{color:var(--muted)}
.ag-pill{display:inline-flex;align-items:center;gap:calc(8 * var(--u));margin-top:calc(22 * var(--u));height:max(44px, calc(54 * var(--u)));
  padding:0 calc(28 * var(--u));border-radius:999px;font-size:max(14px, calc(16.5 * var(--u)));font-weight:470;line-height:1;white-space:nowrap;
  transition:background-color .25s var(--ease)}
.ag-pill svg{width:calc(14 * var(--u));height:calc(14 * var(--u));transition:transform .25s var(--ease)}
.ag-tenh .ag-pill{background:#fff;color:var(--ink)}
.ag-mimi .ag-pill{background:var(--pill);color:#fff}
.ag-tenh:hover .ag-pill,.ag-tenh .ag-pill:focus-visible{background:color-mix(in srgb,#fff 92%,#0C1E38)}
.ag-mimi:hover .ag-pill,.ag-mimi .ag-pill:focus-visible{background:color-mix(in srgb,#0F2A4F 92%,#fff)}
.ag-card:hover .ag-pill svg,.ag-pill:focus-visible svg{transform:translate(calc(2 * var(--u)),calc(-2 * var(--u)))}
.ag-rays{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.ag-rays line{stroke:#fff;stroke-opacity:.1;stroke-width:1.1px;vector-effect:non-scaling-stroke}

/* ---------- #about ---------- */
/* card and bottom block are in normal flow, so the panel grows instead of cutting anything off */
#about{height:auto;min-height:calc(956 * var(--u))}
#about .s-panel{background:var(--panel2);height:auto;min-height:calc(924 * var(--u));padding-bottom:calc(40 * var(--u))}
#about .s-frame{position:relative;top:auto;bottom:auto}
.ab-row{position:absolute;z-index:1;left:0;top:calc(120 * var(--u));margin:0;font-size:calc(140 * var(--u));line-height:1;
  font-weight:380;font-stretch:112%;color:var(--marquee);text-transform:uppercase;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none;will-change:transform}
.ab-row2{top:calc(540 * var(--u))}
.ab-row .ch{display:inline-block}
.ab-row .gap{display:inline-block;width:.45em}
.ab-card{position:relative;z-index:2;margin:calc(60 * var(--u)) auto 0;width:calc(460 * var(--u));height:calc(600 * var(--u));
  border-radius:calc(24 * var(--u));overflow:hidden;background:linear-gradient(180deg,#7FAEE6 0%,#C4DAF2 55%,#E3EEF9 100%)}
/* both layers sit identically, starting below the title so it never covers the face.
   --ab-img-top puts the hair top ~24u under the title (the brief's 150u left an ~89u gap) */
#about{--ab-img-top:75}
.ab-img{position:absolute;top:calc(var(--ab-img-top) * var(--u));left:0;right:0;bottom:0;width:100%;height:calc(100% - var(--ab-img-top) * var(--u));
  object-fit:cover;object-position:50% 0%;display:block}
.ab-img-robot{opacity:0}
.ab-arch{position:absolute;z-index:3;left:calc(16 * var(--u));right:calc(16 * var(--u));top:calc(16 * var(--u));height:calc(330 * var(--u));
  border-radius:calc(215 * var(--u)) calc(215 * var(--u)) 0 0;background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.1) 60%,transparent);pointer-events:none}
.ab-head{position:absolute;z-index:4;left:0;right:0;top:calc(52 * var(--u));text-align:center}
.ab-tag{display:inline-flex;align-items:center;height:calc(28 * var(--u));padding:0 calc(16 * var(--u));border-radius:999px;background:var(--pill);
  color:#EAF2FC;font-size:max(13px, calc(14 * var(--u)));font-weight:470;letter-spacing:.01em;line-height:1}
.ab-title{white-space:nowrap;margin:calc(14 * var(--u)) 0 0;font-size:calc(44 * var(--u));line-height:.93;font-weight:720;letter-spacing:-.035em;text-transform:uppercase;color:var(--ink)}
/* bottom block: left paragraph | chips + note | right paragraph, 36u under the card */
.ab-bottom{position:relative;z-index:4;display:grid;grid-template-columns:1fr calc(520 * var(--u)) 1fr;column-gap:calc(56 * var(--u));
  align-items:start;margin:calc(36 * var(--u)) calc(40 * var(--u)) 0}
.ab-p{max-width:calc(380 * var(--u));margin:0;font-size:max(15px, calc(19 * var(--u)));line-height:1.5;color:var(--muted);text-align:left}
.ab-p-l{justify-self:start}
.ab-p-r{justify-self:end}
.ab-mid{min-width:0;display:flex;flex-direction:column;align-items:center}
.ab-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:calc(10 * var(--u));max-width:100%;margin:0;padding:0;list-style:none}
/* min-height (not height) so a chip that still cannot fit after shrinking wraps inside its pill instead of overlapping */
.ab-chip{display:inline-flex;align-items:center;justify-content:center;max-width:100%;text-align:center;min-height:calc(40 * var(--u));padding:0 calc(18 * var(--u));border-radius:999px;background:#fff;
  border:1px solid var(--line);color:var(--ink);font-size:max(13px, calc(15.5 * var(--u)));font-weight:470;line-height:1.15;white-space:nowrap}
.ab-chip.is-tight{font-size:max(13px, calc(14.5 * var(--u)))}
.ab-chip.is-wrap{white-space:normal}
.ab-note{display:inline-flex;align-items:center;gap:calc(8 * var(--u));margin:calc(16 * var(--u)) 0 0;font-size:max(13px, calc(14.5 * var(--u)));color:var(--muted);line-height:1.3}
.ab-note::before{content:'';width:calc(7 * var(--u));height:calc(7 * var(--u));border-radius:50%;background:var(--accent);flex:none}
.ab-note a{color:inherit;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:color .2s,text-decoration-color .2s}
.ab-note a:hover{color:var(--ink);text-decoration-color:currentColor}

/* intro states (home only) */
.js .figure{visibility:hidden}
html.intro-skip .figure,html.intro-done .figure{visibility:visible}
.js .ag-inner{visibility:hidden}
html.sec-skip .ag-inner{visibility:visible}

@media (max-width:820px){
  .hero{height:max(calc(820 * var(--u)),100svh);padding-top:calc(8 * var(--u))}

  .head{top:calc(70 * var(--u))}
  .ctas{margin-top:calc(22 * var(--u))}
  .ctas .pill{height:calc(38 * var(--u));font-size:calc(11.5 * var(--u));padding:0 calc(16 * var(--u))}

  .figure{width:calc(var(--photo-w-m) * var(--u));height:calc(var(--photo-w-m) * var(--u) * 860 / 1106);
    margin-left:calc(var(--photo-ml-m) * var(--u));top:auto;bottom:calc(var(--photo-bottom-m) * var(--u))}

  .left{left:calc(14 * var(--u));top:auto;bottom:calc(150 * var(--u));width:calc(170 * var(--u));
    /* sits on the shirt on phones: frosted backing keeps the title readable */
    width:auto;max-width:calc(170 * var(--u));padding:calc(9 * var(--u)) calc(12 * var(--u)) calc(10 * var(--u)) calc(9 * var(--u));
    border-radius:calc(14 * var(--u));background:rgba(241,247,253,.78);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
  .tag{height:calc(20 * var(--u));font-size:calc(10 * var(--u));padding:0 calc(11 * var(--u));gap:calc(6 * var(--u))}
  .tag::before{width:calc(5 * var(--u));height:calc(5 * var(--u))}
  .left h2{font-size:calc(15 * var(--u));margin-top:calc(10 * var(--u))}
  .left p{display:none}

  .card{right:calc(12 * var(--u));top:auto;bottom:calc(16 * var(--u));width:calc(144 * var(--u));height:calc(81 * var(--u));border-radius:calc(12 * var(--u))}

  /* agencies */
  .ag-para{position:relative;right:auto;top:auto;width:auto;margin-top:calc(12 * var(--u));font-size:max(15px, calc(15 * var(--u)))}
  .ag-word{display:none}
  .ag-card{position:relative;left:auto;top:auto;width:100%;height:calc(470 * var(--u));margin-top:calc(16 * var(--u));border-radius:calc(22 * var(--u))}
  .ag-tenh{margin-top:calc(20 * var(--u))}
  .ag-inner{padding:calc(24 * var(--u))}
  .ag-tag{height:calc(28 * var(--u));font-size:max(13px, calc(12.7 * var(--u)));padding:0 calc(14 * var(--u))}
  .ag-index{font-size:calc(64 * var(--u))}
  .ag-name{font-size:calc(52 * var(--u))}
  .ag-one{margin-top:calc(12 * var(--u));font-size:max(15px, calc(17.5 * var(--u)))}
  .ag-desc{width:auto;font-size:max(15px, calc(15.5 * var(--u)))}
  .ag-pill{height:max(44px, calc(48 * var(--u)));margin-top:calc(18 * var(--u));padding:0 calc(24 * var(--u));font-size:max(14px, calc(15 * var(--u)))}
  .ag-pill svg{width:calc(13 * var(--u));height:calc(13 * var(--u))}

  /* about */
  .ab-row{font-size:calc(72 * var(--u));top:calc(20 * var(--u))}
  .ab-row2{top:calc(470 * var(--u))}
  .ab-card{position:relative;left:auto;top:auto;margin:calc(70 * var(--u)) auto 0;width:calc(300 * var(--u));height:calc(430 * var(--u));border-radius:calc(18 * var(--u))}
  .ab-arch{left:calc(10 * var(--u));right:calc(10 * var(--u));top:calc(10 * var(--u));height:calc(215 * var(--u));border-radius:calc(140 * var(--u)) calc(140 * var(--u)) 0 0}
  .ab-head{top:calc(32 * var(--u))}
  .ab-tag{height:calc(24 * var(--u));font-size:max(13px, calc(12 * var(--u)));padding:0 calc(13 * var(--u))}
  #about{--ab-img-top:56}   /* hair ~18u under the one-line title on the 430u card */
  .ab-title{margin-top:calc(10 * var(--u));font-size:calc(28 * var(--u))}
  #about,#about .s-panel{min-height:0}
  #about .s-panel{padding-bottom:calc(24 * var(--u))}
  #about .s-frame{left:auto;width:auto;margin:0}
  /* one column: left paragraph, chips + note, right paragraph; 46u top clears marquee row 2 (470u to 542u) */
  .ab-bottom{display:flex;flex-direction:column;gap:calc(16 * var(--u));margin:calc(46 * var(--u)) 0 0}
  .ab-p{max-width:none;font-size:max(15px, calc(16 * var(--u)))}
  .ab-chips{gap:calc(7 * var(--u))}
  .ab-chip{height:calc(34 * var(--u));font-size:max(13px, calc(13.8 * var(--u)));padding:0 calc(14 * var(--u))}
  .ab-note{font-size:max(13px, calc(13.2 * var(--u)));margin-top:calc(14 * var(--u))}
  .ab-note::before{width:calc(6 * var(--u));height:calc(6 * var(--u))}
}
