/* Mobile layer (≤1007px only, loaded with a media query). Desktop never sees this file.
   Deviations from therow.com mobile: sticky header, screen-by-screen snapping, larger type and tap targets,
   end-card footer, page titles, home intro. */

:root{--hh:50px;--scr:calc(100vh - var(--hh));--ease:cubic-bezier(.2,.7,.2,1)}
@supports (height:100svh){:root{--scr:calc(100svh - var(--hh))}}

/* ---------- type + base ---------- */
body{font-size:15px;line-height:1.6}
.m-title{font:inherit;font-size:24px;line-height:1.25;font-weight:500;letter-spacing:-.01em;margin:0 0 22px}
.page,.is-inner .page{min-height:0}

/* ---------- screen snapping ---------- */
html:has([data-scr]){scroll-snap-type:y proximity;scroll-padding-top:var(--hh)}
[data-scr]{scroll-snap-align:start}
@media (prefers-reduced-motion:reduce){html:has([data-scr]){scroll-snap-type:y proximity}}

/* ---------- header: sticky, 44px targets ---------- */
.header{position:sticky;top:0;z-index:50;height:var(--hh);background:var(--bg);transition:background-color .3s ease,color .3s ease}
.is-home .header{background:transparent}
.header__burger{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:-14px 0 -14px -12px}
.header__burger svg{width:20px;height:15px}
.logo{font-size:12px;padding:15px 0;height:auto;margin:-15px 0}
.header__item--logo{flex-basis:130px}
/* home: once past the photo the bar turns solid */
.is-home.m-past .header{background:var(--bg)}
.is-home.m-past .header,.is-home.m-past .header a,.is-home.m-past .logo{color:var(--text)!important}
.is-home.m-past .header::before{opacity:0}
.header::before{transition:opacity .3s ease}

/* ---------- drawer: slide in, 48px rows ---------- */
.drawer:not([hidden]){animation:dIn .25s cubic-bezier(.32,.72,0,1)}
@keyframes dIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.drawer__top{height:var(--hh);align-items:center;padding:0 15px 0 20px}
.drawer__close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0 -12px 0 0}
.drawer__list a{display:flex;align-items:center;min-height:48px;padding:0 20px;font-size:17px}
.drawer__list--secondary a{font-size:15px;min-height:44px}
.drawer:not([hidden]) .drawer__list li{animation:none}
.drawer:not([hidden]) .drawer__list li:nth-child(2){animation-delay:.03s}
.drawer:not([hidden]) .drawer__list li:nth-child(3){animation-delay:.06s}
.drawer:not([hidden]) .drawer__list li:nth-child(4){animation-delay:.09s}
.drawer:not([hidden]) .drawer__list li:nth-child(5){animation-delay:.12s}
.drawer:not([hidden]) .drawer__list li:nth-child(6){animation-delay:.15s}
.drawer:not([hidden]) .drawer__list li:nth-child(7){animation-delay:.18s}
@keyframes dItem{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
.drawer__info{margin-top:36px}
.drawer__info a{display:inline-block;padding:10px 0;margin:-10px 0}

/* ---------- reveal on arrival (classes added by mobile.js) ---------- */
.rv{opacity:0;transform:translateY(18px);transition:opacity .6s var(--ease),transform .6s var(--ease);transition-delay:calc(var(--i,0) * 70ms)}
.rv.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.rv{transform:none;transition:opacity .3s}}

/* ---------- screen rail (built by mobile.js) ---------- */
.rail{position:fixed;right:0;top:50%;z-index:40;display:flex;flex-direction:column;gap:2px;transform:translateY(-50%);mix-blend-mode:difference}
.rail button{display:flex;align-items:center;justify-content:center;width:20px;height:22px}
.is-home:not(.m-past) .rail{opacity:0;pointer-events:none}
.rail{transition:opacity .3s}
.rail button::before{content:"";width:5px;height:5px;border-radius:50%;background:#fff;opacity:.38;transition:opacity .3s,transform .3s}
.rail button[aria-current="true"]::before{opacity:1;transform:scale(1.35)}

/* ---------- buttons + links: 44–48px targets ---------- */
.btn{height:48px;font-size:15px}
.btn--dark{width:100%}
.u{display:inline-block;padding:11px 0;margin:-11px 0}
p .u,dd .u{display:inline;padding:0;margin:0}
.exp p:last-child>.u:only-child,.linkbtn{display:inline-flex;align-items:center;min-height:44px;padding:0;margin:0}

/* ---------- footer = end card ---------- */
.footer{min-height:var(--scr);margin:0;padding:28px 20px 22px;border-top:0;display:flex;flex-direction:column;justify-content:space-between;background:var(--bg)}
.footer__next{display:flex;flex-direction:column;gap:4px;padding:18px 0 22px;border-bottom:1px solid var(--border)}
.footer__next-t{font-size:28px;line-height:1.2;font-weight:500;color:var(--text);letter-spacing:-.01em}
.footer__inner{display:grid;grid-template-columns:1fr 1fr;gap:18px 16px;padding:0;min-height:0;margin-top:auto;flex-direction:initial}
.footer__col,.footer__col--lead,.footer__col--last{flex:none}
.footer__col--lead{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:0 10px}
.footer__col--lead p{margin:0}
.footer__col--lead .footer__cv{flex-basis:100%}
.footer__col li{margin:0}
.footer__col a,.footer__cv a{display:flex;align-items:center;min-height:44px}
.footer__inner>ul:nth-of-type(3){grid-column:1/-1;display:flex;gap:22px}
.footer__col--last{grid-column:1/-1}
.footer__col--last a{display:inline-flex}
.footer__copy{padding-top:14px;font-size:13px}

/* ---------- HOME ---------- */
.hero{height:100vh;min-height:0;margin-top:calc(var(--hh) * -1)}
@supports (height:100svh){.hero{height:100svh}}
.hero__dots{position:absolute;left:15px;bottom:21px;z-index:3;display:flex;gap:7px;pointer-events:none}
.hero__dots span{width:6px;height:6px;border-radius:50%;background:#fff;opacity:.45;box-shadow:0 0 6px rgba(0,0,0,.35);transition:opacity .3s,transform .3s}
.hero__dots span.on{opacity:1;transform:scale(1.25)}
.hero__hint{position:absolute;left:50%;bottom:64px;z-index:3;transform:translateX(-50%);padding:7px 12px;border-radius:20px;background:rgba(0,0,0,.42);color:#fff;font-size:13px;pointer-events:none;opacity:0;transition:opacity .5s}
.hero__hint.show{opacity:1}
.intro{min-height:var(--scr);display:flex;flex-direction:column;justify-content:center;padding:40px 24px}
.intro__eyebrow{margin-bottom:10px}
.intro__h{font:inherit;font-size:30px;line-height:1.15;font-weight:500;letter-spacing:-.015em;margin:0 0 16px}
.intro__p{color:var(--light);margin-bottom:28px}
.intro__cta{display:grid;gap:10px}
.intro__link{align-self:flex-start;margin-top:14px}

/* ---------- ABOUT ---------- */
.editorial{padding:0}
.editorial__text{min-height:var(--scr);text-align:left;padding:32px 24px 28px;display:flex;flex-direction:column;justify-content:center}
.editorial__text p+p{margin-top:16px}
.editorial__figure{min-height:var(--scr);margin:0;padding:24px;display:flex;flex-direction:column;justify-content:center}
.editorial__figure img{height:auto;max-height:calc(var(--scr) - 110px);aspect-ratio:3/4;object-position:50% 40%}
.editorial__figure figcaption{margin-top:14px}

/* ---------- WORK: two cards per screen, sized to fill it exactly ---------- */
.toolbar{height:54px;padding:0 20px;align-items:center}
.grid{display:block;width:auto;padding:0 20px;--slot:calc((var(--scr) - 54px - 48px) / 2)}
.card{height:var(--slot);margin-bottom:24px}
.card:nth-child(2){margin-bottom:78px}
.card:nth-child(3){scroll-margin-top:54px}
.card a{display:flex;flex-direction:column;height:100%}
.card__img{flex:1;min-height:0;aspect-ratio:auto;border-radius:16px;transition:transform .25s var(--ease)}
.card__img img{object-fit:contain}
.card a:active .card__img{transform:scale(.98)}
.card__meta{margin-top:8px;flex:none}

/* ---------- CASE STUDIES: screen 1 = photo + headline, screen 2 = details ---------- */
.pdp{padding:0}
.pdp__gallery{height:52vh;background:var(--tile);position:relative}
@supports (height:100svh){.pdp__gallery{height:52svh}}
.pdp__gallery>img{width:100%;height:100%;object-fit:cover}
.pdp__info{padding:0}
.pdp__head{min-height:calc(48vh - var(--hh));padding:22px 24px 20px;display:flex;flex-direction:column;justify-content:center}
@supports (height:100svh){.pdp__head{min-height:calc(48svh - var(--hh))}}
.pdp__crumbs{font-size:13px;margin-bottom:10px}
.pdp__crumbs a{display:inline-flex;align-items:center;min-height:44px;margin:-14px 0}
.pdp__title{font-size:22px;line-height:1.2;margin-bottom:4px}
.pdp__no{color:var(--light);margin-bottom:12px}
.pdp__lede{margin:0}
.pdp__body{min-height:var(--scr);padding:28px 24px 28px;display:flex;flex-direction:column}
.pdp__body .btn{margin-top:auto}
.pdp__meta{margin-bottom:24px}
.pdp__meta dt{flex-basis:80px}
.acc summary{min-height:48px;padding:0}
.acc__body{overflow:hidden}
/* photo stack fits its screen; cards sized from the shorter side */
.cs{aspect-ratio:auto;height:100%}
.cs__card{--w:min(76vw,55vh);width:var(--w);left:calc(50% - var(--w) / 2);margin-top:calc(var(--w) * -.375 - 12px)}
.cs--p{aspect-ratio:auto}
.cs--p .cs__card{--w:min(78vw,33vh);width:var(--w);left:calc(50% - var(--w) / 2);margin-top:calc(var(--w) * -.625 - 12px)}
@supports (height:100svh){.cs__card{--w:min(76vw,55svh)}.cs--p .cs__card{--w:min(78vw,33svh)}}
.cs-dots{position:absolute;left:0;right:0;bottom:12px;z-index:6;display:flex;justify-content:center;align-items:center;gap:6px;pointer-events:none;font-size:12px;color:var(--light)}
.cs-dots i{width:5px;height:5px;border-radius:50%;background:var(--text);opacity:.22;transition:opacity .3s,transform .3s}
.cs-dots i.on{opacity:.9;transform:scale(1.3)}
.cs-dots b{font-weight:400;margin-left:8px}

/* ---------- EXPERIENCE: one group per screen, no duplicate table ---------- */
.care{display:block;padding:0}
.care__side{display:none}
.exp-overview{display:none}
.exp-group{min-height:var(--scr);padding:30px 24px 24px}
.exp-group__label{font:inherit;font-size:12px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--text);margin:0 0 18px;display:flex;align-items:center;gap:12px}
.exp-group__label::after{content:"";flex:1;height:1px;background:var(--border)}
.exp{margin-bottom:24px}
.exp h2{line-height:1.4}
.exp p.muted{font-size:13px;margin:2px 0 6px}

/* ---------- BEYOND: one photo + its caption per screen ---------- */
.gal{display:block;padding:0}
.gal__item{min-height:var(--scr);display:flex;flex-direction:column;justify-content:center;padding:16px 0 20px}
.gal__item img{width:100%;height:min(150vw,calc(var(--scr) - 120px));aspect-ratio:auto;cursor:pointer}
.gal__item:first-child img{height:min(150vw,calc(var(--scr) - 170px))}
.gal__item .m-title{padding:0 20px;margin-bottom:14px}
.gal__text{display:flex;justify-content:space-between;align-items:flex-start;margin:12px 20px 0;width:auto}
.gal__n{font-size:13px;padding-top:2px}

/* ---------- CORE VALUES: six per screen ---------- */
.vals{display:block}
.vals__scr{min-height:var(--scr);padding:30px 24px 24px;display:flex;flex-direction:column;justify-content:center}
.vals ol{padding-left:30px}
.vals li{margin-bottom:20px}

/* ---------- RECOMMENDATION: both quotes on one screen ---------- */
.page.rec{min-height:var(--scr);padding:30px 24px;display:flex;flex-direction:column;justify-content:center}
.centered,.centered--first,.centered--last{padding:0;text-align:left;max-width:none}
.centered--last{margin-top:28px;padding-top:28px;border-top:1px solid var(--border)}
.centered__quote{margin:0 0 12px;font-size:19px;line-height:1.4}
.centered__by{margin-bottom:6px;color:var(--light)}
.letter{width:100vw;max-width:100vw;height:100vh;max-height:none;margin:0}
@supports (height:100svh){.letter{height:100svh}}
.letter[open]{animation:sheetUp .3s cubic-bezier(.32,.72,0,1)}
@keyframes sheetUp{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.letter__close{position:sticky;top:0;float:right;min-height:44px;padding:0 18px;background:#fff;z-index:1}
.letter__paper{padding:56px 24px 44px}

/* ---------- CONNECT: whole form on one screen, no iOS zoom ---------- */
.care[data-scr]{min-height:var(--scr);padding:28px 24px 24px}
.care__main>p:first-of-type{margin-bottom:24px}
.field{margin-bottom:18px}
.field label{padding-left:0;margin-bottom:2px;font-size:13px;color:var(--light)}
.field input,.field select,.field textarea{font-size:16px;height:44px;padding:0}
.field textarea{height:96px;padding:8px}
.field select{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231D1B19' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 2px center/12px 8px;padding-right:22px}

/* ---------- short phones (iPhone SE / mini): tighten so each screen still fits ---------- */
@media (max-height:700px){
  .m-title{font-size:22px;margin-bottom:14px}
  .exp-group,.vals__scr{padding-top:20px}
  .exp{margin-bottom:16px}
  .exp-group__label{margin-bottom:10px}
  .pdp__body{padding:18px 24px 20px}
  .pdp__meta{margin-bottom:14px;line-height:1.5}
  .acc summary{min-height:44px}
  .acc>p,.acc>ol,.acc>ul{padding-bottom:12px}
  .care[data-scr]{padding-top:18px}
  .care__main>p:first-of-type{margin-bottom:14px}
  .field{margin-bottom:10px}
  .field input,.field select{height:40px}
  .field textarea{height:68px}
  .vals li{margin-bottom:12px}
  .intro__h{font-size:26px}
}
.acc>ol.steps{padding-left:20px}
.breadcrumbs a{display:inline-flex;align-items:center;min-height:44px}
.rail button{width:28px;height:28px}

/* ---- preview: smaller screen dots + higher-contrast Experience ---- */
.rail button::before{width:4px;height:4px;opacity:.3}
.rail button[aria-current="true"]::before{transform:scale(1.25)}
.exp-group .m-title{font-size:28px;font-weight:600;letter-spacing:-.02em}
.exp{margin-bottom:0;padding:18px 0}
.exp+.exp{border-top:1px solid var(--border)}
.exp-group__label{margin-bottom:4px}
.exp h2{font-size:16px;font-weight:600;line-height:1.35;color:var(--text)}
.exp p.muted{font-size:13px;margin:3px 0 8px;color:var(--light)}
.exp p:not(.muted){color:var(--text)}
.exp p:last-child>.u:only-child{font-size:14px;font-weight:500}
.vals li.rv{transform:translateX(-28px);transition-duration:.55s}
.vals li.rv.in{transform:none}
@media (prefers-reduced-motion:reduce){.vals li.rv{transform:none}}
@media (max-height:780px){
  .exp{padding:10px 0}
  .exp-group .m-title{font-size:24px;margin-bottom:12px}
  .exp p.muted{margin:2px 0 4px}
}
.centered__quote{font-size:17px;line-height:1.45}
.centered__by{font-size:14px}
.rec .linkbtn{font-size:14px}

/* ---- pinned page title (Experience, Core Values): title stays, content screens move under it ---- */
:root{--th:64px}
html:has(.m-pagehead){scroll-padding-top:calc(var(--hh) + var(--th))}
.m-pagehead{position:sticky;top:var(--hh);z-index:30;height:var(--th);margin:0;padding:0 24px;display:flex;align-items:center;background:var(--bg);font-size:26px;font-weight:600;letter-spacing:-.02em}
.m-pagehead::after{content:"";position:absolute;left:0;right:0;top:100%;height:14px;background:linear-gradient(var(--bg),rgba(255,255,255,0));pointer-events:none}
.exp-group,.vals__scr{min-height:calc(var(--scr) - var(--th))}
.exp-group{padding-top:14px}
.vals__scr{padding-top:14px;justify-content:flex-start}
@media (max-height:780px){:root{--th:54px}.m-pagehead{font-size:22px}.exp-group,.vals__scr{padding-top:8px}}


/* Experience: compact type on mobile */
.exp-group{font-size:13px;line-height:1.55}
.exp h2{font-size:14px!important;line-height:1.35}
.exp p.muted{font-size:11.5px!important}
.exp p:last-child>.u:only-child{font-size:12.5px!important;min-height:36px}
.exp{padding:13px 0!important}
.exp-group__label{font-size:11px}
.m-pagehead{font-size:22px!important}
/* skills: page head spans full width, groups padded */
.care.skills[data-scr]{padding:0 0 24px}
.skills .care__main>.skills__grp,.skills .skills__src{margin-left:24px;margin-right:24px}
.skills .skills__grp:first-of-type{border-top:0;padding-top:6px}
/* The Close: smaller slide stack */
.cs--p .cs__card{--w:min(66vw,28vh)}
@supports (height:100svh){.cs--p .cs__card{--w:min(66vw,28svh)}}

/* home: first screen on phones carries the pitch, not just the photo */
.is-home main{position:relative}
.hero-m{position:absolute;left:20px;right:20px;top:calc(100vh - 108px - env(safe-area-inset-bottom));transform:translateY(-100%);z-index:6;color:#fff;pointer-events:none}
.hero-m__h{margin:0 0 12px;font-size:22px;line-height:1.15;font-weight:500;letter-spacing:-.015em;text-shadow:0 1px 12px rgba(0,0,0,.35)}
.proof--hero{border-top-color:rgba(255,255,255,.35);margin:0 0 14px}
.proof--hero b{color:#fff;text-shadow:0 1px 10px rgba(0,0,0,.3)}
.proof--hero span{color:rgba(255,255,255,.82)}
.hero-m__btn{pointer-events:auto;display:inline-flex;align-items:center;height:38px;padding:0 18px;border-radius:999px;background:#fff;color:#111;font-size:13px;font-weight:500}
@supports (height:100svh){.hero-m{top:calc(100svh - 108px - env(safe-area-inset-bottom))}}
.hero-m::before{content:"";position:absolute;left:-20px;right:-20px;top:-70px;bottom:-24px;z-index:-1;background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.4) 40%,rgba(0,0,0,.4) 75%,rgba(0,0,0,0));pointer-events:none}
/* colour audit: hero pitch readable on every opener (backdrop held at L <= 0.45 behind text) */
.hero-m::before{background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.55) 38%,rgba(0,0,0,.55) 78%,rgba(0,0,0,0))}
.proof--hero span{color:#fff;font-size:12px}
.hero__hint{background:rgba(0,0,0,.55)}
/* v3 mobile: same language as desktop */
.hero-m{text-shadow:0 0 2px rgba(0,0,0,.45),0 0 12px rgba(0,0,0,.6)}
.hero-m__h{font-size:20px;line-height:1.25;letter-spacing:-.01em;margin:0 0 10px;text-shadow:inherit}
.proof--hero b{font-size:15px;font-weight:500;letter-spacing:0}
.hero-m .btn{text-shadow:none}

/* Menu: compact secondary row */
.drawer__list--secondary{display:flex;gap:22px;margin-top:28px;padding:20px 20px 0;border-top:1px solid var(--border);margin-left:20px;margin-right:20px;padding-left:0}
.drawer__list--secondary a{padding:0;min-height:44px;font-size:14px;color:var(--light)}
.footer__col--lead{display:none}
/* five cards: the fifth starts its own screen */
.card:nth-child(4){margin-bottom:78px}
.card:nth-child(5){scroll-margin-top:54px}
