/* Anchored product. Warm paper ground, Geist for everything, labels included. James's river artwork, blurred
   and bent, runs in from the top right of the banner beside the headline. Static. */
.d-ap{
  --bg:#f5f4ef;--panel:#eae8e1;--ink:#111214;--ink2:#53565d;--ink3:#888b92;--line:rgba(17,18,20,.12);
  --pad:clamp(20px,4.4vw,64px);--sans:'Geist',system-ui,sans-serif;--mono:'Geist',system-ui,sans-serif;
  --night:#120608;--ease:cubic-bezier(.2,.8,.2,1);
  background:var(--bg);
  color:var(--ink);font:400 16px/1.55 var(--sans);
}
.ar{width:18px;height:18px;flex:none;transition:translate .3s var(--ease)}
a:hover>.ar{translate:3px 0}
.d-ap main:focus,.d-ap section:focus{outline:none}
.kicker{font:500 12px/1.35 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink3)}

/* Buttons: square-cornered, no pills */
.btn{display:inline-flex;align-items:center;gap:8px;height:46px;padding:0 20px;border:0;border-radius:3px;font:500 15px/1 var(--sans);text-decoration:none;white-space:nowrap;cursor:pointer;transition:background-color .15s}
.btn.sm{height:38px;padding:0 14px;font-size:14px}
.btn.dark{background:var(--ink);color:#fff}
.btn.dark:hover{background:#2b2d32}
.btn.light{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px rgba(17,18,20,.16)}
.btn.light:hover{background:#efeee9}
.btn.ghost{background:transparent;color:#fff6ef;box-shadow:inset 0 0 0 1px rgba(255,246,239,.3)}
.btn.ghost:hover{background:rgba(255,246,239,.1)}

/* Nav */
.brand{font:600 18px/1 var(--sans);letter-spacing:-.02em;text-decoration:none}

/* Banner */
.hero{position:relative;overflow:hidden;min-height:clamp(600px,76svh,780px);display:flex;flex-direction:column;justify-content:center;padding:110px var(--pad) 24px}
.river{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.copy{position:relative;z-index:2;max-width:720px}
.copy h1{margin-top:18px;font:500 clamp(52px,7.3vw,106px)/.94 var(--sans);letter-spacing:-.05em}
.intro{max-width:35ch;margin-top:26px;font-size:clamp(17px,1.45vw,21px);line-height:1.5;color:var(--ink2)}

/* Work: the UI on a textured panel, the story on a plain one, with S's rounded corners */
.work{padding:clamp(16px,2vw,32px) var(--pad) 0}
/* The animated dot grid sits behind everything */
.dots{position:fixed;inset:0;z-index:-1;width:100%;height:100%;pointer-events:none}
.sec{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.sec h2{font:500 clamp(40px,4.4vw,64px)/1 var(--sans);letter-spacing:-.045em}
.cases{display:grid;gap:clamp(16px,2vw,24px);margin-top:clamp(24px,3vw,40px)}
/* Cards as in S: a white card with a little padding, the coloured screen panel set inside it */
.case{display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:clamp(460px,44vw,660px);padding:10px;position:relative;isolation:isolate;border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 0 0 1px rgba(17,18,20,.06);transition:box-shadow .4s var(--ease)}
.case:hover{box-shadow:0 30px 60px -44px rgba(0,0,0,.4)}
.c-tex{display:flex;justify-content:center;align-items:flex-start;padding:clamp(36px,5vw,72px) clamp(24px,4vw,60px) 0;overflow:hidden;border-radius:14px;background:#efede7}
.c-ui{display:block;width:min(64%,380px);background-repeat:no-repeat;background-color:#fff;border-radius:16px 16px 0 0;box-shadow:0 0 0 1px rgba(17,18,20,.06),0 30px 60px -30px rgba(17,18,20,.28);transition:translate .7s var(--ease)}
.c-do-more-with-data,.c-gyg-2,.c-indi{width:min(84%,460px);margin-block:auto;border-radius:16px;transform:translateY(calc(clamp(36px,5vw,72px) / -2))}
.case:hover .c-ui{translate:0 -12px}
.c-txt{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:16px;padding:clamp(28px,4.4vw,72px)}
/* The whole card: white, with a faint mesh of the project's colour and fine noise over it */
.case::before{content:'';position:absolute;inset:0;z-index:-1;background:radial-gradient(55% 60% at 0% 0%,rgba(226,220,208,.45),transparent 70%),radial-gradient(45% 50% at 30% 100%,rgba(232,226,214,.35),transparent 70%),radial-gradient(35% 40% at 55% 70%,rgba(255,220,185,.14),transparent 70%)}
.case::after{content:'';position:absolute;inset:0;z-index:-1;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:180px;opacity:.06;mix-blend-mode:multiply;pointer-events:none}
.c-txt h3{font:500 clamp(32px,3.6vw,56px)/1.02 var(--sans);letter-spacing:-.04em}
.c-d{max-width:46ch;font-size:clamp(16px,1.2vw,18px);color:var(--ink2)}
.c-m{display:flex;flex-wrap:wrap;gap:clamp(20px,3vw,44px);margin-top:4px}
.c-m dt{font:500 clamp(34px,3.4vw,52px)/1 var(--sans);letter-spacing:-.04em}
.c-m dd{max-width:20ch;margin-top:6px;font-size:14px;line-height:1.35;color:var(--ink3)}
.c-s{font:500 12px/1.3 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ink3)}
.c-txt .btn{margin-top:8px}
.case.flip .c-tex{order:2}

/* About */
.about{padding:clamp(80px,10vw,150px) var(--pad) 0}
.ab{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(24px,4vw,72px);margin-top:clamp(24px,3vw,40px)}
.ab-pic{align-self:start;aspect-ratio:4/5;overflow:hidden;border-radius:14px;background:#e2dfd6}
.ab-pic img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 30%}
.ab-copy{display:grid;gap:16px;align-content:start}
.ab-copy>p{max-width:64ch}
.ab-name{font:500 clamp(28px,2.6vw,40px)/1.1 var(--sans);letter-spacing:-.03em}
.ab-lead{font-size:clamp(19px,1.9vw,30px);line-height:1.38;letter-spacing:-.01em}
.ab-copy>.ab-lead{max-width:36ch}
.ab-copy p:not(.ab-name):not(.ab-lead){color:var(--ink2)}
.ab-copy b{font-weight:600;color:var(--ink)}
.roles{margin-top:10px;border-top:1px solid var(--line)}
.roles li{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);font-size:15px}
.roles span{color:var(--ink2)}
.roles b{font-weight:600;text-align:right}

/* Let's Yarn and footer on the dark, like S: one rounded block, the waterhole circle on the right */
/* The space above the footer covers the gradient's headroom (its soft top can rise 60% of its height above the
   footer's edge) plus a clear gap, so the fade never comes near the content above it. */
.night{position:relative;overflow-x:clip;overflow-y:visible;isolation:isolate;container-type:inline-size;--fade:min(340px,60vw);--gap:27px;--clear:clamp(56px,7vw,128px);--edge:calc(var(--clear) + var(--fade) * .6);margin-top:0;padding-top:calc(var(--edge) + var(--fade) + var(--gap));color:#fff6ef;
  background:linear-gradient(to bottom,transparent calc(var(--edge) + var(--fade)),var(--night) calc(var(--edge) + var(--fade)))}
/* The footer box starts with a clear gap (--clear), then the gradient's headroom (60% of its height), then its edge
   (--edge): everything is drawn inside the box, since Safari clips what a footer draws outside itself. */
/* The paper turns to night through soft tongues of brown that rise to different heights and sway slowly, like the
   streaks in a blurred photograph, plus any dots of colour (drawn by footer.js from footer-config.js). Its top rows are clear and its bottom rows solid,
   so it meets the paper and the black with no edge. */
/* The browns' canvas reaches 60% of the gradient's height above the footer's edge (RISE in footer.js), so a soft top
   can fade all the way to transparent over the paper above instead of being cut by the edge. */
.n-fade{position:absolute;left:0;top:var(--clear);width:100%;height:calc(100% - var(--clear));z-index:-2;pointer-events:none}
/* Optional grain (footer settings: grain), gathered around the gradient's curve by footer.js; same box as .n-fade. */
.n-grain{position:absolute;left:0;top:var(--clear);width:100%;height:calc(100% - var(--clear));z-index:-2;pointer-events:none}
/* The art's canvas covers the whole footer, so the art can sit anywhere in it (footer settings: art). By default it
   fades out towards the bottom of the footer; .art-still turns that off. */
.night .river{top:var(--edge);height:calc(100% - var(--edge));z-index:-1;-webkit-mask-image:linear-gradient(to bottom,#000 73%,rgba(0,0,0,.35) 88%,transparent 99%);mask-image:linear-gradient(to bottom,#000 73%,rgba(0,0,0,.35) 88%,transparent 99%)}
.night.art-still .river{-webkit-mask-image:none;mask-image:none}
.yarn{position:relative;padding:clamp(48px,7cqw,110px) clamp(28px,6cqw,96px) clamp(32px,4cqw,56px)}
.y-copy{position:relative}
.yarn .kicker{color:rgba(255,246,239,.55)}
.yarn h2{margin-top:16px;font:500 clamp(56px,9cqw,140px)/.9 var(--sans);letter-spacing:-.055em}
.y-text{max-width:46ch;margin-top:20px;font-size:clamp(17px,1.4cqw,20px);color:rgba(255,246,239,.72)}
.y-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:34px}
.yarn .btn.light{background:#fff6ef;color:var(--night);box-shadow:none}
.yarn .btn.light:hover{background:#fff}

/* Footer */
.foot{position:relative;padding:64px clamp(28px,6cqw,96px) 28px}
.f-top{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:40px 64px;padding-bottom:48px}
.f-thanks{font:500 clamp(44px,5cqw,84px)/.95 var(--sans);letter-spacing:-.05em}
.f-ack .kicker{margin-bottom:12px;color:rgba(255,246,239,.55)}
.f-ack p{color:rgba(255,246,239,.78)}
.f-base{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;padding-top:22px;border-top:1px solid rgba(255,246,239,.12);font-size:14px;color:rgba(255,246,239,.55)}
.f-base a{color:inherit;text-decoration:none}
.f-base a:hover{color:#fff}
/* The footer's type and columns follow the footer's own width (it's a size container), so the footer editor's phone
   view looks exactly like a phone. On the site the footer is the window's width, so this matches the old vw sizes. */
@container (max-width:900px){.f-top{grid-template-columns:1fr}}

@media (max-width:900px){
  .case{grid-template-columns:1fr}
  .case{min-height:0}
  .c-tex,.case.flip .c-tex{order:0;height:min(92vw,520px)}
}
@media (max-width:760px){
  .ab{grid-template-columns:1fr}
  .ab-pic{aspect-ratio:4/3.4}
  .hero{min-height:0;justify-content:flex-start;padding:clamp(270px,80vw,360px) var(--pad) 64px}
  .copy h1{font-size:clamp(44px,12.4vw,64px)}
}

/* River controls (a tuning tool, not part of the design) */
.tune{position:fixed;z-index:60;right:16px;bottom:16px;width:280px;background:#fff;border:1px solid rgba(17,18,20,.2);font:500 11px/1.3 var(--mono);color:var(--ink)}
.tune header{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line);text-transform:uppercase;letter-spacing:.06em}
.tune button{padding:4px 8px;border:1px solid rgba(17,18,20,.2);background:#fff;font:inherit;color:inherit;cursor:pointer}
.tune button:hover{background:#f0efea}
.tune.closed .t-body{display:none}
.t-body{display:grid;gap:8px;padding:10px}
.tune label{display:grid;grid-template-columns:1fr auto;gap:2px 8px}
.tune output{color:var(--ink3)}
.tune input{grid-column:1/-1;width:100%;accent-color:var(--ink)}
.tune footer{display:flex;justify-content:space-between;padding-top:6px;border-top:1px solid var(--line)}
@media (max-width:760px){.tune{right:8px;left:8px;width:auto;bottom:60px}.tune:not(.closed) .t-body{max-height:40vh;overflow:auto}}

/* Motion: hold the banner text back until GSAP builds it in */
.motion-wait .hero .copy,.motion-wait .bar,.motion-wait .hero .river{visibility:hidden}
.sec{position:relative;border-bottom-color:transparent;--rule:1}
.sec::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:1px;background:var(--line);transform:scaleX(var(--rule));transform-origin:0 50%}
.hero h1 .ln{padding-bottom:.04em}



/* Glass bar across the top: name, section links, Résumé. Stays put while you scroll. */
.bar{position:fixed;z-index:20;top:14px;left:var(--pad);right:var(--pad);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:6px 6px 6px 18px;border-radius:14px;
  background:rgba(250,249,245,.55);-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.6),0 0 0 1px rgba(17,18,20,.08),0 12px 30px -18px rgba(17,18,20,.35)}
.bar .btn{justify-self:end;border-radius:10px}
.brand{display:inline-flex;align-items:baseline;white-space:nowrap}
/* The folding letters collapse to nothing, leaving the initials */
.brand .fold{display:inline-block;max-width:6em;overflow:hidden;vertical-align:bottom;transition:max-width .5s var(--ease),opacity .35s}
.bar.scrolled .brand .fold{max-width:0;opacity:0}
.links{display:flex;gap:2px}
.links a{padding:9px 14px;border-radius:10px;font:500 14px/1 var(--sans);color:var(--ink2);text-decoration:none;white-space:nowrap;transition:background-color .25s,color .25s}
.links a:hover{color:var(--ink);background:rgba(255,255,255,.6)}
.links a.on{color:var(--ink);background:rgba(255,255,255,.85);box-shadow:0 0 0 1px rgba(17,18,20,.06)}
@media (max-width:760px){
  .bar{top:10px;left:10px;right:10px;gap:6px;padding-left:12px}
  .bar .brand .fold{max-width:0;opacity:0}
  .links a{padding:8px 9px;font-size:13px}
  .bar .btn.sm{height:34px;padding:0 10px;font-size:13px}
}

/* Line breaks: no stranded last words in paragraphs, evenly balanced lines in headings */
.d-ap p,.d-ap dd,.d-ap li{text-wrap:pretty}
.d-ap h1,.d-ap h2,.d-ap h3{text-wrap:balance}
