/* ============================================================
   J&M — Studio Website
   Design language: Vercel-style gallery minimalism (light canvas,
   shadow-as-border) + xAI-style monospace technical labels.
   System font stack only (GDPR-friendly, no external requests).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --bg: #ffffff;
  --bg-tint: #fafafa;
  --bg-dark: #111214;          /* warm near-black section */
  --ink: #171717;              /* primary text (never pure black) */
  --ink-2: #4d4d4d;            /* secondary text */
  --ink-3: #808080;            /* muted text */
  --line: rgba(0, 0, 0, 0.08); /* shadow-as-border */
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #0a72ef;           /* used sparingly: focus + tiny highlights */
  --white: #ffffff;

  /* dark-section tokens */
  --d-ink: rgba(255, 255, 255, 0.92);
  --d-ink-2: rgba(255, 255, 255, 0.64);
  --d-ink-3: rgba(255, 255, 255, 0.38);
  --d-line: rgba(255, 255, 255, 0.12);

  /* type */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
          "Segoe UI", Roboto, Arial, "Apple Color Emoji", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco,
          "Roboto Mono", "Courier New", monospace;

  /* layout */
  --max-w: 1160px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 8px;
  --nav-h: 120px;            /* nav height — kept in sync with .hero min-height */

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg: #0c0d0f;
  --bg-tint: #16181c;
  --bg-dark: #050607;            /* recessed panel on a dark page */
  --ink: #ededed;
  --ink-2: #b5b5b5;
  --ink-3: #8a8a8a;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --white: #ffffff;

  --d-ink: rgba(255, 255, 255, 0.92);
  --d-ink-2: rgba(255, 255, 255, 0.64);
  --d-ink-3: rgba(255, 255, 255, 0.40);
  --d-line: rgba(255, 255, 255, 0.16);
}
[data-theme="dark"] .nav { background: rgba(12, 13, 15, 0.82); }
[data-theme="dark"] ::selection { background: #ededed; color: #0c0d0f; }
[data-theme="dark"] .btn--primary { color: var(--bg); }
[data-theme="dark"] .btn--primary:hover { background: #ffffff; }
[data-theme="dark"] .btn--ghost:hover { background: rgba(255, 255, 255, 0.07); }

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

::selection { background: #171717; color: #ffffff; }

/* accessible focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Shared atoms ---------- */
.mono-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              box-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
}
.btn--primary {
  background: var(--ink);
  color: var(--white);
}
.btn--primary:hover { background: #000000; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: var(--line) 0 0 0 1px;
}
.btn--ghost:hover { background: rgba(0, 0, 0, 0.04); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.nav__logo { width: 120px; height: auto; }
.nav__wordmark {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}
.nav__links a:hover { opacity: 0.55; }

.nav__actions { display: flex; align-items: center; gap: 16px; }
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
}
.lang-switch__btn {
  background: none;
  border: 0;
  padding: 4px 2px;
  font: inherit;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.lang-switch__btn:hover { color: var(--ink); }
.lang-switch__btn.is-active { color: var(--ink); font-weight: 700; }
.lang-switch__sep { color: var(--line-strong); }

/* theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); background: rgba(128, 128, 128, 0.14); }
.theme-toggle__icon { display: block; }
/* light page -> show moon (click to go dark); dark page -> show sun */
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

/* ambient sound toggle */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.sound-toggle:hover { color: var(--ink); background: rgba(128, 128, 128, 0.14); }
.sound-toggle__icon { display: block; }
.sound-toggle .icon-sound-on { display: none; }
.sound-toggle.is-on { color: var(--ink); }
.sound-toggle.is-on .icon-sound-on { display: block; }
.sound-toggle.is-on .icon-sound-off { display: none; }

/* mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav__toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* fixed, full-viewport particle field that sits behind all page content,
   so the constellation + name morph stay visible as the user scrolls */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 96px var(--pad) 120px;
  width: 100%;
}
.hero__eyebrow { color: var(--ink-3); margin: 0 0 28px; }
.hero__title {
  margin: 0 0 28px;
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero__title-accent {
  /* keep it monochrome; a whisper of blue only on this word */
  color: var(--accent);
}
.hero__sub {
  max-width: 560px;
  margin: 0 0 40px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
  color: var(--ink-2);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scrollhint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
}
.hero__scrollline {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--line-strong), transparent);
  animation: drop 2.2s var(--ease) infinite;
}
@keyframes drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; z-index: 1; }
.section--tint { background: transparent; box-shadow: 0 -1px 0 var(--line), 0 1px 0 var(--line); }
.section--dark { background: rgba(5, 6, 7, 0.82); color: var(--d-ink); }

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.section__head { margin-bottom: clamp(40px, 6vw, 72px); }
.section__kicker { color: var(--ink-3); margin: 0 0 18px; }
.section__kicker--dark { color: var(--d-ink-3); }
.section__title {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.section__title--dark { color: var(--d-ink); }

/* ---------- Manifesto ---------- */
.manifesto__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.manifesto__lead {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.manifesto__text {
  margin: 0 0 36px;
  color: var(--ink-2);
}
.manifesto__values { list-style: none; margin: 0; padding: 0; }
.manifesto__values li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 16px 0;
  box-shadow: 0 1px 0 var(--line);
}
.manifesto__values .mono-label { color: var(--ink); }
.manifesto__values span:last-child { color: var(--ink-2); font-size: 15px; }

/* ---------- Cards (fields of exploration) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 28px 36px;
  box-shadow: var(--line) 0 0 0 1px,
              rgba(0, 0, 0, 0.04) 0 2px 2px,
              var(--bg-tint) 0 0 0 1px;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover {
  box-shadow: var(--line-strong) 0 0 0 1px,
              rgba(0, 0, 0, 0.05) 0 6px 16px -8px;
  transform: translateY(-3px);
}
.card__index {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 56px;
  border-radius: 50%;
  box-shadow: var(--line) 0 0 0 1px;
  color: var(--ink);
}
.card__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card__text { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* ---------- Coexistence (dark) ---------- */
.coexistence {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0;
}
.coexistence__badge {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 4px;
  box-shadow: var(--d-line) 0 0 0 1px;
}
.coexistence__symbol {
  font-family: var(--mono);
  font-size: 24px;
  color: var(--d-ink);
}
.coexistence__num {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--d-ink-3);
}
.coexistence__heading {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--d-ink);
}
.coexistence__text { margin: 0; color: var(--d-ink-2); font-size: 15.5px; }

.coexistence__bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 220px;
  justify-content: center;
}
.coexistence__pulse {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, transparent, var(--d-line), transparent);
  position: relative;
  overflow: hidden;
}
.coexistence__pulse::after {
  content: "";
  position: absolute;
  left: -1.5px;
  top: -12px;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: var(--white);
  opacity: 0.9;
  animation: pulse-run 2.6s var(--ease) infinite;
}
@keyframes pulse-run {
  0%   { top: -12px; opacity: 0; }
  15%  { opacity: 0.9; }
  85%  { opacity: 0.9; }
  100% { top: 100%; opacity: 0; }
}
.coexistence__bridgelabel { color: var(--d-ink-3); writing-mode: vertical-rl; }

.coexistence__note {
  max-width: 640px;
  margin: clamp(24px, 4vw, 48px) auto 0;
  text-align: center;
  color: var(--d-ink-2);
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Contact ---------- */
.contact {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.contact__text { color: var(--ink-2); margin: 0 0 28px; }
.contact__hint { color: var(--ink-3); margin-top: 24px; }

/* ---------- Section lead (services / pricing intros) ---------- */
.section__lead {
  max-width: 640px;
  margin: 0 0 clamp(40px, 6vw, 64px);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------- Pricing ---------- */
.pricing__list {
  list-style: none;
  margin: 0 0 clamp(28px, 4vw, 40px);
  padding: 0;
  max-width: 820px;
}
.pricing__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  box-shadow: 0 1px 0 var(--line);
}
.pricing__name {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pricing__price {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  white-space: nowrap;
}
.pricing__more {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 15px;
}
.pricing__mail {
  color: var(--ink);
  font-family: var(--mono);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line-strong);
  margin-left: 6px;
}
.pricing__mail:hover { box-shadow: 0 1px 0 var(--ink); }
.pricing__vat {
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
}
@media (max-width: 560px) {
  .pricing__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .pricing__price { font-size: 14px; }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  box-shadow: 0 -1px 0 var(--line);
  padding: 56px 0 40px;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer__logo { width: 192px; height: auto; opacity: 0.95; }
.footer__wordmark {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.footer__tag { color: var(--ink-3); }
.footer__copy {
  color: var(--ink-3);
  margin: 0;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer__copy span { display: block; }
.footer__version {
  display: block;
  margin: 0;
  padding: 3px 12px;
  border-radius: 4px;
  box-shadow: var(--line) 0 0 0 1px;
  color: var(--ink-2);
  letter-spacing: 0.08em;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* stagger within grids */
.cards .reveal:nth-child(2) { transition-delay: 0.1s; }
.cards .reveal:nth-child(3) { transition-delay: 0.2s; }
.coexistence .reveal:nth-child(1) { transition-delay: 0s; }
.coexistence .reveal:nth-child(3) { transition-delay: 0.15s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .manifesto__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 28px 24px 32px; }
  .card__index { margin-bottom: 32px; }
  .coexistence { grid-template-columns: 1fr; }
  .coexistence__bridge {
    flex-direction: row;
    min-height: 60px;
    padding: 8px 0;
  }
  .coexistence__pulse { width: auto; height: 1px; flex: 1; }
  .coexistence__pulse::after {
    left: -12px; top: -1.5px;
    width: 12px; height: 4px;
    animation-name: pulse-run-h;
  }
  .coexistence__bridgelabel { writing-mode: horizontal-tb; }
}

@keyframes pulse-run-h {
  0%   { left: -12px; opacity: 0; }
  15%  { opacity: 0.9; }
  85%  { opacity: 0.9; }
  100% { left: 100%; opacity: 0; }
}

@media (max-width: 768px) {
  /* mobile: brand stays prominent, but must never collide with EN/DE.
     The brand may shrink when space is tight; the action cluster may not. */
  :root { --nav-h: 108px; }
  .nav__inner { height: var(--nav-h); gap: 12px; }
  .nav__brand { gap: 8px; flex: 0 1 auto; min-width: 0; }
  .nav__logo { width: 100px; flex-shrink: 1; }
  .nav__wordmark { font-size: 17px; white-space: nowrap; }
  .nav__actions { gap: 10px; flex: 0 0 auto; }
  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    box-shadow: 0 1px 0 var(--line);
    padding: 8px var(--pad) 16px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 0; box-shadow: 0 1px 0 var(--line); }
  .nav__toggle { display: flex; }
  .hero__inner { padding-top: 64px; }
  .manifesto__values li { grid-template-columns: 110px 1fr; }
}

/* very small phones: tighten the bar further so J&M never touches EN/DE */
@media (max-width: 400px) {
  .nav__logo { width: 84px; }
  .nav__wordmark { font-size: 15px; }
  .nav__actions { gap: 8px; }
  .nav__toggle { padding: 6px; }
  .lang-switch { font-size: 11px; gap: 4px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scrollline, .coexistence__pulse::after { animation: none; }
  .card, .btn, .nav__links a { transition: none; }
}
