:root {
  color-scheme: dark;
  --black: #0b0a11;
  --carbon: #151420;
  --graphite: #302d3c;
  --white: #f7f7f5;
  --silver: #b8b4c3;
  --accent: #63d9ff;
  --accent-hover: #b6eeff;
  --panel-paper: #eae7e5;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --body: Inter, Arial, sans-serif;
  --display: Manrope, Inter, Arial, sans-serif;
  --gutter: clamp(28px, 5.55vw, 96px);
  --header-height: 92px;
  --response: 180ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { background-color: var(--black); }
body {
  margin: 0;
  color: var(--white);
  font: 400 1rem/1.55 var(--body);
  -webkit-tap-highlight-color: #63d9ff40;
}
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a { touch-action: manipulation; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; }
h1, h2 { font-weight: var(--heading-weight, 650); }
h3 { font-weight: var(--subheading-weight, 600); }
p { color: var(--silver); text-wrap: pretty; }
::selection { color: var(--black); background: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

:where(main, section, header)[tabindex="-1"]:focus { outline: none; }
section[id] { scroll-margin-top: 24px; }

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 12px auto auto 12px;
  padding: 12px 16px;
  background-color: var(--white);
  color: var(--black);
  clip-path: inset(50%);
}
.skip-link:focus-visible { clip-path: none; }

.frame {
  width: min(100% - 2 * var(--gutter), 1440px);
  margin-inline: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: calc(var(--header-height) - 24px);
  margin-block: 12px;
}
.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.brand__mark { width: 32px; }
.brand__reveal { overflow: hidden; }
.brand__name { width: 102px; }

@media (prefers-reduced-motion: no-preference) {
  .brand {
    --brand-ease: cubic-bezier(.4, .5, .7, 1);
  }
  .brand__mark {
    animation: brand-mark-rise 680ms var(--brand-ease) both;
  }
  .brand__name {
    animation: brand-name-reveal 840ms var(--brand-ease) 600ms both;
  }
}

@supports (animation-timing-function: linear(0, 1)) {
  .brand {
    --brand-ease: linear(0, .75 60%, .8594 70%, .9375 80%, .9844 90%, 1);
  }
}

@keyframes brand-mark-rise {
  from { opacity: 0; transform: translateY(55%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes brand-name-reveal {
  from { opacity: 0; transform: translateX(-100%); }
  to { opacity: 1; transform: translateX(0); }
}
.nav { display: flex; align-items: center; gap: clamp(12px, 2.3vw, 32px); }
.nav a, .footer a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: .875rem;
  font-weight: 500;
  transition: color var(--response);
}
.nav a svg { width: 14px; height: 14px; color: var(--accent); }

.hero {
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  --hero-inset: max(var(--gutter), (100% - 1440px) / 2);
  padding-inline: var(--hero-inset);
  --hero-height: clamp(500px, 100svh - var(--header-height) - 38px, 845px);
  min-height: var(--hero-height);
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse 38% 53% at 38% 50%, #242238 0%, #171624 44%, transparent 100%) var(--black);
  pointer-events: none;
  content: "";
}
.hero__copy {
  position: relative;
  z-index: 1;
  width: 64%;
  padding-block: 48px 58px;
}
.hero h1 {
  font-size: calc(clamp(2.65rem, 5.6vw, 5.8rem) * var(--hero-title-scale, 1));
  line-height: 1.06;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.hero__title-word { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .hero__copy.is-typing .hero__letter:not(.is-typed),
  .hero__copy.is-typing p { opacity: 0; }
  .hero__copy.has-typed p { animation: reveal-hero-description 360ms var(--ease-out) both; }
}

@keyframes reveal-hero-description {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__copy p {
  max-width: 36ch;
  margin-top: 24px;
  font-size: clamp(1rem, 1.35vw, 1.23rem);
  line-height: 1.55;
}
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 28px;
}

/* Hero mark: one inline SVG path defines the glass and its silver edge. */
.hero-mark {
  position: absolute;
  top: var(--mark-top, 34%);
  right: var(--hero-inset);
  width: clamp(280px, 33vw, 640px);
  aspect-ratio: 561 / 412;
  transform: translateY(-50%);
  perspective: 1000px;
  pointer-events: none;
}
.hero-mark__float,
.hero-mark__tilt {
  width: 100%;
  height: 100%;
}
.hero-mark__tilt {
  position: relative;
  transform: var(--mark-motion, none);
}
.hero-mark__glass,
.hero-mark__edge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-mark__glass {
  overflow: hidden;
  background: #08080cc9;
  clip-path: url(#hero-mark-clip);
}
@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  .hero-mark__glass {
    background: rgba(8, 8, 12, .5);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
  }
}
.hero-mark__glass::before {
  position: absolute;
  inset: -24%;
  background: linear-gradient(136deg, #fff 6%, transparent 49%, #fff 56%, transparent 70%);
  transform: translate(var(--mx, 0px), var(--my, 0px));
  opacity: .12;
  content: "";
}
.hero-mark__glass::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, transparent 46%, #0005);
  content: "";
}
.hero-mark__edge {
  overflow: visible;
  fill: none;
  stroke-width: 1.25;
}
.hero-mark__glint { transform: translate(var(--mx, 0px), var(--my, 0px)); }

@media (prefers-reduced-motion: no-preference) {
  .hero-mark__float {
    --mark-float: 12px;
    --mark-rotation: 1.5deg;
    animation: hero-mark-float 8s ease-in-out infinite paused;
  }
  .hero-mark.is-visible .hero-mark__float {
    will-change: transform;
    animation-play-state: running;
  }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .hero-mark.is-visible .hero-mark__tilt { will-change: transform; }
}
@keyframes hero-mark-float {
  0%, 100% { transform: translateY(calc(-1 * var(--mark-float))) rotate(calc(-1 * var(--mark-rotation))); }
  50% { transform: translateY(var(--mark-float)) rotate(var(--mark-rotation)); }
}
@media (max-width: 768px) {
  .hero:has(.hero-mark) { align-content: start; }
  .hero:has(.hero-mark) .hero__copy { width: 100%; padding-bottom: 32px; }
  .hero-mark {
    position: relative;
    inset: auto;
    justify-self: center;
    width: 65vw;
    margin-bottom: 32px;
    transform: none;
  }
  .hero-mark__float { --mark-float: 5px; --mark-rotation: .6deg; }
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 27px;
  min-height: 54px;
  max-width: 100%;
  padding: 0 17px 0 19px;
  border: 1px solid transparent;
  border-radius: 100px;
  color: var(--white);
  font-weight: 500;
  font-size: .875rem;
}
.cta svg { flex: none; }

/* Primary actions: reflected light stays inside the glass. */
:where(.hero .cta, .contact .cta):not(.cta--secondary) {
  position: relative;
  isolation: isolate;
  border-color: rgba(255, 255, 255, .35);
  background-color: var(--graphite);
  background-color: color-mix(in srgb, var(--carbon) 83%, white);
  box-shadow: inset 1px 2px 7px #ffffff48, inset -1px -2px 8px #0007, 0 6px 18px #0004;
  transition: box-shadow .5s var(--ease-out), transform .5s var(--ease-out);
}
@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  :where(.hero .cta, .contact .cta):not(.cta--secondary) {
    background-color: rgba(255, 255, 255, .15);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
  }
}
:where(.hero .cta, .contact .cta):not(.cta--secondary)::before,
:where(.hero .cta, .contact .cta):not(.cta--secondary)::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background-repeat: no-repeat;
  pointer-events: none;
  content: "";
}
:where(.hero .cta, .contact .cta):not(.cta--secondary)::before {
  background-image: linear-gradient(135deg, #ffffff30, transparent 44%, #ffffff12 72%, transparent);
  background-size: 170% 170%;
  transition: background-position .5s var(--ease-out);
}
:where(.hero .cta, .contact .cta):not(.cta--secondary)::after {
  background-image: linear-gradient(115deg, transparent 38%, #ffffff38 50%, transparent 62%);
  background-size: 220% 100%;
  background-position: 100% 0;
  opacity: 0;
  transition: background-position .55s var(--ease-out), opacity .45s var(--ease-out);
}

/* Secondary actions: the pointer lights up only the outline. */
.cta--secondary, .case__body .cta { background: var(--graphite); }
:is(.cta--secondary, .case__body .cta, .work__controls button, .case__back, .footer a) {
  position: relative;
}
:is(.case__back, .footer a) { border-radius: 10px; }
@supports (mask-composite: exclude) {
  :is(.cta--secondary, .case__body .cta, .work__controls button, .case__back, .footer a)::before {
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
      color-mix(in srgb, var(--accent) 80%, transparent), transparent 60%);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .3s var(--ease-out);
    pointer-events: none;
    content: "";
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :where(.hero .cta, .contact .cta):not(.cta--secondary, :disabled, [aria-disabled="true"]):hover {
    box-shadow: inset 1px 2px 9px #ffffff60, inset -1px -2px 8px #0007, 0 8px 22px #0006;
    transform: translateY(-2px);
  }
  :where(.hero .cta, .contact .cta):not(.cta--secondary, :disabled, [aria-disabled="true"]):hover::before {
    background-position: 100% 100%;
  }
  :where(.hero .cta, .contact .cta):not(.cta--secondary, :disabled, [aria-disabled="true"]):hover::after {
    background-position: 0 0;
    opacity: 1;
  }
  :is(.cta--secondary, .case__body .cta, .work__controls button, .case__back, .footer a):not(:disabled, [aria-disabled="true"]):hover::before {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: no-preference) {
  :where(.hero .cta, .contact .cta):not(.cta--secondary, :disabled, [aria-disabled="true"]):active {
    transform: scale(.98);
  }
}
@media (hover: hover) and (prefers-reduced-motion: reduce) {
  :is(.cta, .work__controls button, .case__back, .footer a):not(:disabled, [aria-disabled="true"]):hover {
    filter: brightness(1.12);
  }
}
:is(.cta, .work__controls button, .case__back, .footer a):is(:disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
}

.services {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: clamp(26px, 5vw, 80px);
  padding: clamp(24px, 5.25vw, 78px);
  border-radius: 18px;
  color: #18151f;
  background: var(--panel-paper);
}
.services h2, .work h2, .contact h2 {
  font-size: clamp(2.45rem, 4.5vw, 4.65rem);
  letter-spacing: -.04em;
  text-wrap: balance;
}
.services__list, .work__grid { list-style: none; margin: 0; padding: 0; }
.service {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px 22px;
  border-top: 1px solid #bfb7c3;
  padding-block: 20px;
}
.service:last-child { border-bottom: 1px solid #bfb7c3; }
.service h3 {
  font-size: clamp(1.25rem, 2vw, 2rem);
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.service p { color: #4f4856; font-size: .95rem; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 90px;
  color: var(--silver);
  border-top: 1px solid var(--graphite);
}
.footer small { font-size: .875rem; }
.footer a svg { width: 14px; height: 14px; }

.work { padding-block: clamp(40px, 6vw, 96px) clamp(65px, 8vw, 120px); }
.work__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.work__controls:not([hidden]) { display: flex; gap: 8px; }
.work__controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--graphite);
  border-radius: 50%;
  color: var(--white);
  background: var(--carbon);
  cursor: pointer;
}
.work__controls button:last-child svg { transform: rotate(180deg); }
.work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 26px);
  margin-top: clamp(24px, 3vw, 42px);
}
.work__cover, .case__cover {
  width: 100%;
  background: #100f16;
}
.work__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--graphite);
  border-radius: 24px;
  background: var(--carbon);
}
.work__media { position: relative; overflow: hidden; background: #100f16; }
.work__cover { aspect-ratio: 1.82; object-fit: contain; }
.work__caption {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: clamp(14px, 1.75vw, 26px);
  border-top: 1px solid var(--graphite);
}
.work__caption h3 {
  font-size: clamp(1.35rem, 2.6vw, 2.3rem);
  letter-spacing: -.025em;
}
.work__caption p { margin-top: 5px; font-size: .9rem; }
.work__caption svg { flex: none; color: var(--silver); }
.work__link:focus-visible svg { color: var(--accent); }
.work__grid li, .case { overflow-wrap: anywhere; }

.work--orbit .work__run::after {
  display: block;
  height: var(--work-travel);
  content: "";
}
.work--orbit .work__stage { position: sticky; top: 24px; }
.work--orbit .work__grid {
  --card-width: min(47cqw, 610px, calc((100svh - 232px) * 1.82));
  position: relative;
  display: block;
  height: calc(var(--card-width) / 1.82 + 120px);
  overflow: clip;
}

@media (max-width: 699px) and (prefers-reduced-motion: no-preference) {
  .work .work__grid {
    grid-template-columns: none;
    grid-auto-columns: 80%;
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 5px 12px;
  }
  .work__grid > li { scroll-snap-align: start; }
}
.work--orbit .work__stage { container-type: inline-size; }
.work--orbit .work__grid > li {
  position: absolute;
  width: var(--card-width);
  inset: 0 0 auto;
  margin-inline: auto;
}
.work--orbit .work__link:focus-visible { outline-offset: -4px; }

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-block: clamp(58px, 8vw, 118px) 38px;
  border: 1px solid var(--graphite);
  border-radius: 18px;
  background: var(--carbon);
}
.contact::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(95deg, #171321eb, #17132177 56%, transparent);
  content: "";
}
.contact picture {
  position: absolute;
  z-index: -2;
  inset: 0;
}
.contact picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
}
.contact__copy {
  min-height: clamp(310px, 35vw, 480px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding: clamp(22px, 5vw, 72px);
}
.contact h2 { max-width: 18ch; }
.contact p { max-width: 39ch; }

.case { padding-block: clamp(42px, 6vw, 90px); }
.case__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  color: var(--silver);
}
.case__back svg { color: var(--accent); }
.case h1 {
  font-size: clamp(2.6rem, 6.5vw, 6.5rem);
  letter-spacing: -.04em;
  margin-block: 18px 10px;
}
.case__category { margin-bottom: 28px; }
.case__cover {
  margin-top: 18px;
  border: 1px solid var(--graphite);
  border-radius: 14px;
}
.case__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px clamp(24px, 5vw, 68px);
  margin-top: clamp(28px, 5vw, 64px);
}
.case__body section { border-top: 1px solid var(--graphite); padding-top: 20px; }
.case__body p { max-width: 60ch; }
.case__body h2 { font-size: 1.6rem; margin-bottom: 10px; }
.case__body .cta { justify-self: start; }
.case__gallery { display: grid; justify-items: center; gap: 24px; }

@media (hover: hover) {
  .nav a:hover { color: var(--accent); }
  .work__link:hover svg { color: var(--accent); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .work__link {
    transform: perspective(850px) translateZ(var(--tilt-depth, 0px))
      rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  }
}

@media (max-width: 960px) {
  .service { grid-template-columns: 1fr; }
}

@media (max-width: 699px) {
  :root { --gutter: clamp(20px, 6.15vw, 42px); --header-height: 72px; }
  .brand__mark { width: 26px; }
  .brand__name { width: 82px; }
  .header { gap: 8px; min-height: calc(var(--header-height) - 16px); margin-block: 8px; }
  .nav { flex-wrap: wrap; justify-content: flex-end; column-gap: 14px; row-gap: 0; }
  .nav a { font-size: .8rem; gap: 6px; }
  .hero {
    align-items: start;
    min-height: min(580px, 100svh - var(--header-height));
  }
  .hero::before {
    background: radial-gradient(ellipse 70% 40% at 48% 27%, #242238, transparent) var(--black);
  }
  .hero__copy { width: 100%; padding-block: clamp(34px, 7svh, 67px) 54px; }
  .hero h1 {
    font-size: calc(clamp(1.96rem, 9.7vw, 3.9rem) * var(--hero-title-scale, 1));
    letter-spacing: -.04em;
  }
  .hero__copy p { margin-top: 21px; }
  .hero__actions { margin-top: 20px; }
  .services { grid-template-columns: 1fr; }
  .service h3 { font-size: clamp(1.4rem, 5.6vw, 2rem); }
  .work__grid, .case__body { grid-template-columns: 1fr; }
}

@media (max-width: 699px) and (max-height: 640px) {
  .hero__copy { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

body:has(.font-preview) { padding-bottom: 70px; }

.font-preview {
  position: fixed;
  z-index: 4;
  inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 5px 5px 5px 12px;
  border: 1px solid var(--graphite);
  border-radius: 5px;
  background: var(--carbon);
  color: var(--silver);
  font: 500 .75rem/1.25 var(--body);
}
.font-preview select {
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--graphite);
  border-radius: 3px;
  background: var(--black);
  color: var(--white);
  font: 500 1rem/1.25 var(--body);
  cursor: pointer;
}
.font-preview select:hover { border-color: var(--silver); }
.font-preview__sample {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--graphite);
  border-radius: 3px;
  background: var(--carbon);
  color: var(--white);
  font: 800 1rem/1.3 var(--display);
}
.font-preview__status {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 100%;
  padding: 6px 9px;
  background: var(--carbon);
  border: 1px solid var(--graphite);
  border-radius: 3px;
}
.font-preview__status:empty { display: none; }

body:has(.shader-background:not([hidden])) {
  isolation: isolate;
}

body:has(.shader-background:not([hidden])) .hero {
  isolation: auto;
}

body:has(.shader-background:not([hidden])) .hero::before {
  content: none;
}

.shader-background {
  position: fixed;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .56;
  pointer-events: none;
}
