/*
 * Muselinka — base styles, design tokens and shared components.
 * Section styles live in section-*.css (Propshaft serves every file in this
 * folder through `stylesheet_link_tag :app`).
 *
 * Desktop values are taken 1:1 from the Figma frame (1920px wide).
 */

@font-face {
  font-family: "Monument Grotesk";
  src: url("/assets/MonumentGrotesk-Regular-54197d9b.woff2") format("woff2"), url("/assets/MonumentGrotesk-Regular-c5858032.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Monument Grotesk";
  src: url("/assets/MonumentGrotesk-Medium-807a3dcf.woff2") format("woff2"), url("/assets/MonumentGrotesk-Medium-78169171.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Monument Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Small UI details (buttons, chips, labels) use the same face; there is no third-party font. */
  --font-ui: var(--font);

  --ink: #0a0a0a;
  --ink-2: #161716;
  --ink-navy: #0b0b28;
  --muted: #727272;
  --muted-2: #727272;
  --card: #f5f5f1;
  --soft: rgba(0, 0, 0, 0.3);
  --line: #d9d9d9;
  --line-2: #d9dbd7;
  --accent: #f93d0d;
  --bg: #ffffff;
  --bg-dark: #000000;

  --gutter: 54px;
  --max: 1812px;
  --radius-lg: 32px;
  --radius-md: 28px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis-smooth { scroll-behavior: auto; } /* Lenis does the easing */

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.soft { color: var(--soft); }
.muted { color: rgba(0, 0, 0, 0.5); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Typography ---------- */

.h-section {
  font-size: clamp(40px, 3.334vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink-2);
  font-weight: 400;
  text-wrap: balance;
}
.h-section .soft { color: rgba(22, 23, 22, 0.3); }

.h-section--sm {
  font-size: clamp(36px, 2.8125vw, 54px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.h-item {
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.025em;
  color: var(--ink-2);
  font-weight: 400;
}

.lead {
  font-size: clamp(18px, 1.146vw, 22px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}
.on-dark .lead { color: rgba(255, 255, 255, 0.6); }
.on-dark .h-section { color: #fff; }
.on-dark .h-section .soft { color: rgba(255, 255, 255, 0.5); }
.lead--841 { max-width: 841px; }

.body-20 {
  font-size: clamp(17px, 1.042vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* "(01) More about us" */
.section-label {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 16px;
  line-height: 19.2px;
  color: var(--ink);
  white-space: nowrap;
}
.section-label--dark { color: #fff; }

/* Two-column section intro: label on the left, content on the right. */
.split {
  display: grid;
  grid-template-columns: var(--split-aside, 800px) minmax(0, 1fr);
  column-gap: 64px;
  align-items: start;
}
/* The label column is 800px (wide) / 578.656px (narrow) in the 1812px design and shrinks
   in step with the screen, so smaller screens don't leave a wide gap before the title. */
.split--wide   { --split-aside: min(800px, calc(58.7% - 264px)); }
.split--narrow { --split-aside: min(578.656px, calc(37.4% - 99px)); }
.split__aside { padding-top: 10px; }
.split__main > .lead { padding-top: 24px; }

/* ---------- Buttons ---------- */

/* "Free Strategy Call  (→)" — text followed by a 46px circle. */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 13.632px;
  font-size: 18px;
  line-height: 1.3;
  color: #000;
  white-space: nowrap;
}
.btn-pill--light { color: #fff; }

.btn-circle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  overflow: hidden;
  flex: none;
}
.btn-circle svg { width: 46px; height: 46px; }
.btn-circle--white { background: #fff; color: #000; }

/* Two stacked faces: hover rolls one out and the other in (matches the two
   circle layers in the Figma component). */
.btn-circle--swap { background: transparent; }
.btn-circle__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 0.5s var(--ease-out);
}
.btn-circle__face--solid { background: #000; color: #fff; }
.btn-circle__face--outline { background: #fff; color: #000; border: 1px solid rgba(0, 0, 0, 0.3); }

/* Arrow button: solid by default, outline slides in on hover. */
.btn-circle__face--solid + .btn-circle__face--outline { transform: translateX(-100%); }
.btn-pill:hover .btn-circle__face--solid + .btn-circle__face--outline { transform: translateX(0); }
.btn-pill:hover .btn-circle__face--solid:has(+ .btn-circle__face--outline) { transform: translateX(100%); }

/* Menu button: outline underneath, solid on top; solid rotates away on hover. */
.btn-circle__face--outline + .btn-circle__face--solid { transition: transform 0.5s var(--ease-out), opacity 0.3s; }
.btn-pill:hover .btn-circle__face--outline + .btn-circle__face--solid { transform: rotate(90deg) scale(0.4); opacity: 0; }

/* Orange pill CTA */
.btn-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  white-space: nowrap;
  padding: 21px 24px 22px;
  border-radius: 40px;
  background: var(--accent);
  box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.2), inset 0 4px 8px rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: background-color 0.25s, transform 0.25s var(--ease-out);
}
/* Hover = same wipe as the package "Book a call" buttons: a dark layer slides
   up from the bottom on hover and drops away quickly on leave. */
.btn-cta { isolation: isolate; overflow: hidden; }
.btn-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #17171a;
  transform: translate3d(0, 101%, 0);
  transition: transform 0.18s cubic-bezier(0.4, 0, 1, 1);
}
.btn-cta:hover::before,
.btn-cta:focus-visible::before {
  transform: translate3d(0, 0, 0);
  transition: transform 0.38s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
.btn-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* On dark backgrounds (contact form) the layer is white so the button stays visible */
.contact .btn-cta::before, .on-dark .btn-cta::before { background: #fff; }
.contact .btn-cta, .on-dark .btn-cta { transition: color 0.25s; }
.contact .btn-cta:hover, .on-dark .btn-cta:hover { color: #0b0d0c; }
/* Behance wordmark button (Figma 3437:2633): 200×55, wordmark 97×18 at 19px from the top */
.btn-cta--behance { height: 55px; padding: 19px 24px 18px; }
.btn-cta__wordmark { display: block; width: 97px; height: 18px; flex: none; }
/* With the footer-style arrow: wordmark keeps its size and stays put, only the arrow nudges on hover */
.btn-cta--behance.btn-cta--arrow { width: 200px; padding: 17px 24px 16px; }
.btn-cta--behance.btn-cta--arrow .btn-cta__wordmark { width: 97px; height: 18px; transform: none; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
}
.site-header__logo img { width: 134px; height: 24px; }
.site-header__right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-width: 576px;
  padding-left: 32px;
}
.site-header__actions { display: flex; align-items: center; gap: 20px; }

/* EN / DE switch (lang_controller.js): a small pill with a black thumb that slides
   behind the active language. */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 3px;
  border-radius: 99px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.6);
}
.lang-switch__thumb {
  position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 40px;
  border-radius: 99px;
  background: #000;
  transform: translateX(3px);
  transition: transform 0.5s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)), width 0.5s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
.lang-switch__opt {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  min-width: 40px; height: 100%;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.04em; line-height: 1;
  color: rgba(0, 0, 0, 0.55);
  transition: color 0.3s;
}
.lang-switch__opt:hover { color: #000; }
.lang-switch__opt.is-active { color: #fff; }
.lang-switch__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.site-header__clock {
  font-size: 18.24px;
  line-height: 27.36px;
  color: #000;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Carousel nav (case studies, testimonials) ---------- */

.carousel-nav { display: flex; gap: 10px; }
.carousel-nav__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #858980;
  color: var(--ink-2);
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}
.carousel-nav__btn svg { width: 20px; height: 20px; }
.carousel-nav__btn:hover:not(:disabled) { background: var(--ink-2); color: #fff; }
.carousel-nav__btn:disabled { opacity: 0.35; cursor: default; }

/* ---------- Scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Slow, soft rise (expo ease-out) — matches the smooth-scroll curve. */
  .js [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 48px, 0);
    transition: opacity 1.1s cubic-bezier(0.25, 1, 0.5, 1), transform 1.4s var(--ease-expo);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .js [data-reveal].is-revealed { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  :root { --gutter: 32px; }
  .split { grid-template-columns: 1fr; row-gap: 32px; }
  .split__aside { padding-top: 0; }
  .site-header__right { width: auto; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .site-header__clock { display: none; }
  .btn-pill { font-size: 16px; }
  .site-header__actions { gap: 12px; }
  .site-header__logo { flex: none; }
  .site-header__right { padding-left: 0; min-width: 0; }
  .lang-switch { height: 40px; }
  .lang-switch__opt { min-width: 36px; padding: 0 8px; font-size: 13px; }
}

/* Never let a display rule override the hidden attribute. */
[hidden] { display: none !important; }

/* Draggable carousels: grab cursor, and no text selection while dragging with a
   mouse (text stays selectable on touch and via keyboard). */
@media (hover: hover) and (pointer: fine) {
  [data-carousel-target="track"] { cursor: grab; -webkit-user-select: none; user-select: none; }
  [data-carousel-target="track"].is-dragging { cursor: grabbing; }
  [data-carousel-target="track"] a, [data-carousel-target="track"] button { cursor: pointer; }
}

/* narrow phones (≤ 360px): the header keeps the logo whole; "Menu" shows as the round
   button only. Line breaks marked .br-desktop are dropped ≤ 480px so titles wrap naturally. */
@media (max-width: 360px) {
  .site-header__right { padding-left: 0; }
  .site-header .btn-pill__text { display: none; }
  .site-header__actions { gap: 10px; }
  .site-header__logo img { width: 112px; height: 20px; }
}
@media (max-width: 480px) { .br-desktop { display: none; } }

/* Section rhythm on smaller screens (desktop spacing unchanged): one even scale so
   sections follow on without long empty stretches. Hero + film keep their own spacing. */
@media (max-width: 1024px) {
  main section[id]:not(#hero):not(#film) { padding-top: 72px; padding-bottom: 72px; }
}
@media (max-width: 640px) {
  main section[id]:not(#hero):not(#film) { padding-top: 56px; padding-bottom: 56px; }
}

/* German: long compound words (e.g. "Markenstrategie") may hyphenate on the
   smallest phones instead of pushing past their card. English is unaffected. */
@media (max-width: 359px) {
  html:lang(de) h2, html:lang(de) h3, html:lang(de) p, html:lang(de) .field__label { hyphens: auto; overflow-wrap: break-word; }
}

/* Result of the contact form when it was sent without JavaScript (layouts/application) */
.site-flash {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 22px; border-radius: 99px;
  background: var(--ink, #161716); color: #fff;
  font-size: 15px; line-height: 1.4; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.site-flash--alert { background: #b42318; }

/* Skip link: first thing a keyboard reaches; hidden until focused. */
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10000; padding: 10px 16px; border-radius: 999px; background: var(--ink, #0b0b0b); color: #fff; font-size: 14px; transform: translateY(-200%); transition: transform 0.2s; }
.skip-link:focus { transform: none; }

/* 404 page: one centred column (errors/not_found) */
.nf__body { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(56px, 9vh, 120px) 0 clamp(72px, 12vh, 160px); }
.nf__code { display: inline-flex; align-items: center; font-size: clamp(140px, 22vw, 300px); font-weight: 500; line-height: 0.8; letter-spacing: -0.06em; color: var(--ink, #111); }
.nf__zero { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 0.82em; height: 0.82em; margin: 0 0.04em; border-radius: 50%; background: #ffe6dc; }
.nf__mascot { width: 76%; height: auto; transform: translateY(6%); }
.nf__title { margin-top: clamp(32px, 4vw, 56px); font-size: clamp(34px, 3.6vw, 64px); font-weight: 400; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.nf__text { margin-top: 16px; max-width: 44ch; text-wrap: balance; font-size: clamp(16px, 1.25vw, 20px); color: var(--muted); }
.nf__cta { margin-top: 32px; }
.nf__links { margin-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nf__links-title { font-size: 14px; color: var(--muted); }
.nf__links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.nf__links a { display: inline-block; padding: 10px 18px; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 999px; font-size: 15px; transition: border-color 0.2s, background 0.2s; }
.nf__links a:hover { border-color: currentColor; background: rgba(0, 0, 0, 0.03); }
.error-page__cta { margin-top: 32px; }
/* Newsletter confirmed page (newsletters/confirmed): the mascot in a soft circle */
.newsletter-confirmed__art { display: grid; place-items: center; width: clamp(160px, 18vw, 240px); aspect-ratio: 1; border-radius: 50%; background: #ffe6dc; }

/* Background music button (ambient_controller.js): a round button with a speaker icon;
   while music plays it turns black and the icon becomes four dancing bars. */
.sound-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.12); background: rgba(255, 255, 255, 0.6); color: #000;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.sound-toggle:hover { border-color: rgba(0, 0, 0, 0.3); }
.sound-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sound-toggle.is-on { background: #000; border-color: #000; color: #fff; }
.sound-toggle__icon { display: grid; place-items: center; width: 20px; height: 20px; }
.sound-toggle__icon > * { grid-area: 1 / 1; }
.sound-toggle__off { display: grid; transition: opacity 0.2s ease; }
.sound-toggle__off svg { width: 20px; height: 20px; }
.sound-toggle.is-on .sound-toggle__off { opacity: 0; }
.sound-toggle__bars { display: flex; align-items: center; gap: 2px; height: 16px; opacity: 0; transition: opacity 0.2s ease; }
.sound-toggle.is-on .sound-toggle__bars { opacity: 1; }
.sound-toggle__bars i { display: block; width: 2px; height: 14px; border-radius: 2px; background: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .sound-toggle.is-on .sound-toggle__bars i { animation: sound-bar 1.1s ease-in-out infinite; transform-origin: center; }
  .sound-toggle.is-on .sound-toggle__bars i:nth-child(2) { animation-delay: -0.35s; animation-duration: 0.9s; }
  .sound-toggle.is-on .sound-toggle__bars i:nth-child(3) { animation-delay: -0.6s; animation-duration: 1.3s; }
  .sound-toggle.is-on .sound-toggle__bars i:nth-child(4) { animation-delay: -0.15s; animation-duration: 1s; }
}
@keyframes sound-bar { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
/* Phones: the round menu icon on its own, without the "Menu" label (its name stays for screen readers). */
@media (max-width: 767px) {
  .site-header .btn-pill__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-header .btn-pill { gap: 0; }
}

/* Small phones: a more compact header so the logo and the controls keep room to breathe
   (logo, EN/DE, sound and menu step down together; tap targets stay ≥ 34px). */
@media (max-width: 480px) {
  .site-header__actions { gap: 8px; }
  .lang-switch { height: 36px; padding: 2px; }
  .lang-switch__thumb { top: 2px; bottom: 2px; }
  .lang-switch__opt { min-width: 32px; padding: 0 7px; font-size: 12px; }
  .sound-toggle { width: 36px; height: 36px; }
  .sound-toggle__bars i { height: 12px; }
  .site-header .btn-circle, .site-header .btn-circle svg { width: 40px; height: 40px; }
}
@media (max-width: 374px) {
  .site-header__logo img { width: 100px; height: 18px; }
  .site-header__actions { gap: 6px; }
  .lang-switch { height: 34px; }
  .lang-switch__opt { min-width: 30px; padding: 0 6px; font-size: 11.5px; }
  .sound-toggle { width: 34px; height: 34px; }
  .site-header .btn-circle, .site-header .btn-circle svg { width: 38px; height: 38px; }
}
