/* Custom additions on top of the Webflow export. Bump ?v= in the pages after editing. */

/* Contact drawer */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}

.contact-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  padding: 32px;
  overflow-y: auto;
  box-sizing: border-box;
  background-color: #0c0c0c;
  border-left: 1px solid #ffffff14;
  color: #fff;
  font-family: Ppneuemachina, Tahoma, sans-serif;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .45s;
}

.contact-open .contact-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease;
}

.contact-open .contact-drawer {
  transform: none;
  visibility: visible;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.contact-open {
  overflow: hidden;
}

.contact-drawer-close {
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #ffffff14;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: opacity .2s;
}

.contact-drawer-close:hover {
  opacity: .8;
}

.contact-drawer-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
  font-family: Ppneuemachina, Tahoma, sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
}

.contact-drawer-title span {
  color: #ff6101;
}

.contact-drawer-lead {
  margin: 0 0 32px;
  color: #ffffffa3;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  background-color: #ffffff0d;
  color: #fff;
  text-decoration: none;
  transition: background-color .2s;
}

.contact-item:hover {
  background-color: #ffffff1a;
  color: #fff;   /* stays white on hover */
}

.contact-item-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.contact-item-label {
  color: #ffffff7a;
  font-size: 13px;
  line-height: 1.4;
}

.contact-item-value {
  overflow: hidden;
  font-size: 18px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-item-arrow {
  color: #ff6101;
  font-size: 20px;
}

.contact-copy {
  flex: none;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background-color: #ffffff14;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: opacity .2s;
}

.contact-copy:hover {
  opacity: .8;
}

.contact-cv {
  display: block;
  margin-top: auto;
  padding: 16px 24px;
  border-radius: 8px;
  background-color: #fff;
  color: #0c0c0c;
  text-align: center;
  text-decoration: none;
  transition: opacity .2s;
}

.contact-list + .contact-cv {
  margin-top: 32px;
}

.contact-cv:hover {
  opacity: .8;
}

.contact-drawer :focus-visible,
[data-contact-open]:focus-visible {
  outline: 2px solid #ff6101;
  outline-offset: 3px;
}

/* NDA block: NDA badge next to the text, eye next to the highlights */
.container.container-nda {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 80px;
  grid-template-areas:
    "nda  text text"
    "list list eye";
  column-gap: 40px;
  row-gap: 0;
  align-items: center;
}

.container-nda .nda-teaser {
  display: contents;
}

.container-nda .image-10 {
  grid-area: nda;
  width: 100%;
  max-width: 120px;
}

.container-nda .bold-text-7 {
  grid-area: text;
  font-size: 18px;
  line-height: 1.6;
}

.container-nda .image-11 {
  grid-area: eye;
  justify-self: end;
  width: 100%;
  max-width: 80px;
}

.nda-highlights {
  grid-area: list;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #ffffff1f;
}

.nda-highlights ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.nda-highlights li {
  position: relative;
  padding-left: 28px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
}

.nda-highlights li + li {
  margin-top: 6px;
}

.nda-highlights li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #ff6101;
}

.nda-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 8px;
  background-color: #ffffff14;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  transition: opacity .2s;
}

.nda-cta:hover {
  opacity: .8;
}

.nda-cta span {
  color: #ff6101;
}

/* Marquee: the content holds two identical halves and moves by -50%, so it must be exactly as wide as its items */
.marquee-content {
  width: max-content;
}

/* Short descriptions in case studies */
.case-text {
  margin: 0;
  font-family: Ppneuemachina, Tahoma, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  text-align: center;
  opacity: .72;
}

.case-text.case-intro {
  max-width: 640px;
  text-align: left;
}

@media screen and (max-width: 767px) {
  /* Phones: everything in one column, in reading order */
  .container.container-nda {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "nda"
      "text"
      "list"
      "eye";
    row-gap: 20px;
  }

  .container-nda .image-10 {
    max-width: 96px;
  }

  .container-nda .image-11 {
    justify-self: start;
    max-width: 60px;
  }

  .nda-highlights {
    margin-top: 0;
    padding-top: 20px;
  }
}

@media screen and (max-width: 479px) {
  .container-nda .bold-text-7,
  .case-text {
    font-size: 16px;
  }

  .contact-drawer {
    padding: 24px 20px;
  }

  .contact-drawer-title {
    font-size: 32px;
  }

  .nda-highlights li {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-overlay,
  .contact-drawer,
  .contact-open .contact-overlay,
  .contact-open .contact-drawer {
    transition: none;
  }

  .marquee-content {
    animation: none;
  }
}

/* Project card hover effect: the hover image slides in from the bottom (layers are added by site.js on pointer devices) */
.fx-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.fx-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-position: 50%;
  background-size: cover;
  pointer-events: none;
  transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}

.fx-hover {
  clip-path: inset(100% 0 0 0);
  transition: clip-path .5s cubic-bezier(.7, 0, .2, 1), transform .55s cubic-bezier(.2, .7, .2, 1);
}

.fx-card.is-hovered .fx-layer {
  transform: scale(1.04);
}

.fx-card.is-hovered .fx-hover {
  clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .fx-layer,
  .fx-hover {
    transition: none;
  }

  .fx-card.is-hovered .fx-layer {
    transform: none;
  }
}

/* Homepage portrait: transparent cut-out pinned to the card's bottom-right corner, no rounding.
   Negative right/bottom margins cancel the card padding so the figure sits flush on the edges;
   on desktop a negative top margin lets the head rise above the card without making the card taller. */
.quotation { position: relative; }
@media screen and (min-width: 992px) { .quotation .nda-teaser { flex: 1; } }
.quotation .myphoto {
  order: 3; display: block; align-self: flex-end; position: relative; z-index: 1;
  width: 370px; height: auto; max-height: none;
  border-radius: 0 0 40px 0; /* follows the card's rounded bottom-right corner */
  margin: -120px -60px -60px auto;
}
@media screen and (max-width: 991px) {
  .quotation .nda-teaser { order: 1; }
  .quotation .container-2.tablet { order: 2; align-self: center; }
  .quotation .myphoto { width: 340px; margin-top: 0; border-radius: 0; }
}
/* Phones: a bigger portrait, centred in the card and sitting on its bottom edge */
@media screen and (max-width: 767px) { .quotation .myphoto { width: 340px; max-width: none; align-self: center; margin: 0 auto -40px; } }
@media screen and (max-width: 479px) { .quotation .myphoto { width: 320px; margin: 0 auto -32px; } }

/* ===== Motion layer (fx.js). Nothing here applies when the visitor prefers reduced motion. ===== */

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: hidden; } /* hidden, not clip: keeps the reserved scrollbar gutter, so nothing shifts */
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Headline stays hidden until it is split into lines; failsafe shows it after 2s if the script never runs */
.fx:not(.fx-done) h1.heading-jumbo { visibility: hidden; animation: fx-unhide 0s 2s forwards; }
@keyframes fx-unhide { to { visibility: visible; } }
.fx-line-mask { padding-bottom: .12em; margin-bottom: -.12em; }

/* Cursor: the system draws it (a CSS image cursor), so it never lags behind the mouse.
   Orange dot by default, an orange ring over links and buttons, a "View case" disc over projects.
   fx.js adds .fx-cursor-native only on mouse/trackpad devices. */
.fx-cursor-native, .fx-cursor-native * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='6' cy='6' r='5.25' fill='%23ff6101'/%3E%3C/svg%3E") 6 6, auto !important; }
.fx-cursor-native :is(a, button, summary, [data-contact-open], .w-nav-button),
.fx-cursor-native :is(a, button, summary, [data-contact-open], .w-nav-button) * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Ccircle cx='24' cy='24' r='23' fill='none' stroke='%23ff6101' stroke-width='1.5'/%3E%3C/svg%3E") 24 24, pointer !important; }
.fx-cursor-native .work-preview, .fx-cursor-native .work-preview * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='108'%3E%3Ccircle cx='54' cy='54' r='54' fill='%23ff6101'/%3E%3Ctext x='54' y='58.5' text-anchor='middle' font-family='Helvetica, Arial, sans-serif' font-size='13' fill='%23fff'%3EView case%3C/text%3E%3C/svg%3E") 54 54, pointer !important; }

/* Page transitions between pages of the site (Chrome, Edge, Safari 18.2+; others just navigate) */
@view-transition { navigation: auto; }
.navigation { view-transition-name: site-nav; }
::view-transition-group(*) { animation-duration: .9s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(root) { animation: .5s cubic-bezier(.7, 0, .84, 0) both fx-vt-out; }
::view-transition-new(root) { animation: .9s cubic-bezier(.16, 1, .3, 1) .12s both fx-vt-in; }
::view-transition-old(case-cover), ::view-transition-new(case-cover) { width: 100%; height: 100%; object-fit: cover; }
@keyframes fx-vt-out { to { opacity: 0; transform: translateY(-60px) scale(.98); } }
@keyframes fx-vt-in { from { opacity: 0; transform: translateY(80px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Floating header: a compact translucent black bar that hangs below the top edge with gaps on the sides */
.navigation {
  top: 10px; left: 10px; right: 10px; bottom: auto;
  max-width: 1600px; height: 72px; margin: 0 auto; padding: 0 28px; box-sizing: border-box;
  background-color: #2226; border-radius: 12px;   /* same glass as the photo card */
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
/* Mobile menu drops out under the bar: round its bottom to match */
.navigation .w-nav-overlay { border-radius: 0 0 12px 12px; }
.navigation:has(.w-nav-button.w--open) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.navigation > .navigation-items { max-width: none; height: 100%; }
@media screen and (max-width: 767px) {
  .navigation { top: 8px; left: 8px; right: 8px; height: 64px; padding: 0 20px; }
}
@media screen and (max-width: 479px) {
  /* Name and role stack on phones; tighten them so both fit inside the 56px bar */
  .navigation .div-block-7 { margin-top: 0; }
  .navigation .heading-2 { line-height: 22px; }
  .navigation .paragraph-small { line-height: 18px; margin-top: 2px; }
}

/* "Everything is by design" badge: a ring of text around the asterisk (rotation and parallax come from fx.js) */
.container-2 .fx-ring {
  position: absolute; left: -30%; top: -30%; width: 160%; height: 160%;
  overflow: visible; pointer-events: none;
}
.fx-ring text {
  font-family: Ppneuemachina, Tahoma, sans-serif; font-size: 21px; font-weight: 400;
  letter-spacing: 2px; fill: rgba(255, 255, 255, .5);
}
.fx-ring .fx-ring-star { fill: #ff6101; }

/* ===== Homepage preloader (preloader.js). Hidden unless the head script adds .fx-preload ===== */
.preloader { display: none; }
.fx-preload, .fx-preload body { overflow: hidden; }
.fx-preload .preloader {
  display: block; position: fixed; inset: 0; z-index: 9999;   /* under the custom cursor (10000) */
  background-color: #0c0c0c;
}
.preloader-phrase {
  position: absolute; inset: 0; overflow: hidden; color: #3a3a3a;
  font-family: Ppneuemachina, Tahoma, sans-serif; font-weight: 400;
  font-size: clamp(18px, 5vw, 64px); line-height: 1.15; letter-spacing: -.01em;   /* same size as the hero headline */
}
@media screen and (max-width: 479px) { .preloader-phrase { font-size: 6.4vw; } }
.preloader-phrase .phrase-inner { position: absolute; inset: 0; }
.preloader-phrase .phrase-word {
  position: absolute; left: 0; top: 0; white-space: pre; visibility: hidden;
  will-change: transform, opacity, filter;
}
.preloader-phrase .phrase-measure {
  position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: pre;
}
.preloader-phrase .phrase-measure .line { display: block; }
/* Progress ring at the bottom: fills in step with the animation (preloader.js sets the dash offset) */
.preloader-progress {
  position: absolute; left: 50%; bottom: 44px; width: 32px; height: 32px; margin-left: -16px;
  transform: rotate(-90deg);   /* start filling from 12 o'clock */
}
.preloader-progress circle { fill: none; stroke-width: 4; }
.preloader-progress-track { stroke: rgba(255, 255, 255, .12); }
.preloader-progress-bar { stroke: #ff6101; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }

/* Header mark: the small asterisk in the middle of the bar */
/* Centred on the page: the bar has equal side gaps, so its middle is the page's middle */
.navigation .nav-star {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  max-height: none; fill: #fff; flex: none;
}
@media screen and (max-width: 479px) { .navigation .nav-star { width: 16px; height: 16px; margin: -8px 0 0 -8px; } }

/* Hero background: Bayer-dithered field (dither.js). Sits behind the sticky hero, one screen tall */
.section.main-page-heading { position: sticky; }
.fx-dither {
  position: absolute; left: 0; top: 0; width: 100%; height: 100vh; z-index: -100;   /* the very bottom layer */
  pointer-events: none; 
}
/* One dither layer for the whole homepage: pinned to the screen, the very bottom layer */
.fx-dither.fx-dither-page { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: -100; }
/* dither.js draws one canvas pixel per square and sets the canvas size inline; here it is scaled up with hard
   edges, and the mask cuts a 1px gap on the left and bottom of every square */
.fx-dither {
  image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(to right, transparent 1px, #000 1px), linear-gradient(to top, transparent 1px, #000 1px);
  mask-image: linear-gradient(to right, transparent 1px, #000 1px), linear-gradient(to top, transparent 1px, #000 1px);
  -webkit-mask-size: var(--cell, 6px) var(--cell, 6px); mask-size: var(--cell, 6px) var(--cell, 6px);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}

/* Hero headline: four upper-case lines; in every line the gap between the two words sits exactly
   on the page's vertical centre line (first word right-aligned to it, second left-aligned). Last line orange. */
.intro-wrap { width: 100%; }   /* Webflow's flex container shrink-wrapped it; full width puts its centre on the page centre */
.intro-wrap .div-block-12 { width: 100%; align-items: stretch; }
.heading-jumbo.hero-title {
  width: 100%; margin: 0;
  text-transform: uppercase; font-size: clamp(18px, 5vw, 64px); line-height: 1.1; letter-spacing: -.01em;
}
.hero-title .hero-line {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: .32em;
  overflow: clip; padding-bottom: .1em; margin-bottom: -.1em;   /* mask for the word reveal */
}
.hero-title .hero-word { display: block; white-space: nowrap; }
.hero-title .hero-word:first-child { justify-self: end; }
.hero-title .hero-word:last-child { justify-self: start; }
.hero-title .hero-line-4 { color: #ff6101; }
@media screen and (max-width: 991px) {
  .heading-jumbo.hero-title { font-size: clamp(18px, 5vw, 64px); line-height: 1.1; }
}
@media screen and (max-width: 479px) {
  .heading-jumbo.hero-title { font-size: 6.4vw; line-height: 1.12; }
}

/* Sticky hero: the NDA block now lives inside the hero section, so the headline stays pinned
   until the photo card and the NDA block have both slid over it (same spacing as before) */
.section-3 { margin-bottom: 0; }
.section-3 > .concretenda { margin-top: 100px; }
@media screen and (max-width: 991px) { .section-3 > .concretenda { margin-top: 0; } }
/* Webflow gave the hero an extra 16px right margin on phones, which pulled the centre line 8px to the left */
@media screen and (max-width: 479px) { .section.main-page-heading { margin-right: 0; } }


/* ===== Hover states: one system, always readable =====
   Buttons fill with orange and switch to near-black text; text links turn orange. */
.more-projects-toggle, .nda-cta, .button-text, .contact-cv, .contact-copy, .contact-drawer-close {
  transition: background-color .2s, color .2s, opacity .2s;
}
.more-projects-toggle:hover, .nda-cta:hover, .button-text:hover, .button-text.secondary:hover,
.contact-cv:hover, .contact-copy:hover, .contact-drawer-close:hover {
  opacity: 1; background-color: #ff6101; color: #0c0c0c;
}
.button-text:hover *, .nda-cta:hover *, .more-projects-toggle:hover .more-projects-icon { color: #0c0c0c; }
.navigation-item, .footer-item { transition: color .2s, opacity .2s; }
.navigation-item:hover, .navigation-item.w--current:hover, .footer-item:hover { opacity: 1; color: #ff6101; }
@media screen and (max-width: 991px) {
  /* mobile menu rows: keep the dark row, colour the text */
  .navigation-item:hover { background-color: #1c1c1e; }
}

/* First screen: keep the photo card out of sight until fx.js has set up its reveal (prevents a flash);
   failsafe shows it after 3s if scripts never run */
.fx .quotation:not(.fx-in) { visibility: hidden; animation: fx-unhide 0s 3s forwards; }
/* Resume: Webflow put its content blocks at z-index 9999, above the fixed header (1000) */
.description.resume, .heading-jumbo.description.resume, .description.project-title.resume { z-index: 1; }
/* Bottom CTA on the homepage: orange by default, white on hover
   (scoped under .more-projects so it beats the page's own inline styles) */
.more-projects .more-projects-toggle { background-color: #ff6101; color: #0c0c0c; }
.more-projects .more-projects-toggle .more-projects-icon { color: #0c0c0c; }
.more-projects .more-projects-toggle:hover { background-color: #fff; color: #0c0c0c; }

/* Webflow sets .section to width:100% and adds 15px side margins on phones, so every inner page ran
   15px past the right edge (text cut off, sideways scroll). Let the width follow the margins instead. */
@media screen and (max-width: 767px) { .section:not(.main-page-heading) { width: auto; } }
/* Case pages on phones: full-bleed shots (100vw) sat inside a 15px-inset section, so they stuck out on the
   right; pull them back to the true screen edge. The Alac hero shot is deliberately oversized (150%) —
   clip the page sideways so it doesn't turn into a horizontal scroll. */
@media screen and (max-width: 767px) {
  .section .detail-image.wishx-margin:not(.alac-margin-24):not(.max-width-1396) { margin-left: calc(50% - 50vw); }
  html, body { overflow-x: clip; }
}
/* Phone footer: the links stack in a column, so the 20px right margin only pushed them 10px off centre */
@media screen and (max-width: 767px) { .footer-item { margin-right: 0; } }

/* Phone header: asterisk on the left edge, name + role centred on the page, burger stays on the right */
@media screen and (max-width: 767px) {
  .navigation .nav-star { left: 20px; margin-left: 0; }
  .navigation .logo-link.w-nav-brand {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    float: none; margin: 0; padding: 0;
  }
  .navigation .logo-link .div-block-7 { display: flex; flex-direction: column; align-items: center; text-align: center; }
  /* Homepage card copy ("11+ years…") centred to match */
  .quotation .paragraph-light.nda-teaser, .quotation .nda-teaser .bold-text-7 { text-align: center; }
  .navigation .navigation-wrap { margin-left: auto; }
}
/* Phones: give the hero headline more air above and below before the photo card starts */
@media screen and (max-width: 767px) { .section.main-page-heading { padding-top: 124px; padding-bottom: 44px; } }
/* Keep the scrollbar's room reserved even while the preloader locks scrolling, so the page doesn't jump
   sideways (and the centred headline doesn't shift) the moment the curtain lifts */
html { scrollbar-gutter: stable; }

/* While the preloader runs, keep everything that animates in hidden. The 2–3 s failsafes above used to fire
   under the (longer) preloader, so the page showed up finished and then vanished to play its entrance.
   fx.js sets each element's start state the moment the curtain hands over, which takes over from these. */
.fx-preload:not(.fx-done) h1.heading-jumbo,
.fx-preload .quotation:not(.fx-in) { animation: none; }
.fx-preload .container-nda,
.fx-preload .more-projects,
.fx-preload .works-grid .work-preview { visibility: hidden; }

/* Scroll performance */
/* The marquee strip (~5600px wide) moves every frame: give it its own GPU layer so it is moved, not repainted */
.marquee-wrapper, .marquee-content { will-change: transform; }
/* Photo card: no glass blur (it was recomputed every frame over the animated background and made scrolling
   stutter); a slightly see-through flat fill keeps a hint of the background behind it */
.quotation { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: rgba(21, 21, 21, .85); }
