/* ============================================================
   LUNO Studio — monochrome, clean, mit Mond-Signatur
   ============================================================ */

:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --gray-100: #F2F2F0;
  --gray-400: #9C9C98;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --pad-x: clamp(1.25rem, 5vw, 5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 800;
  font-variation-settings: "wdth" 110;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}

.eyebrow-light { color: rgba(255, 255, 255, 0.5); }

/* ============ HERO ============ */

/* Der Leuchtkasten ist an der Wand montiert: Er bleibt beim Scrollen
   stehen, die Seite schiebt sich davor. */
.hero {
  position: sticky;
  top: 0;
  z-index: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.marquee, main, .footer { position: relative; z-index: 1; }

main { background: var(--paper); }

/* Betonwand-Körnung — Anspielung auf das Logo-Mockup */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Fixierte Nav: invertiert per Differenz über jedem Hintergrund;
   das O im Logo ist ein Mond, der den Scrollfortschritt als Phase zeigt. */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  mix-blend-mode: difference;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem var(--pad-x);
  transition: transform 0.35s ease, background-color 0.3s ease, padding 0.3s ease;
}

/* Beim Runterscrollen gleitet die Nav weg (sonst schneidet sie in die Inhalte),
   beim ersten Hochscrollen ist sie sofort wieder da. */
.nav.nav-hidden {
  transform: translateY(-110%);
  pointer-events: none;
}

/* Abseits vom Seitenanfang kehrt die Nav als solider Balken zurück —
   der Differenz-Schwebemodus gehört nur dem Leuchtkasten ganz oben. */
.nav.nav-solid {
  mix-blend-mode: normal;
  background: var(--ink);
  padding: 1rem var(--pad-x);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-moon {
  position: relative;
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.12em;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  vertical-align: -0.02em;
}

.nav-moon-shadow {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: #000;
  /* --scroll 0..1 wird in script.js gesetzt: oben fast Neumond, unten Vollmond */
  transform: translateX(calc(6% + var(--scroll, 0) * 98%));
}

.nav-brand-studio {
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.75em;
  color: rgba(255, 255, 255, 0.55);
}

.nav-links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.25s;
}

.nav-links a:hover { border-color: #fff; }

.nav-cta {
  border: 1px solid #fff !important;
  border-radius: 999px;
  padding: 0.45em 1.1em !important;
  transition: background 0.25s, color 0.25s;
}

.nav-cta:hover { background: #fff; color: #0A0A0A; }

.hero-center {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5.5rem var(--pad-x) 3rem;
}

.wordmark {
  font-size: clamp(4.5rem, 17vw, 15rem);
  font-weight: 600;
  font-variation-settings: "wdth" 105;
  letter-spacing: 0.06em;
  /* hinterleuchtetes Acryl: dauerhafter Rest-Glow.
     WICHTIG: Blur in px halten und moderat — Blur-Radien >100px sprengen
     WebKits Compositing (Footer rendert dann weiß). */
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.16);
}

/* Das O als Mond — an der Grundlinie ausgerichtet, Höhe = Versalhöhe */
.o-moon {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.08em;
  border-radius: 50%;
  background: var(--paper);
  overflow: hidden;
  /* Versalhöhe = 0.686em; runde Form minimal überschießen lassen (optischer Ausgleich) */
  transform: translateY(0.007em);
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.2);
}

.o-shadow {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: var(--ink);
  animation: moonphase 16s ease-in-out infinite;
}

/* Loop startet und endet bei Vollmond — die Boot-Sequenz übergibt nahtlos */
@keyframes moonphase {
  0%, 10% { transform: translateX(104%); } /* Vollmond */
  55%     { transform: translateX(6%); }   /* fast Neumond */
  100%    { transform: translateX(104%); }
}

/* ============ BOOT: der Leuchtkasten wird eingeschaltet (1× pro Session) ============ */

.boot .wordmark { animation: tube-ignite 1.1s linear both; }

@keyframes tube-ignite {
  0%, 34% { opacity: 0; }
  36%     { opacity: 1; filter: brightness(1.6); }
  38%     { opacity: 0.2; }
  46%     { opacity: 1; filter: brightness(1.3); }
  49%     { opacity: 0.55; }
  100%    { opacity: 1; filter: brightness(1); }
}

/* Nach dem Zünden: ein beschleunigter Lauf Neumond → Vollmond, dann Übergabe an den 16s-Loop */
.boot .o-shadow {
  animation:
    moonrise 1.4s cubic-bezier(0.6, 0, 0.2, 1) 1.1s both,
    moonphase 16s ease-in-out 2.5s infinite;
}

@keyframes moonrise {
  from { transform: translateX(6%); }
  to   { transform: translateX(104%); }
}

.boot .o-moon { animation: afterglow 1.6s ease 1.1s both; }

@keyframes afterglow {
  0%   { box-shadow: 0 0 48px rgba(255, 255, 255, 0.35); }
  100% { box-shadow: 0 0 32px rgba(255, 255, 255, 0.2); }
}

.boot .wordmark-sub  { animation: rise 0.7s ease 1.0s both; }
.boot .hero-tagline  { animation: rise 0.7s ease 1.15s both; }
.boot .hero-sub      { animation: rise 0.7s ease 1.25s both; }
/* Nav nur über opacity einblenden — eine Transform-Animation mit Fill würde
   das translateY des Auto-Hide dauerhaft überstimmen */
.boot .nav           { animation: nav-fade 0.7s ease 1.35s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(0.6rem); }
  to   { opacity: 1; transform: none; }
}

@keyframes nav-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.boot .hero::after { animation: grain-in 1.4s ease 0.5s both; }

@keyframes grain-in {
  from { opacity: 0; }
  to   { opacity: 0.07; }
}

.wordmark-sub {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.8em;
  text-indent: 0.8em; /* optischer Ausgleich der Sperrung */
  text-transform: uppercase;
  font-size: clamp(0.8rem, 2.2vw, 1.6rem);
  color: var(--gray-400);
  margin-top: 0.5rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  margin-top: clamp(2rem, 5vh, 4rem);
}

.hero-sub {
  color: var(--gray-400);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  margin-top: 0.9rem;
}

/* ============ MARQUEE ============ */

.marquee {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  padding: 1.1rem 0;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.marquee-track > span { flex-shrink: 0; }

.marquee-moon {
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.08em;
  margin: 0 1.1em;
  color: var(--ink);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */

.section {
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad-x);
  scroll-margin-top: 3.5rem; /* Anker landen nicht unter der fixierten Nav */
}

.section-gray { background: var(--gray-100); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.section-intro {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: #555;
  max-width: 34rem;
}

/* ============ LEISTUNGEN ============ */

.services {
  list-style: none;
  border-top: 1px solid var(--ink);
}

/* Lichtkante: die Schwärze wischt von der Cursor-Seite herein, die Zeichen
   invertieren per Differenz exakt an der wandernden Kante. */
.service a {
  position: relative;
  isolation: isolate;           /* Differenz darf nicht bis zum Sticky-Hero durchrechnen */
  background: var(--paper);
  display: grid;
  grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.4rem, 3.5vw, 2.2rem) clamp(0.5rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}

.service a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: var(--origin, top);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}

.service a:hover::before,
.service a:focus-visible::before { transform: scaleY(1); }

.service-num {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-feature-settings: "tnum";
  color: #AAA;
  mix-blend-mode: difference;
}

.service h3 {
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-weight: 700;
  font-variation-settings: "wdth" 108;
  text-transform: uppercase;
  color: #FFF;
  mix-blend-mode: difference;
}

/* #AAA per Differenz: über Papier = #555, über Schwarz ≈ Grauton des alten Hovers */
.service p {
  color: #AAA;
  mix-blend-mode: difference;
  font-size: 0.98rem;
}

.service-arrow {
  font-size: 1.6rem;
  color: #FFF;
  mix-blend-mode: difference;
  transition: transform 0.3s;
}

.service a:hover .service-arrow {
  transform: translateX(0.4em);
  transition-delay: 0.12s;      /* der Pfeil folgt dem Wipe */
}

/* ============ ARBEITSWEISE ============ */

.phases {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
}

.phase-moon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.4rem;
  color: var(--ink);
}

.phase h3 {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}

.phase-num {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--gray-400);
}

.phase p { font-size: 0.95rem; color: #555; }

/* ============ STUDIO / DUO ============ */

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.duo.values { grid-template-columns: repeat(3, 1fr); }

.duo-card {
  border: 1px solid var(--ink);
  padding: clamp(1.75rem, 4vw, 3rem);
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.duo-card:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-4px);
}

.duo-letters {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.duo-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
}

.duo-role {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin: 0.4rem 0 1.1rem;
}

.duo-card > p:last-child { font-size: 0.98rem; }

.duo-card:hover > p:last-child { color: var(--gray-100); }

/* ============ FOOTER ============ */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad-x) 2rem;
  text-align: center;
}

.footer-cta a {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s, opacity 0.3s;
}

.footer-cta a:hover { opacity: 0.85; }

/* Der Schlusspunkt der Seite ist ein winziger Mond, der beim Erreichen
   des Footers aufploppt und zum Vollmond durchwischt. */
.dot-moon {
  position: relative;
  display: inline-block;
  width: 0.14em;
  height: 0.14em;
  margin-left: 0.05em;
  border-radius: 50%;
  background: var(--paper);
  overflow: hidden;
  transform: scale(0);
}

.dot-shadow {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: var(--ink);
}

.footer-cta.is-visible .dot-moon {
  transform: scale(1);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}

.footer-cta.is-visible .dot-shadow { animation: dot-full 0.9s ease 0.7s both; }

@keyframes dot-full {
  from { transform: translateX(8%); }
  to   { transform: translateX(106%); }
}

.footer-mail { margin-top: 1.5rem; }

.footer-mail a {
  color: var(--gray-400);
  font-size: 1.05rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footer-mail a:hover { color: var(--paper); }

.footer-bottom {
  margin-top: clamp(4rem, 8vw, 6rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
}

.footer-brand span {
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.75em;
  color: var(--gray-400);
}

.footer-meta { font-size: 0.82rem; color: var(--gray-400); }

.footer-meta a { color: inherit; }

/* ============ REVEALS ============ */

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 860px) {
  .phases { grid-template-columns: repeat(2, 1fr); }
  .duo.values { grid-template-columns: 1fr; }
  .service a { grid-template-columns: auto 1fr auto; }
  .service p { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .nav { padding: 1.25rem var(--pad-x); }
  .nav-brand-studio { display: none; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.82rem; }
  .nav-cta { padding: 0.35em 0.85em !important; }
  .phases { grid-template-columns: 1fr; }
  .duo, .duo.values { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ============ REDUCED MOTION ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .o-shadow { animation: none !important; transform: translateX(104%); } /* Vollmond, statisch */
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .duo-card, .service a, .footer-cta a, .nav { transition: none; }
  /* Boot-Sequenz aus: das Licht ist sofort an */
  .boot .wordmark, .boot .o-moon, .boot .hero::after,
  .boot .wordmark-sub, .boot .hero-tagline, .boot .hero-sub, .boot .nav { animation: none; }
  .service a::before { transition: none; }
  .dot-moon { transform: scale(1); transition: none; }
  .footer-cta.is-visible .dot-shadow { animation: none; }
  .dot-shadow { transform: translateX(106%); } /* statischer Vollmond-Punkt */
}
