:root {
  --ink: #f1f0ed;
  --muted: #aaa8a1;
  --black: #050505;
  --lime: #d5ff40;
  --line: rgba(255, 255, 255, .16);
  font-family: Manrope, Arial, sans-serif;
  color: var(--ink);
  background: var(--black);
}

* { box-sizing: border-box; }
html { background: var(--black); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--black); }
a { color: inherit; text-decoration: none; }

.grain { display: none; }

.site-header { position: absolute; z-index: 10; top: 0; left: 0; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 24px 30px; font: 500 10px/1 "DM Mono", monospace; letter-spacing: .06em; }
.monogram { letter-spacing: -.08em; font: 700 16px/1 Manrope, sans-serif; }
.index { color: var(--muted); margin: 0 0 0 7.8rem; }
.menu-link { display: flex; gap: .8rem; align-items: center; transition: color .25s; }
.menu-link:hover { color: var(--lime); }
.menu-link span { font-size: 14px; }

.hero { min-height: 100svh; height: 100svh; overflow: hidden; position: relative; isolation: isolate; background: #000; }
#tubes { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 58% 35% at 50% 49%, rgba(0, 0, 0, .04), transparent 68%); }
.fade-curtain { position: absolute; z-index: 6; inset: 0; pointer-events: none; opacity: 0; background: #000; transition: opacity 1s ease; }
.retained-letter-layer { position: absolute; z-index: 7; inset: 0; pointer-events: none; }
.retained-letter { position: fixed; left: var(--letter-x, 0); top: var(--letter-y, 0); margin: 0; color: var(--letter-color, #f1f0ed); font: var(--letter-font, inherit); letter-spacing: var(--letter-spacing, normal); opacity: 0; transform: translate(-50%, -50%); }
.h-construction { position: fixed; z-index: 8; left: 52.5%; top: 45%; width: min(29vw, 600px); aspect-ratio: 600 / 325; pointer-events: none; transform: translate(-50%, -50%); }
.h-stroke { position: absolute; display: block; background: #f7f7f5; opacity: 0; }
.h-stroke-left { left: 3%; top: 4%; width: 28%; height: 92%; clip-path: polygon(54% 0,100% 0,44% 100%,0 100%); }
.h-stroke-bridge { left: 29%; top: 34%; width: 38%; height: 26%; clip-path: polygon(16% 0,100% 0,78% 100%,0 100%); }
.h-stroke-right { left: 57%; top: 4%; width: 29%; height: 80%; clip-path: polygon(48% 0,100% 0,42% 100%,0 100%); }
.transition-logo { position: fixed; z-index: 9; left: 52.5%; top: 45%; width: min(29vw, 600px); overflow: visible; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.8); }
.logo-shape { fill: #f7f7f5; }
.transition-video { position: fixed; z-index: 10; top: 0; left: 0; width: 3840px; height: 2160px; max-width: none; max-height: none; object-fit: fill; transform-origin: 0 0; transform: translate(var(--transition-x, 0px), var(--transition-y, 0px)) scale(var(--transition-scale, 1)); pointer-events: none; visibility: hidden; opacity: 0; background: #000; }
body.is-video-playing .transition-video { visibility: visible; opacity: 1; }
body.is-video-warming .transition-video { visibility: visible; opacity: 0; }
body.is-video-ending .transition-video { opacity: 0; transition: opacity .72s cubic-bezier(.22,.61,.36,1); }
/* The previous CSS logo construction remains as a playback fallback only. Keep it
   fully suppressed while the real video is visible, including its final fade. */
body.is-video-playing .retained-letter, body.is-video-playing .h-construction, body.is-video-playing .transition-logo { opacity: 0 !important; animation: none !important; }
/* Keep the original H and S in place through the black fade. Replacing them with
   positioned copies was the source of the mobile hand-off jump. */
body.is-fading .hero-copy { z-index: 7; }
body.is-fading .title-letter:not(.letter-h):not(.letter-s), body.is-fading .manifesto { opacity: 0; transition: opacity .75s ease; }
body.is-fading .retained-letter { opacity: 0 !important; animation: none !important; }
body.is-video-playing .hero-copy { opacity: 0; }
.hero-copy { position: absolute; z-index: 2; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(100% - 60px, 1100px); text-align: center; pointer-events: none; }
.eyebrow { margin: 0 0 17px; color: var(--muted); font: 500 10px/1.35 "DM Mono", monospace; letter-spacing: .08em; }
.hero h1 { margin: 0; font-size: clamp(4.4rem, 13.65vw, 13.7rem); font-weight: 700; line-height: .75; letter-spacing: -.1em; text-align: center; }
.hero h1 > span { display: block; }
.hero h1 > span:last-child { margin-left: .16em; color: rgba(241,240,237,.95); -webkit-text-stroke: 0; }
.manifesto { margin: clamp(32px, 5vw, 62px) 0 0; text-align: center; font: 500 clamp(12px, 1.05vw, 15px)/1.15 "DM Mono", monospace; letter-spacing: -.05em; }
.racetrack { z-index: 3; position: absolute; bottom: 8vh; left: 50%; translate: -50% 0; width: min(43vw, 500px); height: clamp(76px, 8.7vw, 116px); border: 1px solid rgba(255,255,255,.31); border-radius: 100%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg, rgba(255,255,255,.23), rgba(255,255,255,.06) 48%, rgba(255,255,255,.13)); box-shadow: inset 0 1px 1px rgba(255,255,255,.32), inset 0 -1px 1px rgba(0,0,0,.48), 0 18px 45px rgba(0,0,0,.36); backdrop-filter: blur(14px) saturate(.75); -webkit-backdrop-filter: blur(14px) saturate(.75); transition: transform .4s cubic-bezier(.16,1,.3,1), background .4s, border .4s; }
.racetrack:hover { transform: scale(1.045); border-color: rgba(255,255,255,.78); background: linear-gradient(140deg, rgba(255,255,255,.31), rgba(255,255,255,.1) 48%, rgba(255,255,255,.18)); }
.track-word { position: absolute; white-space: nowrap; color: rgba(255,255,255,.48); font: 500 clamp(9px,.9vw,12px)/1 "DM Mono", monospace; letter-spacing: .18em; animation: marquee 10s linear infinite; }
.track-word.top { top: 12%; left: 0; }.track-word.bottom { bottom: 12%; right: 0; animation-direction: reverse; }
.track-label { text-align: center; font: 500 10px/1.2 "DM Mono", monospace; letter-spacing: .09em; }
@keyframes marquee { to { transform: translateX(-28%); } }

.portfolio-page { min-height: 100svh; overflow-x: hidden; background: radial-gradient(circle at 50% -10%, #1c1d1c 0, #070707 42%, #050505 85%); }
.portfolio-header { position: relative; }.portfolio-main { max-width: 1440px; margin: auto; padding: 13vh 30px 40px; }
.portfolio-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: clamp(40px, 7vw, 100px); align-items: end; }.portfolio-intro .eyebrow { grid-column: 1 / -1; }
.portfolio-intro h1 { margin: 0; font-size: clamp(3rem, 9vw, 9rem); font-weight: 700; line-height: .78; letter-spacing: -.095em; }.portfolio-intro h1 span { color: var(--lime); }
.portfolio-intro > p:last-child { max-width: 280px; margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.glass-card { position: relative; min-height: clamp(230px, 27vw, 390px); padding: 24px; display: flex; justify-content: space-between; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.04) 45%, rgba(255,255,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 20px 48px rgba(0,0,0,.25); backdrop-filter: blur(19px); -webkit-backdrop-filter: blur(19px); transition: transform .45s cubic-bezier(.16,1,.3,1), border .3s; }
.glass-card::before { content: ""; position: absolute; width: 80%; aspect-ratio: 1; right: -20%; top: -25%; border-radius: 50%; filter: blur(8px); opacity: .86; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.glass-card:hover { transform: translateY(-7px); border-color: rgba(255,255,255,.55); }.glass-card:hover::before { transform: scale(1.18) translate(-9%, 10%); }
.product::before { background: radial-gradient(circle, #cf6e48, transparent 64%); }.brand::before { background: radial-gradient(circle, #c2d1ff, transparent 64%); }.concept::before { background: radial-gradient(circle, #b7fb57, transparent 64%); }.photography::before { background: radial-gradient(circle, #ff7eac, transparent 64%); }
.card-number, .glass-card div, .card-arrow { position: relative; z-index: 1; }.card-number, .glass-card div p { font: 500 10px/1 "DM Mono", monospace; letter-spacing: .08em; }.card-number { color: var(--muted); }.glass-card div p { color: var(--muted); margin: 0 0 12px; }.glass-card h2 { margin: 0; font-size: clamp(1.9rem, 4.3vw, 4.6rem); font-weight: 600; letter-spacing: -.08em; line-height: .83; }.card-arrow { align-self: flex-end; font-size: 28px; color: var(--lime); }

@media (max-width: 680px) { .site-header { padding: 20px; }.index { margin-left: 0; }.hero-copy { width: calc(100% - 40px); top: 44%; }.hero h1 { font-size: clamp(4rem, 20vw, 6rem); line-height: .79; }.manifesto { margin-top: 35px; }.racetrack { width: 84vw; height: 86px; bottom: 9vh; }.portfolio-main { padding: 8vh 20px 20px; }.portfolio-intro { grid-template-columns: 1fr; }.portfolio-intro > p:last-child { margin-top: 12px; }.category-grid { grid-template-columns: 1fr; gap: 10px; }.glass-card { min-height: 220px; padding: 20px; } }
@media (min-width: 681px) { .home .hero { width: 100%; min-height: 0; height: auto; aspect-ratio: 16 / 9; } }

/* Refined home composition */
.home .hero-copy { top: 45%; }
.home .hero h1 { font-size: clamp(4rem, 9.2vw, 9.2rem); line-height: .72; letter-spacing: -.09em; }
.home .hero h1 > span:first-child { font-weight: 800; font-size: .79em; letter-spacing: -.035em; }
.home .hero h1 > span:last-child { margin: .12em 0 0; color: rgba(241,240,237,.9); font-size: .64em; font-weight: 400; letter-spacing: -.07em; }
.home .manifesto { margin-top: clamp(36px, 4.2vw, 58px); color: rgba(241,240,237,.82); font-weight: 400; }
.manifesto-line { display: block; margin-top: .08em; }
.home .racetrack { top: 66%; bottom: auto; width: min(15vw, 170px); height: 50px; border-radius: 999px; border: 1px solid rgba(181,181,181,.68); background: transparent; box-shadow: none; color: rgba(255,255,255,.8); font: 500 12px/1 Manrope, sans-serif; letter-spacing: .01em; text-align: center; isolation: isolate; transition: transform .45s cubic-bezier(.16,1,.3,1), border-color .45s ease; }
.home .racetrack::before { content: ""; position: absolute; z-index: 0; inset: -1px; display: block; border-radius: inherit; pointer-events: none; opacity: 0; background: linear-gradient(145deg, rgba(238,244,249,.21), rgba(135,149,163,.13) 54%, rgba(221,229,236,.17)); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 -1px 0 rgba(24,31,39,.18), 0 8px 24px rgba(0,0,0,.22); backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15); transition: opacity .45s ease; }
.home .racetrack .cta-label { position: relative; z-index: 1; }
.home .racetrack:hover, .home .racetrack:focus-visible { transform: scale(1.025); border-color: rgba(224,228,232,.7); outline: none; }
.home .racetrack:hover::before, .home .racetrack:focus-visible::before { opacity: 1; }

/* First phase of the page transition: a black curtain fades over every home element except H + S. */
body.is-fading .fade-curtain { opacity: 1; }
body.is-fading .retained-letter { opacity: 1; }
body.is-fading .retained-h { animation: converge-h .7s cubic-bezier(.16,1,.3,1) 1.3s forwards; }
body.is-fading .retained-s { animation: converge-s 1.1s cubic-bezier(.16,1,.3,1) 1.3s forwards; }
body.is-fading .h-stroke-left { animation: build-h-left .9s cubic-bezier(.16,1,.3,1) 1.42s forwards; }
body.is-fading .h-stroke-bridge { animation: build-h-bridge .86s cubic-bezier(.16,1,.3,1) 1.54s forwards; }
body.is-fading .h-stroke-right { animation: build-h-right .9s cubic-bezier(.16,1,.3,1) 1.48s forwards; }
body.is-fading .h-construction { animation: construction-fade .6s ease 2.45s forwards; }
body.is-fading .transition-logo { animation: logo-form-and-leave 2.2s cubic-bezier(.16,1,.3,1) 2.15s forwards; }
@keyframes converge-h { 0% { left: var(--letter-x); top: var(--letter-y); opacity: 1; transform: translate(-50%,-50%) scale(1); } 72% { left: calc(52.5% - min(5vw, 52px)); top: 43.5%; opacity: 1; transform: translate(-50%,-50%) scale(.78) skewX(-13deg); } 100% { left: calc(52.5% - min(4vw, 42px)); top: 44%; opacity: 0; transform: translate(-50%,-50%) scale(.45) skewX(-17deg); } }
@keyframes converge-s { 0% { left: var(--letter-x); top: var(--letter-y); opacity: 1; transform: translate(-50%,-50%) scale(1); } 76% { left: calc(52.5% + min(7vw, 68px)); top: 48%; opacity: 1; transform: translate(-50%,-50%) scale(.72) skewX(-14deg); } 100% { left: calc(52.5% + min(6vw, 60px)); top: 48%; opacity: 0; transform: translate(-50%,-50%) scale(.48) skewX(-18deg); } }
@keyframes build-h-left { 0% { opacity: 0; transform: translate(-64%, 35%) rotate(17deg) scale(.18); } 28% { opacity: 1; } 100% { opacity: 1; transform: translate(0,0) rotate(0) scale(1); } }
@keyframes build-h-bridge { 0% { opacity: 0; transform: translate(-20%, 0) scaleX(.08); } 35% { opacity: 1; } 100% { opacity: 1; transform: translate(0,0) scaleX(1); } }
@keyframes build-h-right { 0% { opacity: 0; transform: translate(64%, -35%) rotate(-17deg) scale(.18); } 28% { opacity: 1; } 100% { opacity: 1; transform: translate(0,0) rotate(0) scale(1); } }
@keyframes construction-fade { to { opacity: 0; } }
@keyframes logo-form-and-leave { 0%, 10% { opacity: 0; transform: translate(-50%,-50%) scale(.94); } 34% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 64% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.025); } }

/* Minimal portfolio index */
.portfolio-page { position: relative; isolation: isolate; background: #000; }
.portfolio-page::before { content: ""; position: fixed; z-index: 0; inset: 0; pointer-events: none; background: radial-gradient(ellipse 72% 54% at 50% 42%, rgba(43,53,64,.17), transparent 72%); }
.portfolio-page .grain { z-index: 0; opacity: .07; }
.portfolio-page.page-enter .portfolio-main, .portfolio-page.page-enter .grain { opacity: 0; transition: opacity .9s ease; }
.portfolio-page.page-enter.is-ready .portfolio-main, .portfolio-page.page-enter.is-ready .grain { opacity: 1; }
.portfolio-page .portfolio-main { position: relative; z-index: 1; max-width: none; min-height: 100svh; padding: 0; }
.home-link { position: absolute; z-index: 4; top: 11px; left: 23px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.home-logo { display: block; width: 31px; height: auto; opacity: .9; transition: opacity .25s ease; }
.home-link:hover .home-logo, .home-link:focus-visible .home-logo { opacity: 1; }
.portfolio-page .category-grid { min-height: 100svh; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 76px 10px 10px; }
.portfolio-page .glass-card { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px; border: 1px solid rgba(236,242,247,.22); border-radius: 2px; background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(174,189,203,.045) 52%, rgba(255,255,255,.075)); box-shadow: inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(13,19,25,.28), 0 14px 34px rgba(0,0,0,.18); backdrop-filter: blur(24px) saturate(1.08); -webkit-backdrop-filter: blur(24px) saturate(1.08); }
.portfolio-page .glass-card::before { display: none; }
.portfolio-page .glass-card:hover { transform: none; border-color: rgba(245,248,250,.42); background: linear-gradient(135deg, rgba(255,255,255,.17), rgba(185,200,214,.07) 52%, rgba(255,255,255,.11)); }
.portfolio-page .glass-card h2 { position: relative; z-index: 1; margin: 0; width: 100%; text-align: center; color: rgba(255,255,255,.92); font-size: clamp(2rem, 4.8vw, 5rem); font-weight: 500; letter-spacing: -.08em; line-height: .85; }
@media (max-width: 680px) {
  .home .hero h1 { font-size: clamp(3.6rem, 15.5vw, 5.2rem); }
  .home .racetrack { width: min(48vw, 170px); height: 50px; top: 72%; bottom: auto; }
  .portfolio-page .category-grid { grid-template-columns: 1fr; min-height: 100svh; padding: 65px 10px 10px; }
  .portfolio-page .glass-card { min-height: 42svh; }
  .home-link { top: 6px; left: 14px; }
}

/* Touch layouts use a full crossfade: the black curtain covers the complete
   home page while the held first frame of the transition video fades in. */
@media (pointer: coarse) {
  .home .hero { min-height: 100svh; height: 100svh; aspect-ratio: auto; }
  .transition-video, .home .hero-copy { will-change: opacity; }
  /* The transition source is a landscape video. Screen blending makes its
     compressed black pixels merge into the page black on portrait devices,
     leaving only the bright logo animation visible. */
  .transition-video { mix-blend-mode: screen; }
  body.is-fading .fade-curtain { transition-duration: 1.3s; }
  body.is-fading .hero-copy { opacity: 0; transition: opacity 1.3s ease; }
  body.is-fading .title-letter:not(.letter-h):not(.letter-s),
  body.is-fading .manifesto { transition-duration: 1.3s; }
  body.is-video-playing:not(.is-video-ending) .transition-video { transition: opacity 1.3s ease; }
}

/* An iPad in portrait is taller than a desktop 16:9 canvas. Use the mobile
   full-height composition so the interactive background fills the screen. */
@media (pointer: coarse) and (orientation: portrait) {
  .home .hero-copy { width: calc(100% - 40px); top: 45%; }
  .home .hero h1 { font-size: clamp(3.6rem, 15.5vw, 5.2rem); }
  .home .racetrack { width: min(48vw, 170px); height: 50px; top: 72%; bottom: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
