/* ============================================================
   home.css — homepage layout and motion
   Tokens, accessibility primitives, cursor and page wipe: theme.css
   ============================================================ */
/* ═════════════════════ Base ═════════════════════ */
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: clip }
a { color: inherit; text-decoration: none }
img { display: block; max-width: 100% }
button { font: inherit; color: inherit }
::selection { background: var(--accent); color: var(--accent-ink) }
.pad { padding-left: var(--pad); padding-right: var(--pad) }
.mono { font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase }
.muted { color: var(--muted) }

/* Without JS nothing stays hidden */
html:not(.js) .fade, html:not(.js) .card .body > *, html:not(.js) .w > span { opacity: 1 !important; transform: none !important }
html:not(.js) .card .media { clip-path: none !important }
html:not(.js) .intro, html:not(.js) .cursor, html:not(.js) .wipe { display: none }

/* Text roll — label slides up, duplicate slides in from below */
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.2 }
.roll > span { display: block; transition: transform .55s var(--ease) }
.roll > span + span { position: absolute; inset: 100% 0 auto 0 }
a:hover .roll > span, button:hover .roll > span { transform: translateY(-100%) }

/* ═════════════════════ Intro ═════════════════════ */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--ink); color: var(--bg); display: flex; align-items: flex-end; justify-content: space-between; padding: var(--pad); transition: transform .9s var(--ease-io) }
.intro.out { transform: translateY(-100%) }
.intro .name { font: 500 clamp(28px, 4vw, 56px)/1 var(--f-display); letter-spacing: -.04em; overflow: hidden }
.intro .name span { display: inline-block; transform: translateY(110%); animation: up .7s var(--ease) .05s forwards }
.intro .count { font: 400 clamp(56px, 11vw, 168px)/.8 var(--f-display); letter-spacing: -.05em; font-variant-numeric: tabular-nums }
.intro .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)) }
@keyframes up { to { transform: none } }
html.no-intro .intro { display: none }

/* ═════════════════════ Header — hides on scroll down, returns as a floating pill ═════════════════════ */
.hdr { position: fixed; inset: 0 0 auto; z-index: 40; padding: 14px var(--pad); pointer-events: none; transform: translateY(0); transition: transform .8s var(--ease) }
.hdr-in { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 28px; height: 52px; padding: 0 0; border-radius: 999px; transition: padding .7s var(--ease), background-color .5s, box-shadow .5s, max-width .8s var(--ease); max-width: 100%; margin: 0 auto }
.hdr.float .hdr-in { padding: 0 8px 0 22px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); box-shadow: 0 0 0 1px var(--rule), 0 10px 30px -12px rgba(0,0,0,.25); max-width: 980px }
.hdr.hide:not(:focus-within) { transform: translateY(-130%) }
/* Each header item travels on its own delay — the bar "peels" away and drops back in */
.hdr-in > * { transition: transform .7s var(--ease), opacity .5s }
.hdr.hide:not(:focus-within) .hdr-in > * { transform: translateY(-40px); opacity: 0 }
.hdr-in > *:nth-child(1) { transition-delay: 0s } .hdr-in > *:nth-child(2) { transition-delay: .04s } .hdr-in > *:nth-child(3) { transition-delay: .08s } .hdr-in > *:nth-child(4) { transition-delay: .12s } .hdr-in > *:nth-child(5) { transition-delay: .16s } .hdr-in > *:nth-child(6) { transition-delay: .2s }
.hdr-progress { position: absolute; left: 22px; right: 22px; bottom: 0; height: 1.5px; background: var(--accent); transform-origin: left; transform: scaleX(var(--sp, 0)); opacity: 0; transition: opacity .4s }
.hdr.float .hdr-progress { opacity: 1 }
.brand { font: 500 18px/1 var(--f-display); letter-spacing: -.03em; margin-right: auto; display: inline-flex; gap: 10px; align-items: center; white-space: nowrap }
.brand i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: transform .6s var(--ease-spring) }
.brand:hover i { transform: scale(1.6) }
.nav { display: flex; gap: 26px; font-size: 14px; font-weight: 500 }
.lang { display: flex; gap: 10px; padding-left: 20px; border-left: 1px solid var(--rule) }
.lang a { display: inline-block; padding: 6px 2px; color: var(--muted); transition: color .3s } .lang a.on, .lang a:hover { color: var(--ink) }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; display: grid; place-items: center; cursor: pointer; transition: border-color .3s, transform .5s var(--ease-spring) }
.icon-btn:hover { border-color: var(--ink) }
.icon-btn svg { width: 17px; height: 17px; transition: transform .7s var(--ease-spring) }
.theme-btn:hover svg { transform: rotate(-30deg) }
.theme-btn .sun, :root[data-theme="dark"] .theme-btn .moon { display: none }
:root[data-theme="dark"] .theme-btn .sun { display: block }
.menu-btn { display: none }

.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; white-space: nowrap; transition: color .5s var(--ease) }
.btn::before { content: ""; position: absolute; left: 50%; top: 100%; width: 140%; aspect-ratio: 1; z-index: -1; border-radius: 50%; background: var(--accent); transform: translate(-50%, 0) scale(0); transition: transform .7s var(--ease) }
.btn:hover { color: var(--accent-ink) }
.btn:hover::before { transform: translate(-50%, -60%) scale(1) }
.btn .arr { display: inline-block; transition: transform .6s var(--ease) }
.btn:hover .arr { transform: rotate(-45deg) }
.btn.lg { height: 56px; padding: 0 28px; font-size: 15px }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule) }

/* Mobile menu */
.mnav { position: fixed; inset: 0; z-index: 35; background: var(--bg); padding: 104px var(--pad) calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; transform: translateY(-100%); transition: transform .8s var(--ease-io); visibility: hidden }
.mnav.open { transform: none; visibility: visible }
.mnav ul { list-style: none; margin: 0; padding: 0 }
.mnav li { overflow: hidden; border-bottom: 1px solid var(--rule) }
.mnav li a { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 18px 0; font: 500 34px/1.1 var(--f-display); letter-spacing: -.03em; transform: translateY(100%); transition: transform .8s var(--ease) }
.mnav.open li a { transform: none }
.mnav.open li:nth-child(1) a { transition-delay: .25s } .mnav.open li:nth-child(2) a { transition-delay: .31s } .mnav.open li:nth-child(3) a { transition-delay: .37s } .mnav.open li:nth-child(4) a { transition-delay: .43s }

/* ═════════════════════ Reveal primitives (transform + opacity only) ═════════════════════ */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .1em .1em .06em; margin: 0 -.1em -.1em -.06em }
.w > span { display: inline-block; transform: translate3d(0, 110%, 0) rotate(5deg); transform-origin: 0 100%; transition: transform 1.05s var(--ease) }
.in .w > span, .w.in > span { transform: none }
.fade { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .9s var(--ease), transform 1s var(--ease) }
.fade.in { opacity: 1; transform: none }

/* ═════════════════════ Hero ═════════════════════ */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 120px; padding-bottom: clamp(24px, 4vw, 44px) }
.hero-inner { will-change: transform }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: clamp(24px, 3vw, 40px) }
.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent) }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 2.4s var(--ease) 2 }
@keyframes ping { 0% { transform: scale(1); opacity: .6 } 80%, 100% { transform: scale(3.2); opacity: 0 } }
.hero h1 { margin: 0; font: 500 clamp(44px, 8vw, 132px)/.93 var(--f-display); letter-spacing: -.05em; max-width: 14.5ch }
.hero h1 .hl > .w > span { color: var(--accent) }
.hero h1 .hl { position: relative; display: inline }
.hero-foot { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: end; margin-top: clamp(48px, 8vh, 96px); padding-top: 22px; position: relative }
.hero-foot::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-io) .6s }
.hero.in .hero-foot::before { transform: none }
.meta { display: flex; gap: clamp(24px, 4vw, 56px); align-items: end }
.meta b { display: block; font-weight: 500; font-size: 15px; margin-top: 6px }
.cert { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .4s, transform .6s var(--ease) }
.cert img { width: 38px; height: 38px; border-radius: 50%; background: #fff; transition: transform .8s var(--ease-spring) }
.cert:hover { box-shadow: inset 0 0 0 1px var(--ink) }
.cert:hover img { transform: rotate(-12deg) scale(1.08) }
.cert b { margin: 0; font-size: 14px }
.cert .mono { font-size: 10px; display: block }
.logos { display: flex; align-items: center; gap: 28px }
.logos .tip { position: relative }
.logos img { height: 24px; width: auto; opacity: .55; filter: grayscale(1) brightness(.2); transition: opacity .4s }
.logos img.inv { filter: grayscale(1) invert(1) brightness(.2) }
:root[data-theme="dark"] .logos img { filter: grayscale(1) invert(1) brightness(1.4) }
:root[data-theme="dark"] .logos img.inv { filter: grayscale(1) brightness(1.4) }
.logos .tip:hover img { opacity: 1 }
.tip-box { position: absolute; bottom: calc(100% + 14px); left: 50%; translate: -50% 6px; opacity: 0; pointer-events: none; white-space: nowrap; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.35; text-align: center; transition: opacity .3s, translate .5s var(--ease) }
.tip-box small { display: block; font-family: var(--f-mono); font-size: 10.5px; opacity: .6; letter-spacing: .04em }
.tip:hover .tip-box, .tip:focus-visible .tip-box { opacity: 1; translate: -50% 0 }
.tip.dismissed .tip-box { opacity: 0 !important }
.logos .tip:focus-visible img { opacity: 1 }

/* ═════════════════════ Featured ═════════════════════ */
.feature { padding-top: clamp(96px, 12vw, 180px) }
.sec-label { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; margin-bottom: clamp(28px, 4vw, 48px); position: relative }
.sec-label::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease-io) .1s }
.sec-label.in::after { transform: none }
.feature-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 96px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px) }
.feature h2 { margin: 0; font: 500 clamp(34px, 4.6vw, 76px)/.98 var(--f-display); letter-spacing: -.045em }
.feature p { margin: 0 0 28px; color: var(--muted); font-size: clamp(15px, 1.15vw, 17px); max-width: 52ch }
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px }
.cred { --a: 0deg; position: relative; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; isolation: isolate }
.cred::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; background: conic-gradient(from var(--a), var(--rule) 0 60%, var(--accent) 80%, var(--rule) 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 4.5s var(--ease-io) 1 paused }
.cred:hover::before { animation: spin 4.5s var(--ease-io) 1 running }
.cred.in::before { animation-play-state: running }
.cred:nth-child(2)::before { animation-delay: -3s }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg }
@keyframes spin { to { --a: 360deg } }
.cred .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2) }
.cred .ic img { width: 22px; height: 22px; filter: brightness(0) }
:root[data-theme="dark"] .cred .ic img { filter: brightness(0) invert(1) }
.cred .ic svg { width: 20px; height: 20px; color: var(--accent) }
.cred .mono { color: var(--accent); font-size: 10.5px; display: block; margin-bottom: 2px }
.cred b { font-weight: 500; font-size: 14.5px; line-height: 1.3; display: block }

.feature-media { display: block; overflow: hidden; transform: scale(var(--fs, .9)); transform-origin: 50% 0; border-radius: 28px; transition: border-radius .6s var(--ease); will-change: transform }
.feature-media.full { border-radius: 0 }
.feature-media .frame { aspect-ratio: 16 / 7.2; overflow: hidden; position: relative }
.feature-media img { position: absolute; left: 0; top: -9%; width: 100%; height: 118%; object-fit: cover; transform: translate3d(0, var(--py, 0px), 0) scale(1.06); will-change: transform }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted) }

/* ═════════════════════ Work grid ═════════════════════ */
.work { padding-top: clamp(110px, 14vw, 220px) }
.work h2.big { margin: 0; font: 500 clamp(40px, 6.4vw, 104px)/.95 var(--f-display); letter-spacing: -.05em }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(56px, 6vw, 96px) clamp(16px, 2vw, 32px); margin-top: clamp(40px, 6vw, 88px) }
.grid .card:nth-child(even) { margin-top: clamp(0px, 10vw, 160px) }
.card { display: block; position: relative }
.card .skew { transform: skewY(var(--sk, 0deg)); will-change: transform }
.card .media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); aspect-ratio: 1 / 1; transform: translate3d(0, 0, 0); clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1.25s var(--ease-io), opacity .5s }
.card.in .media { clip-path: inset(0 0 0 0 round var(--radius)) }
.card .media img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; transform: translate3d(0, var(--py, 0px), 0) scale(1.22); transition: transform 1.4s var(--ease) }
.card.in .media img { transform: translate3d(0, var(--py, 0px), 0) scale(1.02) }
.card:hover .media img { transform: translate3d(0, var(--py, 0px), 0) scale(1.08); transition-duration: .9s }
.card .media.logo { background: #fff }
.card .media.logo img { object-fit: contain; padding: 0 20%; top: 0; height: 100% }
.card .media .badge { position: absolute; left: 14px; top: 14px; z-index: 2; height: 28px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--bg); color: var(--ink) }
.card .body { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin-top: 22px }
.card .num { padding-top: 6px; color: var(--muted) }
.card h3 { margin: 0; font: 500 clamp(22px, 2vw, 30px)/1.1 var(--f-display); letter-spacing: -.03em; transition: color .4s }
.card p { grid-column: 2; margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 46ch }
.card .tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px }
.card .tags .tag { height: 24px; font-size: 10px }
.card .body > * { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .9s var(--ease) .3s, transform 1s var(--ease) .3s }
.card.in .body > * { opacity: 1; transform: none }
@media (hover: hover) {
  .grid:hover .card:not(:hover) .media { opacity: .45 }
  .card:hover h3 { color: var(--accent) }
  .card .media { cursor: none }
}

/* ═════════════════════ Capabilities ═════════════════════ */
.caps { padding-top: clamp(120px, 14vw, 220px) }
.statement { margin: 0 0 clamp(64px, 8vw, 120px); font: 500 clamp(28px, 3.6vw, 58px)/1.12 var(--f-display); letter-spacing: -.035em; max-width: 26ch }
.statement .sw { color: var(--faint); transition: color .35s }
.statement .sw.on { color: var(--ink) }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 48px) }
.pillar { position: relative; padding-top: 24px }
.pillar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease-io) }
.pillar.in::before { transform: none }
.pillar .n { color: var(--accent) }
.pillar h3 { margin: 14px 0 18px; font: 500 24px/1.15 var(--f-display); letter-spacing: -.025em }
.pillar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.pillar li { position: relative; padding-left: 18px; color: var(--muted); font-size: 15px; line-height: 1.5 }
.pillar li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--accent) }

/* ═════════════════════ Contact + Journey ═════════════════════ */
.contact { margin-top: clamp(120px, 14vw, 220px); padding-top: clamp(80px, 10vw, 140px); padding-bottom: calc(20px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); border-radius: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) 0 0; overflow: hidden }
.contact .muted { color: color-mix(in srgb, var(--bg) 66%, var(--ink)) }
.contact h2 { margin: 0 0 clamp(36px, 4vw, 56px); font: 500 clamp(38px, 6.2vw, 104px)/.97 var(--f-display); letter-spacing: -.05em; max-width: 15ch }
.contact h2 em > .w > span { font-style: normal; color: var(--accent) }
:root[data-theme="light"] .contact h2 em > .w > span { color: #8b97ff }
:root[data-theme="dark"] .contact h2 em > .w > span { color: #2a3cf4 }
.contact h2 em { font-style: normal }
.contact .btn { background: var(--bg); color: var(--ink) }
.contact .btn.ghost { background: transparent; color: var(--bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bg) 25%, var(--ink)) }
.contact .btn.ghost:hover { color: var(--accent-ink) }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px }

.journey { margin-top: clamp(80px, 10vw, 140px); padding-top: 28px; border-top: 1px solid color-mix(in srgb, var(--bg) 14%, var(--ink)) }
.journey-head { display: flex; justify-content: space-between; margin-bottom: 36px }
.track { position: relative; display: grid; grid-template-columns: repeat(3, 1fr) }
.track-line { position: absolute; left: 5px; right: 5px; top: 63px; height: 1px; background: color-mix(in srgb, var(--bg) 14%, var(--ink)) }
.track-line i { position: absolute; inset: 0; background: var(--bg); transform-origin: left; transform: scaleX(var(--jp, 0)) }
.plane { position: absolute; top: -9px; left: 0; width: 18px; height: 18px; color: var(--bg); transform: translateX(calc(var(--jp, 0) * (var(--tw, 0) * 1px) - 9px)); opacity: calc(1 - var(--jd, 0)); transition: opacity .4s }
.stop { position: relative; display: flex; flex-direction: column; align-items: flex-start }
.stop:nth-child(3) { align-items: center; text-align: center }
.stop:nth-child(4) { align-items: flex-end; text-align: right }
.stop svg.lm { width: 40px; height: 40px; color: var(--bg); opacity: .3; transform: translate3d(0, 10px, 0) scale(.9); transition: opacity .6s, transform .9s var(--ease-spring) }
.stop.on svg.lm { opacity: 1; transform: none }
.stop .pin { position: relative; z-index: 1; margin: 14px 0 18px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bg) 30%, var(--ink)); transition: background .5s, box-shadow .5s, transform .6s var(--ease-spring) }
.stop.on .pin { background: var(--bg); transform: scale(1.15) }
.stop.now.on .pin { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent) }
.stop b { display: block; font: 500 clamp(18px, 1.8vw, 24px)/1.1 var(--f-display); letter-spacing: -.02em }
.stop span { display: block; margin-top: 6px }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: clamp(64px, 8vw, 110px); padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--bg) 14%, var(--ink)) }
.made { position: relative; display: inline-flex; align-items: center }
.heart { width: 44px; height: 44px; margin: -14px -8px -14px -2px; background: url(/web_heart_animation.png) no-repeat 0 0 / 2900% 100% }
.heart.play { animation: heart .8s steps(28) forwards }
@keyframes heart { to { background-position: 100% 0 } }

/* ═════════════════════ Cursor + wipe ═════════════════════ */


/* ═════════════════════ Responsive ═════════════════════ */
@media (max-width: 900px) {
  .feature-top { grid-template-columns: 1fr }
  .pillars { grid-template-columns: 1fr }
}
@media (max-width: 760px) {
  .nav, .lang, .hdr .btn { display: none }
  .menu-btn { display: grid }
  .hdr { padding: 10px 12px }
  .hdr-in { gap: 8px; height: 50px; padding-left: 8px }
  .hdr.float .hdr-in { padding: 0 5px 0 16px }
  .hero-foot { grid-template-columns: 1fr }
  .meta { flex-wrap: wrap }
  .logos { flex-wrap: wrap; gap: 20px }
  .logos .mono { width: 100% }
  .creds { grid-template-columns: 1fr }
  .feature-media { border-radius: 18px }
  .feature-media .frame { aspect-ratio: 4 / 3 }
  .grid { grid-template-columns: 1fr; gap: 56px }
  .grid .card:nth-child(even) { margin-top: 0 }
  .track-line { top: 51px }
  .stop svg.lm { width: 30px; height: 30px }
  .stop b { font-size: 17px }
  .stop span { font-size: 9.5px; letter-spacing: .04em }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important }
  .w > span, .fade, .card .body > * { transform: none !important; opacity: 1 !important }
  .card .media { clip-path: none !important }
  .intro { display: none }
}

/* ═════════════════════ Long words (German) and small screens ═════════════════════ */
.hero h1, .feature h2, .work h2.big, .contact h2, .statement, .card h3, .pillar h3 { overflow-wrap: break-word }
.contact .btn { max-width: 100% }
.tip-box { max-width: min(280px, 80vw); white-space: normal; width: max-content }
@media (max-width: 760px) {
  .contact .btn.lg { white-space: normal; height: auto; min-height: 56px; padding-top: 14px; padding-bottom: 14px; line-height: 1.25 }
  .contact .btn .roll { white-space: normal }
  .mnav li a { font-size: clamp(26px, 8vw, 34px) }
  .logos { row-gap: 16px }
  .tip-box { left: 0; translate: 0 6px }
  .tip:hover .tip-box, .tip:focus-visible .tip-box { translate: 0 0 }
  .logos .tip:last-child .tip-box { left: auto; right: 0 }
}

/* ═════════════════════ Current employer ═════════════════════ */
.logos img.wide { height: 20px }
.tip-now { padding-right: 12px }
.tip-now::after { content: ""; position: absolute; right: 0; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent) }
.logos .tip-now img { opacity: .85 }
.tip-box .now { display: inline-block; margin: 0 0 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-on-night); color: #0b0b0c; font-size: 9.5px; letter-spacing: .1em }
:root[data-theme="dark"] .tip-box .now { background: var(--accent); color: var(--accent-ink) }
.tip-box b { display: block; font-weight: 500 }
/* Rightmost tooltip opens to the left so it never leaves the screen */
.logos .tip:last-child .tip-box { left: auto; right: -8px; translate: 0 6px }
.logos .tip:last-child:hover .tip-box, .logos .tip:last-child:focus-visible .tip-box { translate: 0 0 }

/* ═════════════════════ German: longer sentences, same rhythm ═════════════════════ */
:lang(de) .hero h1 { font-size: clamp(40px, 6.4vw, 106px); max-width: 17ch }
:lang(de) .feature h2 { font-size: clamp(30px, 3.5vw, 58px); line-height: 1.02 }
:lang(de) .contact h2 { font-size: clamp(34px, 4.8vw, 80px); max-width: 19ch }
:lang(de) .work h2.big { font-size: clamp(36px, 5.6vw, 92px) }
:lang(de) .statement { max-width: 30ch }
@media (max-width: 760px) {
  :lang(de) .hero h1 { font-size: clamp(36px, 10.5vw, 56px) }
  :lang(de) .contact h2 { font-size: clamp(30px, 9vw, 48px) }
}

/* Mobile: tooltips anchor to the logo row, so none can leave the screen */
.hero { overflow-x: clip }
@media (max-width: 760px) {
  .logos { position: relative }
  .logos .tip { position: static }
  .logos .tip .tip-box,
  .logos .tip:last-child .tip-box { left: 0; right: auto; bottom: calc(100% + 10px); translate: 0 6px; max-width: 100% }
  .logos .tip:hover .tip-box,
  .logos .tip:focus-visible .tip-box,
  .logos .tip:last-child:hover .tip-box,
  .logos .tip:last-child:focus-visible .tip-box { translate: 0 0 }
}
/* Very small phones (≤340px) */
.grid > *, .card .body > * { min-width: 0 }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
@media (max-width: 760px) { .grid { grid-template-columns: minmax(0, 1fr) } }
.made { flex-wrap: wrap }

/* Published-paper credential doubles as the link to the PDF */
.cred-link { color: inherit; text-decoration: none; transition: transform .5s var(--ease), box-shadow .5s var(--ease) }
.cred-link:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 0 1px var(--accent) }
.cred-cta { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--accent) }
.cred-cta > span[aria-hidden] { display: inline-block; transition: transform .5s var(--ease) }
.cred-link:hover .cred-cta > span[aria-hidden] { transform: translate(2px, -2px) }
.cred-meta { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase }
/* Keep the "current role" dot attached to the Cerence logo on mobile
   (it's the first logo, so its left-anchored tooltip still fits) */
@media (max-width: 760px) { .logos .tip-now { position: relative } }

/* ═════════════════════ Wordmark: "Akshil Shah" folds into "AS" in the floating header ═════════════════════ */
.bn { display: inline-flex; align-items: baseline }
.bl { display: inline-block; transition: transform .6s var(--ease-spring) }
/* --w is measured in home.js so the fold animates to the exact width */
.bx { display: inline-block; overflow: hidden; white-space: pre; vertical-align: bottom; max-width: var(--w, 3em); transition: max-width .7s var(--ease), opacity .45s var(--ease) }
.bx > span { display: inline-block; padding-right: .04em }
.hdr.float .brand:not(:hover):not(:focus-visible) .bx { max-width: 0; opacity: 0 }
.hdr.float .brand:not(:hover):not(:focus-visible) .bn { letter-spacing: .02em }
/* while unfolding, the initials lift in a little wave */
.hdr.float .brand:hover .bl:first-child, .hdr.float .brand:focus-visible .bl:first-child { transform: translateY(-2px) }
.hdr.float .brand:hover .bl:nth-child(4), .hdr.float .brand:focus-visible .bl:nth-child(4) { transform: translateY(-2px); transition-delay: .06s }
@media (prefers-reduced-motion: reduce) { .bx, .bl { transition: none } }
