@font-face {
  font-family: "Fixel";
  src: url("./assets/fonts/FixelVariable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 87.5% 100%;
  font-display: swap;
}

:root {
  color-scheme: only light;
  --ink: #171717;
  --paper: #efefeb;
  --line: rgba(11, 11, 11, 0.18);
  --muted: #676762;
  --acid: #d7ff35;
  --blue: #2358ff;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Fixel", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-stretch: 87.5%;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header,
main,
footer {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.site-header {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  font-size: 1.0625rem;
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 520;
  font-stretch: 100%;
  text-decoration: none;
}
.brand-line:last-child { font-weight: 610; }
nav { display: flex; align-items: center; gap: 36px; }
nav a { font-size: .875rem; text-decoration: none; }
nav a:hover { opacity: .55; }
.language-switcher {
  position: relative;
  display: inline-grid;
  align-items: center;
  flex: 0 0 auto;
}
.language-switcher::after {
  content: "";
  position: absolute;
  right: 10px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}
.language-switcher select {
  width: 64px;
  height: 36px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
}
.language-switcher select:hover { border-color: rgba(11, 11, 11, .38); }
.language-switcher select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.hero {
  min-height: 550px;
  padding: 88px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: center;
  gap: clamp(56px, 10vw, 150px);
}
.hero-copy { padding-top: 8px; }
.hero-intro { margin: 0 0 32px; font-size: 1.125rem; line-height: 1.555; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 860px;
  margin-bottom: 48px;
  font-size: 3.5rem;
  line-height: 1.071;
  letter-spacing: -.04em;
  font-weight: 600;
  font-stretch: 100%;
}
.rotating-word, .expertise span { color: var(--blue); }
.rotating-word {
  display: inline-block;
  vertical-align: baseline;
  white-space: nowrap;
  transition: width .28s ease-in-out, opacity .16s ease, transform .16s ease;
}
.rotating-word.is-changing {
  opacity: 0;
  transform: translateY(6px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 46px; padding: 13px 22px; border: 0; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: .875rem; line-height: 1.428; font-weight: 500; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: #2c2c2c; }
.hero-actions .button-primary { background: var(--blue); color: white; }
.hero-actions .button-primary:hover { background: #1648e8; }
.button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.hero-portrait { position: relative; width: 268px; aspect-ratio: 268 / 326; margin: 0; overflow: hidden; border-radius: 30px; background: #dedede; }
.hero-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.hero-portrait .portrait-next {
  opacity: 0;
  transition-property: opacity;
  transition-duration: var(--portrait-transition-duration, 650ms);
  transition-timing-function: var(--portrait-transition-easing, linear);
}
.hero-portrait .portrait-next.is-visible { opacity: 1; }

.expertise {
  min-height: 380px;
  padding: 110px 0 78px;
  display: flex;
  align-items: center;
}
.expertise h2 {
  max-width: 1180px;
  margin: 0;
  font-weight: 500;
}

.projects, .about { padding: 110px 0; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 46px; }
h2 { margin-bottom: 0; font-size: 2.5rem; line-height: 1.1; letter-spacing: -.035em; font-weight: 600; font-stretch: 100%; }
h3 { font-size: 1.75rem; line-height: 1.214; letter-spacing: -.025em; font-weight: 600; font-stretch: 100%; }

.project { margin-bottom: 76px; border: 1px solid rgba(11,11,11,.09); border-radius: 28px; overflow: hidden; background: white; box-shadow: 0 18px 48px rgba(18,18,18,.06); }
.project, .about, .contact, .case-section { content-visibility: auto; contain-intrinsic-size: auto 760px; }
.project-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e9e9e5; }
.project-media img, .project-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-media-fill img, .project-media-fill video { transform: scale(1.035); }
.project-body { padding: 34px 40px 38px; }
.project-topline { display: flex; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tags { margin-bottom: 28px; }
.project-tags span { padding: 7px 11px; border-radius: 9px; background: rgba(11,11,11,.06); font-size: .8125rem; line-height: 1; }
.project h3 { max-width: 860px; margin-bottom: 20px; }
.project-lead { max-width: 680px; margin-bottom: 26px; font-size: 1.125rem; line-height: 1.555; }
.project-dark, .project-accent { background: white; color: var(--ink); }
.project-dark .project-topline { color: var(--muted); }
.project-dark .project-tags span { background: rgba(11,11,11,.06); }
details { border-top: 0; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary span { transition: transform .2s ease; }
details[open] summary span { transform: rotate(45deg); }
.project-link { width: fit-content; }
.project-link span { transition: transform .2s ease; }
.project-link:hover span { transform: translate(3px, -3px); }
.details-button { width: fit-content; }
.case-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 36px 0 4px; }
.case-content h4 { margin: 0 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.case-content p { margin: 0; color: inherit; opacity: .72; }

.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 90px; }
.about-lead { max-width: 680px; font-size: 1.5rem; line-height: 1.416; letter-spacing: -.015em; font-weight: 500; }
.about-details p { max-width: 680px; color: #3f3f3a; font-size: 1.125rem; line-height: 1.555; }
.about-details p + p { margin-top: 22px; }
.about-details ul { margin: 34px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.about-details li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.about-details li:last-child { border-bottom: 0; }

.contact { margin-bottom: 28px; padding: 88px 64px 64px; border-radius: 28px; background: var(--blue); color: white; }
.contact h2 { max-width: 840px; margin-bottom: 28px; }
.contact > p { max-width: 680px; font-size: 1.125rem; line-height: 1.555; color: rgba(255,255,255,.82); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 60px; }
.contact-links .button:focus-visible { outline-color: white; }

footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .8125rem; }
footer a { text-decoration: none; }

.case-page { width: 100%; }
.case-header { border-bottom: 0; }
.back-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: .9375rem; }
.back-link:hover { opacity: .55; }
.case-main { width: 100%; max-width: none; }
.case-hero { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 92px 0 60px; }
.case-kicker { display: flex; justify-content: space-between; margin-bottom: 30px; color: var(--muted); font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em; }
.case-hero h1 { max-width: 1000px; margin-bottom: 30px; }
.case-intro { max-width: 680px; margin-bottom: 54px; font-size: 1.5rem; line-height: 1.416; letter-spacing: -.015em; font-weight: 500; }
.case-hero-image { aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: #111; }
.case-hero-image img, .case-hero-image video { display: block; width: 100%; height: 100%; object-fit: cover; }
.case-hero-image-interface { background: #ededed; }
.case-hero-image-interface img { object-position: center top; }
.case-section { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 110px 0; border-top: 1px solid var(--line); }
.case-section-head { margin-bottom: 52px; }
.case-section-head h2 { max-width: 850px; }
.case-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; }
.case-columns h3 { margin-bottom: 18px; }
.case-columns p { max-width: 680px; color: #3f3f3a; font-size: 1.125rem; line-height: 1.555; }
.case-note { margin-top: 48px; padding: 30px; border-radius: 18px; background: var(--ink); color: white; font-size: 1.125rem; line-height: 1.555; }
.case-note p:last-child { margin-bottom: 0; }
.case-note p + p { margin-top: 16px; color: rgba(255,255,255,.72); }
.case-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 52px; }
.case-facts div { min-height: 132px; padding: 24px; border: 1px solid rgba(11,11,11,.09); border-radius: 18px; background: white; box-shadow: 0 12px 32px rgba(18,18,18,.04); }
.case-facts span { display: block; margin-bottom: 20px; color: var(--muted); font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em; }
.case-facts strong { display: block; font-size: 1.125rem; line-height: 1.555; font-weight: 600; }
.case-image { margin-top: 52px; border-radius: 24px; overflow: hidden; background: #e5e5e1; }
.case-image img { width: 100%; height: auto; }
.case-image-contained { display: grid; place-items: center; }
.case-image-contained img { width: 100%; height: min(760px, 62vw); object-fit: contain; }
.case-page .case-image img,
.case-page .case-hero-image img { cursor: zoom-in; }
.case-page .case-image img:focus-visible,
.case-page .case-hero-image img:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.image-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 28px;
  border: 0;
  background: rgba(8,8,8,.96);
  color: white;
  overflow: hidden;
}
.image-lightbox[open] { display: grid; place-items: center; }
.image-lightbox::backdrop { background: rgba(8,8,8,.96); }
.image-lightbox img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 56px);
  max-height: calc(100dvh - 56px);
  object-fit: contain;
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-drag: none;
}
.image-lightbox-close {
  position: fixed;
  z-index: 1;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20,20,20,.78);
  color: white;
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.image-lightbox-close:hover { background: rgba(46,46,46,.92); }
.image-lightbox-close:focus-visible { outline: 3px solid white; outline-offset: 3px; }
html.lightbox-open { overflow: hidden; }
.case-image-wide img { min-height: 190px; object-fit: cover; }
.case-hero-image-light { background: #dce8d4; }
.case-image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.case-image-grid .case-image { margin-top: 0; }
.case-ecomama .case-image-grid { align-items: start; }
.case-section-head-split { display: grid; grid-template-columns: minmax(0, .82fr) minmax(360px, 1fr); gap: 90px; align-items: start; }
.case-section-head-split p { max-width: 680px; margin: 0; color: #3f3f3a; font-size: 1.125rem; line-height: 1.555; }
.case-result { display: grid; grid-template-columns: .42fr 1fr; gap: 32px; margin-top: 52px; padding: 34px; border-radius: 22px; background: var(--blue); color: white; }
.case-result-label { font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.72); }
.case-result p { max-width: 780px; margin: 0; font-size: 1.25rem; line-height: 1.5; font-weight: 500; }
.case-image-editorial { background: white; border: 1px solid rgba(11,11,11,.08); box-shadow: 0 16px 42px rgba(18,18,18,.05); }
figure.case-image { margin-right: 0; margin-left: 0; }
.case-image figcaption { padding: 16px 18px 18px; color: var(--muted); font-size: .8125rem; line-height: 1.45; background: white; }
.case-image-grid-asymmetric { grid-template-columns: 1.12fr .88fr; align-items: stretch; }
.case-image-grid-asymmetric .case-image { min-height: 100%; }
.case-image-contained { display: flex; flex-direction: column; }
.case-image-grid-four { grid-template-columns: repeat(2, 1fr); }
.case-toweco .case-image-contained { background: #e9e9e5; border: 1px solid rgba(11,11,11,.08); }
.case-toweco .case-image-contained img { padding: clamp(18px, 3vw, 42px); }
.case-next { width: min(calc(100% - 48px), var(--max)); margin: 0 auto 28px; padding: 72px 64px; border-radius: 28px; background: var(--blue); color: white; }
.case-next p { color: rgba(255,255,255,.76); }
.case-next a { margin-top: 28px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(calc(100% - 28px), var(--max)); }
  .site-header { min-height: 72px; }
  nav { gap: 14px; }
  .language-switcher select { width: 60px; height: 34px; padding-left: 10px; }
  .hero { min-height: auto; padding: 26px 0 36px; grid-template-columns: 1fr; gap: 40px; }
  .hero-intro { margin-bottom: 24px; font-size: 1rem; line-height: 1.5; }
  .hero h1 { margin-bottom: 40px; }
  .hero-title-line,
  .rotating-word { display: block; }
  .hero-actions { width: 100%; }
  .hero-actions .button { width: 100%; min-height: 56px; padding: 16px 24px; border-radius: 16px; font-size: 1rem; }
  h1 { font-size: clamp(1.875rem, 9.45vw, 2.125rem); line-height: 1.1; }
  h2 { font-size: 2rem; line-height: 1.125; }
  h3 { font-size: 1.5rem; line-height: 1.25; }
  h1 br { display: none; }
  .hero-portrait { width: clamp(180px, 55vw, 220px); justify-self: center; border-radius: 22px; }
  .expertise { min-height: auto; padding: 68px 0 84px; }
  .about-lead, .case-intro { font-size: 1.25rem; line-height: 1.4; }
  .projects, .about { padding: 76px 0; }
  .section-heading { margin-bottom: 30px; }
  .project { margin-bottom: 34px; border-radius: 20px; }
  .project-body { padding: 24px 20px 26px; }
  .project-topline { margin-bottom: 16px; }
  .project-tags { margin-bottom: 22px; }
  .case-content { grid-template-columns: 1fr; gap: 22px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact { padding: 56px 24px 28px; border-radius: 20px; }
  .contact-links { margin-top: 44px; }
  .contact-links .button { width: 100%; text-align: center; overflow-wrap: anywhere; }
  .case-hero { width: min(calc(100% - 28px), var(--max)); padding: 32px 0 28px; }
  .case-kicker { gap: 20px; margin-bottom: 18px; }
  .case-hero h1 { margin-bottom: 18px; }
  .case-intro { margin-bottom: 24px; font-size: 1.125rem; line-height: 1.45; }
  .case-hero-image { width: min(88%, 560px); margin-inline: auto; border-radius: 20px; }
  @supports (height: 1svh) {
    .case-hero-image { width: min(88%, 560px, 56.889svh); }
  }
  .case-section { width: min(calc(100% - 28px), var(--max)); padding: 76px 0; }
  .case-section-head { margin-bottom: 36px; }
  .case-columns, .case-image-grid, .case-facts, .case-section-head-split, .case-result { grid-template-columns: 1fr; gap: 28px; }
  .case-facts { gap: 10px; margin-top: 36px; }
  .case-facts div { min-height: 0; }
  .case-image { margin-top: 34px; border-radius: 16px; }
  .case-image-contained img { height: min(560px, 68svh); }
  .case-toweco .case-image-contained img { height: auto; max-height: 52svh; padding: 16px; }
  .case-result { margin-top: 36px; padding: 24px; gap: 14px; }
  .case-result p { font-size: 1.0625rem; }
  .image-lightbox { padding: 16px; }
  .image-lightbox img { max-height: calc(100vh - 32px); }
  .image-lightbox img { max-height: calc(100dvh - 32px); }
  .case-note { padding: 22px; }
  .case-next { width: min(calc(100% - 28px), var(--max)); padding: 48px 24px; border-radius: 20px; }
}

@media (max-width: 430px) {
  .site-header { align-items: center; }
  .site-header .brand { max-width: 96px; font-size: .9375rem; line-height: .98; }
  .site-header nav { gap: 9px; }
  .site-header nav > a { font-size: .75rem; }
  .case-header { gap: 10px; }
  .case-header .back-link { margin-left: auto; font-size: .75rem; }
  .language-switcher select { width: 56px; height: 32px; padding: 0 24px 0 9px; font-size: .6875rem; }
  .language-switcher::after { right: 9px; }
  .hero-portrait { width: clamp(180px, 55vw, 220px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
