/* Scene distances and native timeline ranges are shared across both routes. */
:root {
  --continuum-rise: clamp(.45rem, 2vw, 1.85rem);
  --continuum-entry: entry 0% cover 42%;
  --continuum-ease: cubic-bezier(.22,.72,.2,1);
  --continuum-passage: 280ms;
}
[data-cinematic="company"] .hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
}
.architecture {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-end: 0;
  width: 32%;
  overflow: hidden;
  pointer-events: none;
}
.architecture::before, .architecture::after {
  content: "";
  position: absolute;
  inset: -20% 20% -20% 10%;
  border: 1px solid var(--line);
  background: linear-gradient(105deg, transparent, color-mix(in srgb, currentColor 9%, transparent) 72%, transparent);
  transform: skew(-17deg);
}
.architecture::after { inset-inline: 64% -6%; }
.ecosystem {
  background: linear-gradient(115deg, var(--bg), var(--panel) 65%, var(--bg));
  padding-inline: clamp(1rem, 3vw, 3rem);
}
@media (max-width:700px) {
  .architecture { width: 22%; opacity: .55; }
}
@keyframes continuum-rise { from { translate: 0 var(--continuum-rise); opacity: .83; } }
@keyframes continuum-mask { from { clip-path: inset(3% 2% 0); } to { clip-path: inset(0); } }
@keyframes continuum-device { from { transform: perspective(70rem) rotateX(5deg) scale(.94); } }
@keyframes continuum-shift { from { background-color: transparent; } to { background-color: color-mix(in srgb, currentColor 4%, transparent); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion:no-preference) {
    .capabilities > div, .mission p, .ecosystem h2, [data-cinematic] footer h2 {
      animation: continuum-rise linear both;
      animation-timeline: view();
      animation-range: var(--continuum-entry);
    }
    .portrait img {
      animation: continuum-mask linear both;
      animation-timeline: view();
      animation-range: var(--continuum-entry);
    }
    .mission {
      animation: continuum-shift linear both;
      animation-timeline: view();
      animation-range: var(--continuum-entry);
    }
  }
}
@media (min-width:1000px) and (min-height:680px) and (prefers-reduced-motion:no-preference) {
  .founder-frame { position: sticky; top: 6rem; align-self: start; }
  .founder-frame img { max-height: calc(100svh - 7rem); object-fit: contain; }
}
/* The narrow pane is captured only during paired navigations. */
html[data-passage] body::after {
  content: "";
  position: fixed;
  inset: -15vh auto -15vh 42%;
  width: 16vw;
  z-index: 10000;
  pointer-events: none;
  transform: skew(-15deg);
  border-inline: 1px solid #8887;
  background: linear-gradient(100deg, #7771, #bbb5, #8882);
  view-transition-name: passage-pane;
}
@keyframes passage-pane { from { translate: -75vw 0; } to { translate: 75vw 0; } }
@media (prefers-reduced-motion:no-preference) {
  html[data-passage]::view-transition-group(*) { animation-duration: var(--continuum-passage); }
  html[data-passage]::view-transition-group(passage-pane) { z-index: 2; }
  html[data-passage]::view-transition-old(passage-pane) { opacity: 0; }
  html[data-passage]::view-transition-new(passage-pane) {
    animation: passage-pane var(--continuum-passage) var(--continuum-ease) both;
  }
  html[data-passage="reverse"]::view-transition-new(passage-pane) { animation-direction: reverse; }
}

/* Keep editorial copy readable at every point in the existing reveal. */
.js-motion [data-cinematic="founder"] .reveal { opacity: 1; }
@media screen and (scripting: enabled) {
  html:not(.js-ready) [data-cinematic="founder"] .site-head { position: fixed; }
}
[data-cinematic="founder"] .practice-section {
  position: relative;
  isolation: isolate;
}
[data-cinematic="founder"] .practice-section::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(117deg, transparent 30%, var(--soft) 68%, transparent 68.2%);
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .practice-section::before {
      animation: continuum-mask linear both;
      animation-timeline: --founder;
      animation-range: entry 0% cover 65%;
    }
  }
}

@font-face {
  font-family: "Founder Inter";
  src: url("inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
.identity-sequence {
  --paper: #fafafa;
  --type: #131313;
  --edge: clamp(1.25rem, 6vw, 7rem);
  background: var(--paper);
  color: var(--type);
  font-family: "Founder Inter", Inter, system-ui, sans-serif;
}
[data-theme="dark"] .identity-sequence { --paper: #000; --type: #fafafa; }
@media (prefers-color-scheme:dark) {
  html:not([data-theme]) .identity-sequence { --paper: #000; --type: #fafafa; }
}
.identity-stage {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: calc(var(--header-height,76px) + 5vh) var(--edge) 4rem;
}
.identity-copy { position: relative; z-index: 2; }
.identity-copy h1, .identity-expertise h2 {
  font: 620 clamp(3.3rem, 8.3vw, 10.5rem)/.94 "Founder Inter", Inter, system-ui, sans-serif;
  letter-spacing: -.077em;
  color: inherit;
  margin: 0;
  text-transform: none;
  text-align: left;
  max-width: none;
}
.identity-copy span, .identity-copy strong, .identity-expertise h2 span { display: block; }
.identity-copy strong { font-weight: 620; }
.identity-copy p, .identity-expertise p {
  margin: clamp(1rem, 3vh, 2rem) 0 0;
  font: 450 clamp(.96rem, 1.3vw, 1.3rem)/1.45 "Founder Inter", system-ui, sans-serif;
  max-width: 34ch;
  letter-spacing: -.02em;
}
.identity-portrait {
  margin: 2rem 0;
  width: min(100%, 33rem);
  overflow: hidden;
}
.identity-portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }
.identity-expertise h2 {
  font-size: clamp(2.5rem, 5.8vw, 6.2rem);
  text-transform: uppercase;
  letter-spacing: -.062em;
}
:lang(ar) .identity-expertise h2 { letter-spacing: normal; line-height: 1.2; text-align: right; }
.scroll-cue { display: none; }
.company-gateway { margin-block: 3rem; padding: clamp(1rem,4vw,3rem); background: linear-gradient(120deg,#181818,#343434 75%,#191919 75%); color: #fff; }
.company-gateway a { display: block; color: inherit; }
.company-gateway strong { display: block; font-size: clamp(2rem,6vw,5.2rem); line-height: 1.12; letter-spacing: -.055em; }
.company-gateway i { font-style: normal; }
.collection-shot { width: 100%; height: auto; aspect-ratio: 1.6; object-fit: cover; object-position: top; display: block; margin-bottom: .85rem; }
#projects summary { list-style-position: inside; }
@keyframes identity-type {
  0% { transform: translate(0,0) scale(1); }
  52% { transform: translate(-74%, -12vh) scale(.76); }
  100% { transform: translate(-155%, -18vh) scale(.58); }
}
@keyframes identity-image {
  from { transform: translate(0,0) scale(1); clip-path: inset(0); }
  to { transform: translate(var(--portrait-x),var(--portrait-y)) scale(var(--portrait-scale)); clip-path: inset(1% 5% 0 5%); }
}
@keyframes expertise-type {
  0% { transform: translate(var(--expertise-x),var(--expertise-y)) scale(.78); opacity: 0; }
  28% { opacity: 0; }
  69% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes cue-away { 0% { opacity: 1; } 20%,100% { opacity: 0; } }
@keyframes identity-wash { from { transform: translateX(105%) skewX(-15deg); } to { transform: translateX(-12%) skewX(-15deg); } }
@media (prefers-reduced-motion:no-preference) and (min-height:520px) {
  :is(.motion-ready,.native-motion) .identity-sequence {
    height: 210svh;
    view-timeline: --identity block;
    view-timeline-inset: 0;
    --portrait-x: -96%;
    --portrait-y: 4%;
    --portrait-scale: .88;
    --expertise-x: 70%;
    --expertise-y: 12vh;
  }
  :is(.motion-ready,.native-motion) .identity-stage {
    position: sticky; top: 0; height: 100svh;
    padding: 0;
  }
  :is(.motion-ready,.native-motion) .identity-stage::before {
    content: ""; position: absolute; inset: 0 -15% 0 30%; z-index: -1;
    background: linear-gradient(110deg,transparent 45%,color-mix(in srgb,var(--type) 5%,transparent) 45.15%,transparent 92%);
    animation-name: identity-wash;
  }
  :is(.motion-ready,.native-motion) .identity-copy { position: absolute; left: var(--edge); top: 32%; width: 50%; transform-origin: left center; animation-name: identity-type; }
  :is(.motion-ready,.native-motion) .identity-portrait {
    position: absolute; left: 53%; top: 19%; width: 45%; height: 81%; margin: 0;
    animation-name: identity-image;
  }
  :is(.motion-ready,.native-motion) .identity-expertise { position: absolute; left: 55%; right: 3%; top: 31%; animation-name: expertise-type; }
  :is(.motion-ready,.native-motion) .scroll-cue { display: block; position: absolute; bottom: 5%; left: var(--edge); font-size: 2rem; animation-name: cue-away; }
  .identity-sequence :is(.identity-copy,.identity-portrait,.identity-expertise,.scroll-cue), .identity-sequence .identity-stage::before {
    animation-duration: 1s; animation-fill-mode: both; animation-timing-function: linear;
  }
  .native-motion :is(.identity-copy,.identity-portrait,.identity-expertise,.scroll-cue), .native-motion .identity-stage::before {
    animation-timeline: --identity; animation-range: contain 0% contain 100%;
  }
  .motion-ready :is(.identity-copy,.identity-portrait,.identity-expertise,.scroll-cue), .motion-ready .identity-stage::before {
    animation-play-state: paused; animation-delay: var(--scene-time,0s);
  }
}
@media (max-width:700px) and (prefers-reduced-motion:no-preference) and (min-height:520px) {
  :is(.motion-ready,.native-motion) .identity-sequence {
    --portrait-x: -22%; --portrait-y: -64%; --portrait-scale: .72;
    --expertise-x: 20%; --expertise-y: 32vh;
  }
  :is(.motion-ready,.native-motion) .identity-copy { top: calc(var(--header-height,76px) + 3.5svh); width: 90%; }
  .identity-copy h1 { font-size: clamp(3.2rem,14vw,6rem); }
  :is(.motion-ready,.native-motion) .identity-portrait { left: 13%; width: 87%; height: 57%; top: 43%; }
  :is(.motion-ready,.native-motion) .identity-expertise { left: 26%; right: 4%; top: 65%; }
  .identity-expertise h2 { font-size: clamp(1.85rem,8.2vw,3.6rem); }
  .identity-expertise p { font-size: .91rem; }
}
@media (min-width:701px) {
  .identity-portrait img { object-position: center bottom; }
}
@keyframes enterprise-fold { to { transform: translateX(-58%) skew(18deg) scaleX(.6); } }
@keyframes enterprise-title { to { transform: translateY(12vh) scale(.79); } }

@media (prefers-reduced-motion: no-preference) {
  .company-motion-fallback .hero { min-height: 80svh; display: grid; align-content: center; }
  .company-motion-fallback .architecture { width: 43%; }
  .company-motion-fallback .architecture::before,
  .company-motion-fallback .architecture::after {
    animation: enterprise-fold 1s linear both paused;
    animation-delay: var(--enterprise-time, 0s);
  }
  .company-motion-fallback h1 {
    transform-origin: left;
    animation: enterprise-title 1s linear both paused;
    animation-delay: var(--enterprise-time, 0s);
  }
}
@supports (animation-timeline: view()) and (animation-range: exit 0% exit 100%) {
  @media (prefers-reduced-motion: no-preference) {
    [data-cinematic="company"] .hero {
      min-height: 80svh;
      display: grid;
      align-content: center;
      view-timeline-name: --enterprise;
    }
    .architecture { width: 43%; }
    .architecture::before, .architecture::after {
      animation: enterprise-fold linear both;
      animation-timeline: --enterprise;
      animation-range: exit 0% exit 100%;
    }
    [data-cinematic="company"] h1 {
      transform-origin: left;
      animation: enterprise-title linear both;
      animation-timeline: --enterprise;
      animation-range: exit 0% exit 100%;
    }
    .collection-shot { animation: continuum-mask linear both; animation-timeline: view(); animation-range: var(--continuum-entry); }
  }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion:no-preference) {
    .mission { position: relative; isolation: isolate; view-timeline-name: --mission; }
    .mission::before {
      content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
      background: linear-gradient(105deg,var(--panel),transparent);
      animation: mission-plane linear both; animation-timeline: --mission; animation-range: entry 0% cover 65%;
    }
    .mission h2 { align-self: start; animation: mission-title linear both; animation-timeline: --mission; animation-range: entry 0% exit 100%; }
    @keyframes mission-plane { from {clip-path: polygon(0 0,0 0,0 100%,0 100%)} to {clip-path: polygon(0 0,100% 0,86% 100%,0 100%)} }
    @keyframes mission-title { from { transform: translateY(-.35em); } to { transform: translateY(.55em); } }
  }
}

/* The unpinned composition remains a complete editorial layout. */
@media (min-width:701px) {
  .identity-stage {
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
    align-items: center;
    gap: clamp(1.5rem,4vw,4rem);
  }
  .identity-portrait { justify-self: end; max-width: 100%; }
  .identity-expertise { grid-column: 1 / -1; }
}

/* The dock changes inside a fixed footprint so document geometry stays stable. */
.continuum-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 90;
  height: calc(4.75rem + env(safe-area-inset-top, 0px));
  padding-block-start: env(safe-area-inset-top, 0px);
  border: 0;
  pointer-events: none;
}
[data-cinematic="founder"] .identity-stage { padding-block-start: clamp(2rem, 7vh, 6rem); }
[data-cinematic="founder"] .philosophy {
  margin: 2.5rem 0 0;
  padding-inline-start: 1rem;
  border-inline-start: 2px solid var(--line);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
}
/* The dock expands over its reserved header footprint. */
.continuum-header {
  --continuum-inline-start: max(1rem, env(safe-area-inset-left, 0px));
  --continuum-inline-end: max(1rem, env(safe-area-inset-right, 0px));
}
[dir="rtl"] .continuum-header {
  --continuum-inline-start: max(1rem, env(safe-area-inset-right, 0px));
  --continuum-inline-end: max(1rem, env(safe-area-inset-left, 0px));
}
.continuum-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 78rem;
  margin-inline: auto;
  padding: .5rem var(--continuum-inline-end) 0 var(--continuum-inline-start);
  --adaptive-available: calc(100vi - var(--continuum-inline-start) - var(--continuum-inline-end) - 3.5rem);
}
.continuum-header .continuum-dock { display: block; margin: 0; padding: 0; pointer-events: auto; }
.continuum-brand { display: grid; place-items: center; min-width: 44px; min-height: 44px; pointer-events: auto; }
.continuum-brand img { grid-area: 1 / 1; object-fit: contain; }
.continuum-brand .on-dark, [data-theme="dark"] .continuum-brand .on-light { display: none; }
[data-theme="dark"] .continuum-brand .on-dark { display: block; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .continuum-header { display: none; }
}

.loading .continuum-header { visibility: hidden; }

.signature-links {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  list-style: none;
  margin-block: 1rem;
  padding: 0;
}
.signature-links li { margin: 0; }
.signature-links a {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  text-decoration: none;
}
.signature-links a:hover { border-color: currentColor; }
.signature-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.profile-social svg { width: 1.2rem; height: 1.2rem; }
.ecosystem-links { position: relative; }
.ecosystem-links a { position: static; width: 5.75rem; height: 3.5rem; }
.ecosystem-links .signature-tooltip { max-inline-size: 100%; white-space: normal; }
.ecosystem-links img { object-fit: contain; }
.signature-tooltip {
  position: absolute;
  z-index: 3;
  inset-block-start: calc(100% + .3rem);
  inset-inline-start: 0;
  padding: .23rem .5rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--bg);
  font-size: .75rem;
  white-space: nowrap;
  visibility: hidden;
}
.signature-links a:focus-visible .signature-tooltip { visibility: visible; }
@media (hover: hover) {
  .signature-links a:hover .signature-tooltip { visibility: visible; }
}
@media (forced-colors: active), (prefers-contrast: more) {
  .ecosystem-links a[href*="/company"] .on-light { content: url("/assets/works/clear-glass/works-icon-black.svg"); }
  .ecosystem-links a[href*="/company"] .on-dark { content: url("/assets/works/clear-glass/works-icon-white.svg"); }
  .ecosystem-links a[href^="https://shop.senthan.work/"] .on-light { content: url("/assets/works/commerce-icon-black.svg"); }
  .ecosystem-links a[href^="https://shop.senthan.work/"] .on-dark { content: url("/assets/works/commerce-icon-white.svg"); }
}

.works-loader {display:none}
.loading .works-loader {display:grid;place-items:center;position:fixed;inset:0;z-index:50;pointer-events:none;background:var(--bg)}
.works-loader .v4-mark {animation:works-pulse 1.4s ease-in-out infinite alternate}
@keyframes works-pulse {to{opacity:.74;transform:scale(.975)}}
@media(prefers-reduced-motion:reduce){.works-loader .v4-mark {animation:none}}

.works-loader .v4-mark img { width: 54px; height: auto; }
@media (forced-colors: active), (prefers-contrast: more) {
  .works-loader .on-light { content: url("/assets/works/clear-glass/works-icon-black.svg"); }
  .works-loader .on-dark { content: url("/assets/works/clear-glass/works-icon-white.svg"); }
}
