/* =========================================================================
   T2 Studio — mobile round 2 (draft 2.1.30)
   Loaded after mobile.css with the same media attribute (820px and below), so desktop pays nothing.
   Phone rules sit inside @media (max-width:700px). Companion changes live in assets/js/mobile.js.
   To remove round 2: delete this file and its enqueue line in functions.php (the JS parts degrade to round 1 only if reverted too).
   ========================================================================= */

/* ---- N1: header = logo + hamburger. 48x48 target, label stays for screen readers, icon turns into an X ---- */
.site-header .wrap{height:64px;min-height:64px}
.nav-toggle{position:relative;display:block;width:48px;height:48px;min-width:48px;min-height:48px;padding:0;margin-right:-12px}
.nav-toggle-lbl{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.nav-toggle-bars{display:none}
.nav-toggle::before,.nav-toggle::after{content:"";position:absolute;left:13px;width:22px;height:1.5px;background:currentColor;transition:transform .25s var(--ease),top .25s var(--ease)}
.nav-toggle::before{top:19px}
.nav-toggle::after{top:28px}
.nav-toggle[aria-expanded="true"]::before{top:23px;transform:rotate(45deg)}
.nav-toggle[aria-expanded="true"]::after{top:23px;transform:rotate(-45deg)}

/* ---- Helpers ---- */
.hide-sm{display:inline}

/* ---- Rails: circle dots (replace the boxed arrows) ---- */
.rail-ctl{justify-content:center;gap:0;margin-top:10px}
.rail-count{margin:0;text-align:center}
.rail-dot{width:28px;height:44px;padding:0;border:0;background:none;color:inherit;display:grid;place-items:center;cursor:pointer}
.rail-dot::before{content:"";width:8px;height:8px;box-sizing:border-box;border-radius:50%;border:1.5px solid currentColor;opacity:.55;transition:background-color .2s,opacity .2s}
.rail-dot[aria-current="true"]::before{background:currentColor;opacity:1}
.rail-dot:focus-visible{outline:2px solid currentColor;outline-offset:-6px;border-radius:50%}
.rail--steps > ol,.rail--timeline > ol{list-style:none;margin:0;padding:0}

@media (max-width:700px){

  /* ---- T1: phone heading scale. Same face and weight, a little smaller and tighter ---- */
  body .page-hero h1,body .intro h1,body .panel h1{font-size:30px;line-height:1.22;letter-spacing:1.2px}
  body main h2:not(.sr-only),body .translator .lead h2{font-size:26px;line-height:1.3;letter-spacing:1px}
  .lede,.sub,.how-lead,.head p,.brought .intro,.position h2 + p{font-size:16px;line-height:1.55}
  body main p{line-height:1.55}

  /* ---- T2: section rhythm, second pass ---- */
  main > section.sec{padding-top:44px;padding-bottom:44px}
  main > section.brought,main > section.ways,main > section.principles,main > section.brands,main > section.caps{padding-top:44px;padding-bottom:44px}
  main > section.cases{padding-top:44px;padding-bottom:40px}
  main > section.logos .inner{padding-top:40px;padding-bottom:16px}
  .head{margin-bottom:24px}
  .head h2 + p{margin-top:14px}
  .how-lead,.caps-head,.dir-top{margin-bottom:28px}

  /* ---- S1: one secondary-link style (underlined label + light arrow) ---- */
  .link-arrow{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:10px;min-height:44px;font-family:var(--t2-sans);font-size:15.5px;font-weight:500;line-height:1.3;letter-spacing:.01em;text-transform:none}
  .link-arrow .lbl{white-space:nowrap;padding-bottom:4px;background-size:100% 1px;background-position:0 100%}
  .link-arrow svg{width:22px;height:8px;flex:none}
  .link-arrow svg path{stroke-width:1.25px}
  .btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;text-align:center;justify-self:start}

  /* ---- Primary button + secondary link pairs (hero, closing bands) ---- */
  .hero .actions,.close .actions,.cta-band .actions,.page-hero .actions{display:flex;flex-direction:column;align-items:flex-start;gap:20px}
  .hero .actions .btn:first-child,.close .actions .btn:first-child,.cta-band .actions .btn:first-child{min-width:200px;background:var(--t2-white);border-color:var(--t2-white);color:var(--t2-black)}
  .hero .actions .btn:nth-child(2),.close .actions .btn:nth-child(2),.cta-band .actions .btn:nth-child(2){min-height:44px;padding:0;border:0;background:none;color:var(--t2-white);font-weight:500;justify-content:flex-start;gap:10px;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:6px}
  .hero .actions .btn:nth-child(2)::after,.close .actions .btn:nth-child(2)::after,.cta-band .actions .btn:nth-child(2)::after{content:"";width:22px;height:8px;flex:none;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 10'%3E%3Cpath d='M0 5h32M28 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 10'%3E%3Cpath d='M0 5h32M28 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/100% 100% no-repeat}
  .hero .actions .btn:nth-child(2):active,.close .actions .btn:nth-child(2):active,.cta-band .actions .btn:nth-child(2):active{background:none;color:var(--t2-white);opacity:.7}
  .hero .actions .btn:first-child:active,.close .actions .btn:first-child:active,.cta-band .actions .btn:first-child:active{background:#ebe5db;color:var(--t2-black)}

  /* ---- H1: home hero fits above the fold ---- */
  .hero{min-height:min(88svh,640px)}
  .hero .wrap{padding-top:96px;padding-bottom:40px}
  .hero .eyebrow{display:none}
  .hide-sm{display:none}
  body .hero h1{margin-top:0;font-size:28px;line-height:1.2;letter-spacing:1.1px}
  .hero .sub{margin-top:18px}
  .hero .actions{margin-top:28px}

  /* ---- Direct / Agency / Work page heroes ---- */
  .page-hero{min-height:0;padding-top:0;padding-bottom:0}
  .page-hero .wrap{padding-top:108px;padding-bottom:48px}
  .page-hero .sub{margin-top:16px}
  .page-hero .actions{margin-top:28px;gap:24px}
  .page-hero .actions .btn{min-width:220px}

  /* ---- H2: proof strip becomes a 2x2 stat grid (markup built by mobile.js) ---- */
  .proof.is-stats{display:grid;grid-template-columns:1fr 1fr;margin:0 0 32px;padding:0;text-align:left;list-style:none}
  .proof.is-stats li{display:block;padding:16px 0;border-top:1px solid rgba(255,255,255,.22);text-align:left;letter-spacing:normal}
  .proof.is-stats li:nth-child(even){padding-left:16px;border-left:1px solid rgba(255,255,255,.22)}
  .stat-n{display:block;font:400 28px/1.1 var(--t2-serif);letter-spacing:.5px;color:#fff}
  .stat-c{display:block;margin-top:6px;font:500 12px/1.4 var(--t2-sans);letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.88)}

  /* ---- H3: logos come back roomier: 3 columns, bigger cells and marks ---- */
  .logo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .logo-grid > div{height:84px;padding:12px 10px}
  .logo-grid > div img{max-width:78px;max-height:54px}
  .logos .eyebrow{margin-bottom:24px}

  /* ---- H4: "Most projects don't stall..." block ---- */
  main > section.position{padding-top:40px;padding-bottom:16px}
  body .position h2:not(.sr-only){font-size:24px;line-height:1.3;letter-spacing:1.2px}
  .position h2 + p{margin-top:14px}

  /* ---- H5: "What I'm brought in for" ---- */
  .brought h2{margin-bottom:0}
  .brought .intro{margin:12px 0 28px}
  .cols4{padding-top:28px;row-gap:28px}
  .cols4 h3{margin:10px 0 8px;font-size:20px;line-height:1.3}
  .cols4 p{font-size:15.5px;line-height:1.55}

  /* ---- H6: case carousel: bigger cards, dots, "See all work" end card ---- */
  .rail--cases{align-items:stretch;gap:14px}
  .rail--cases > .case-row{flex:0 0 min(86vw,340px);max-width:none;margin-bottom:0;display:flex;flex-direction:column}
  .rail--cases .case-row .media{display:block;aspect-ratio:3 / 2;height:auto;overflow:hidden}
  .rail--cases .case-row .media img{width:100%;height:100%;object-fit:cover}
  .rail--cases .case-row h3{font-size:18px;line-height:1.3;margin:10px 0 10px}
  .rail--cases .case-row .context{margin-top:14px}
  .rail--cases .case-row .result{font-size:15px;line-height:1.5}
  .rail--cases .case-row .read{margin-top:12px}
  .case-end{flex:0 0 min(60vw,240px);display:flex;flex-direction:column;justify-content:flex-end;gap:14px;padding:28px 24px;background:var(--t2-black);color:var(--t2-white);text-decoration:none}
  .case-end .k{font:500 12px/1.4 var(--t2-sans);letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.8)}
  .case-end .t{font:400 24px/1.25 var(--t2-serif);letter-spacing:.5px}
  .case-end svg{width:34px;height:10px}
  .case-end:focus-visible{outline:2px solid currentColor;outline-offset:-6px}
  .cases .q-card{margin-top:32px}

  /* ---- H7: cards that follow ---- */
  .ways h2{margin-bottom:28px}
  .way{padding:28px 24px;gap:12px;min-width:0}
  .way h3{font-size:24px;line-height:1.25}
  .ways-grid{grid-template-columns:minmax(0,1fr);gap:16px}
  figure.q-card{padding-top:22px;padding-bottom:22px}

  /* ---- D2: Direct / Agency card sections ---- */
  .ladder,.models{margin-top:0}

  /* ---- X2 / X3: steps and outcome cards become swipe rails ---- */
  .rail--steps{align-items:stretch}
  .rail--steps > ol{display:flex;gap:12px;align-items:stretch;grid-template-columns:none}
  .rail--steps li{flex:0 0 min(78vw,300px);scroll-snap-align:start;padding:20px;margin:0;border:1px solid var(--t2-line);background:var(--t2-white)}
  .rail--trio > div{display:flex;gap:12px;align-items:stretch;grid-template-columns:none}
  .rail--trio > div > *{flex:0 0 min(78vw,300px);scroll-snap-align:start;padding:20px;margin:0;background:var(--t2-surface)}
  .sec--dark .rail--steps li,.sec--dark .rail--trio > div > *{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.22)}

  /* ---- A1: About opens tighter ---- */
  main > section.intro{padding-top:24px}
  .panel{padding-top:28px;padding-bottom:20px}

  /* ---- A2: timeline becomes a horizontal track ---- */
  .rail--timeline > ol{display:flex;grid-template-columns:none;gap:0}
  .rail--timeline li{flex:0 0 156px;position:relative;scroll-snap-align:start;padding:34px 20px 0 0;margin:0;border:0}
  .rail--timeline li::before{content:"";position:absolute;left:0;top:10px;width:9px;height:9px;border-radius:50%;background:var(--t2-black)}
  .rail--timeline li::after{content:"";position:absolute;left:14px;right:6px;top:14px;height:1px;background:var(--t2-line)}
  main > section.record{padding-top:44px;padding-bottom:56px}

  /* ---- W1: Work page ---- */
  .nda-note .btn{justify-self:start;min-width:220px}
  .wgrid{display:block}
  .wcard[hidden]{display:none}
  .wcard:not([hidden]){display:grid;grid-template-columns:104px minmax(0,1fr);gap:0 14px;align-items:center;padding:14px 0;border-top:1px solid var(--t2-line);box-shadow:none;background:none}
  .wcard .wcard-media{width:104px;height:78px;aspect-ratio:auto;margin:0}
  .wcard .wcard-media img{width:100%;height:100%;object-fit:contain}
  .wcard .wcard-body{padding:0;display:block}
  .wcard .context{margin:0 0 4px;font-size:11px;line-height:1.4}
  .wcard h3{margin:0;font-size:16px;line-height:1.3}
  .wcard .tags{display:none}
  .wcard .card-read{margin-top:6px;min-height:0;font-size:13px}

  /* ---- C1: Contact: track choice reachable at the top ---- */
  details.steps-d{margin-top:20px;border-top:1px solid var(--t2-line);border-bottom:1px solid var(--t2-line)}
  details.steps-d > summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;cursor:pointer;list-style:none;font:600 14px/1.3 var(--t2-sans);letter-spacing:.04em}
  details.steps-d > summary::-webkit-details-marker{display:none}
  details.steps-d > summary::after{content:"";flex:none;width:14px;height:14px;background:linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat,linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat}
  details.steps-d[open] > summary::after{background:linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat}
  details.steps-d > summary:focus-visible{outline:2px solid currentColor;outline-offset:2px}
  details.steps-d ol.steps{margin-top:4px;padding-bottom:8px}
  .panel .lede{margin-top:16px}
  section.form-col{padding-top:28px;padding-bottom:40px}
  .form-col label .t-kicker{margin-top:2px}
  .form-col label .t-title{font-size:20px;line-height:1.25}
  .form-col label .t-line{font-size:13.5px;line-height:1.45}
  .form-col fieldset label{padding:18px 20px 20px}
  .form-col .alt{display:flex;flex-wrap:wrap;align-items:center;column-gap:24px;margin-top:32px;padding-top:24px;border-top:1px solid var(--t2-line)}
  .form-col .alt p{flex:0 0 100%;margin:0 0 4px}

  /* ---- F1: closing band ---- */
  main > section.close,main > section.cta-band{padding-top:48px;padding-bottom:48px;box-shadow:inset 0 0 0 100vmax rgba(0,0,0,.25)}
  .close p{margin-top:12px}
  .close .actions,.cta-band .actions{margin-top:24px}

  /* ---- F2: footer ---- */
  .footer-map{padding-top:36px;padding-bottom:20px;row-gap:20px}
  .fm-brand p{margin-top:12px}
  .fm-col:not(.fm-col--wide) ul{columns:2;column-gap:20px}
  .fm-col li{break-inside:avoid}
  .fm-h.is-moved{display:none}
  details.fm-d > summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;cursor:pointer;list-style:none;border-bottom:1px solid rgba(255,255,255,.22)}
  details.fm-d > summary::-webkit-details-marker{display:none}
  details.fm-d > summary::after{content:"";flex:none;width:14px;height:14px;background:linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat,linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat}
  details.fm-d[open] > summary::after{background:linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat}
  details.fm-d > summary:focus-visible{outline:2px solid currentColor;outline-offset:2px}
  .footer-bar{padding-top:16px;padding-bottom:16px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
  .footer-bar p{margin:0}

  /* ---- Pass 2: fixes from the page-by-page test run ---- */
  /* home cases: image fills the card (it is a background image on an empty link) */
  .rail--cases > .case-row{align-items:stretch}
  .rail--cases .case-row .media{width:100%;background-size:cover;background-position:center}
  /* proof stats: caption styles only on the caption */
  .stat-n{text-transform:none;letter-spacing:.5px}
  /* S1 applied to the label itself (the base .lbl was uppercase 12px tracked) */
  body main .link-arrow .lbl{font-family:var(--t2-sans);font-size:15.5px;font-weight:500;line-height:1.3;letter-spacing:.01em;text-transform:none}
  /* long labels may wrap instead of pushing the page wider */
  .way .link-arrow{min-width:0}
  .way .link-arrow .lbl{white-space:normal;min-width:0;background:none;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px;padding-bottom:0}
  .ways-grid{grid-template-columns:minmax(0,1fr)}
  body main .wcard .card-read .lbl{font-size:13px;white-space:normal;min-width:0}
  .wcard .card-read{min-width:0;max-width:100%}
  /* About intro: fewer big gaps */
  .intro > .wrap{row-gap:32px}
  .intro .eyebrow{margin-bottom:16px}
  .intro .lede{margin-top:20px}
  .intro .meta{margin-top:24px}
  /* Agency cards match Direct cards (24px sides, 21px titles) and cannot widen the page */
  .ladder,.models{grid-template-columns:minmax(0,1fr)}
  .model{padding:16px 24px;min-width:0}
  .model h3{font-size:21px;line-height:1.3}

  /* ---- Pass 2b: body text sizes and leading that page stylesheets out-ranked (T1) ---- */
  body main .hero .sub,body main .page-hero .wrap > p:not(.eyebrow),body main .intro .lede,body main .panel .lede,body main .principles .how-lead,body main .translator .lead p{font-size:16px;line-height:1.55}
  body main .creds-line{font-size:13.5px;line-height:1.55}
  body main .cap-row p,body main .steps li,body main .steps4 li,body main .steps4 li p{line-height:1.55}
  body main .dir-row li{line-height:1.5}
  body main .story h2{font-size:26px;line-height:1.3;letter-spacing:1px}
  body main .caps h3{font-size:20px;line-height:1.3}
  .page-hero .actions .link-arrow{padding-left:0}
}
