/* ============================================
   MASSIV — Architektur-Konzeptstudie
   Bold, image-led, motion-driven
   ============================================ */

/* Self-hosted variable fonts (latin subset, woff2).
   No external requests → DSGVO-friendly, faster. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/archivo-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin-italic.woff2') format('woff2');
}

/* Metric-matched fallback so layout doesn't shift on font swap. */
@font-face {
  font-family: 'Archivo Fallback';
  src: local('Arial');
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
  size-adjust: 103%;
}
@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia');
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
  size-adjust: 100%;
}

:root {
  --bg: #f4f0e8;        /* warm off-white */
  --fg: #1a1612;        /* near-black */
  --fg-dim: #6f6860;
  --white: #fdfdfd;     /* near-white, neutral */
  --accent: #c84b1a;    /* terracotta accent */
  --line: rgba(26, 22, 18, 0.14);
  --terra: #d9542a;
  --sand: #d9c79b;
  --olive: #62624a;
  --dark: #17140f;
  --font-display: 'Archivo', 'Archivo Fallback', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
  --pad: clamp(20px, 3.2vw, 44px);
}

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

html {
  scroll-behavior: auto; /* Lenis manages */
  scrollbar-gutter: stable;
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'ss02';
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

::selection { background: var(--fg); color: var(--bg); }

/* ============================================
   Splendable Concept Frame (cross-concept)
   ============================================ */
.sp-frame {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #11182a 0%, #080d18 100%);
  color: #ffffff;
  border: 1px solid rgba(49, 130, 206, 0.45);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow:
    0 10px 32px rgba(30, 90, 156, 0.34),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 13px;
  letter-spacing: 0.005em;
  line-height: 1;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms ease, border-color 220ms ease;
  will-change: transform;
  animation: sp-frame-in 600ms cubic-bezier(.2,.7,.2,1) 400ms both;
}
@keyframes sp-frame-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sp-frame:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 163, 230, 0.75);
  box-shadow:
    0 14px 38px rgba(30, 90, 156, 0.45),
    0 6px 18px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}
.sp-frame-arrow {
  font-size: 14px;
  line-height: 1;
  color: #8cc1ee;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}
.sp-frame:hover .sp-frame-arrow { transform: translateX(-3px); }
.sp-frame-text {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.sp-frame-brand {
  font-weight: 600;
  letter-spacing: 0.005em;
}
.sp-frame-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 100px;
  background: rgba(49, 130, 206, 0.22);
  color: #b8d2ee;
  border: 1px solid rgba(49, 130, 206, 0.40);
}
@media (max-width: 540px) {
  .sp-frame { bottom: 12px; left: 12px; padding: 8px 13px 8px 11px; font-size: 12px; gap: 8px; }
  .sp-frame-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-frame, .sp-frame-arrow { transition: none; animation: none; }
}

/* ============================================
   Header
   ============================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad);
  color: var(--white);
  background: rgba(20, 16, 12, 0.38);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
}

/* Light variant once user scrolled past the dark hero */
.site-header.is-light {
  background: rgba(244, 240, 232, 0.78);
  color: var(--fg);
  border-bottom-color: rgba(26, 22, 18, 0.08);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.menu-btn {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  text-transform: uppercase;
}

.menu-btn span { font-size: 18px; line-height: 1; }

.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--fg);
  color: var(--bg);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.menu-overlay.open { opacity: 1; visibility: visible; }

.menu-overlay nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.menu-overlay a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 7vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  /* Site-header is fixed at top; reserve its height (~64px on this concept)
     so the title is not clipped by the header. */
  margin-top: 64px;
  height: calc(100vh - 64px);
  height: calc(100svh - 64px);
  min-height: 0;
  overflow: hidden;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-img,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  transform: translateZ(0);
  pointer-events: none;
}

.hero-img {
  animation: heroZoom 24s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
}

@keyframes heroZoom {
  from { transform: scale(1.18) translateZ(0); }
  to   { transform: scale(1.0) translateZ(0); }
}

.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 30%, rgba(0,0,0,0.20) 60%, rgba(0,0,0,0.50) 100%),
    rgba(0,0,0,0.12);
  pointer-events: none;
}

/* Header marquee */
.header-marquee {
  flex: 1;
  min-width: 0;
  margin: 0 clamp(40px, 6vw, 96px);
  overflow: hidden;
  pointer-events: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.01em;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: marquee 120s linear infinite;
  will-change: transform;
}

.marquee-half {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
  flex: 0 0 auto;
}

.marquee-track .dot {
  font-size: 6px;
  opacity: 0.65;
  font-style: normal;
}

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

/* Giant title */
.hero-title {
  position: absolute;
  top: 50%;
  left: var(--pad);
  right: var(--pad);
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(72px, 17vw, 280px);
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.18em;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.25);
}

.word {
  display: inline-block;
  overflow: hidden;
  line-height: 0.82;
  padding: 0.18em 0 0.08em;
  margin: -0.18em 0 -0.08em;
}

.word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(0.16, 0.84, 0.24, 1);
  will-change: transform;
}

.word.is-in .word-inner { transform: translateY(0); }

/* Scroll circle */
.scroll-circle {
  position: absolute;
  bottom: 36px;
  right: var(--pad);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--white);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 10;
  transition: transform 0.4s ease;
  animation: float 3.2s ease-in-out infinite;
}

.scroll-circle:hover { transform: scale(1.08); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ============================================
   Shared reveal primitives
   ============================================ */

.reveal,
.reveal-line {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform, opacity;
}

.reveal.is-in,
.reveal-line.is-in {
  opacity: 1;
  transform: translateY(0);
}

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--fg);
  border-radius: 99px;
  margin-bottom: 48px;
  line-height: 1;
}

/* ============================================
   Intro statement
   ============================================ */

.intro {
  padding: clamp(100px, 16vh, 200px) var(--pad);
  max-width: 1600px;
  margin: 0 auto;
}

.intro-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-top: 0;
}

.intro-text .reveal-line {
  display: block;
}

.intro-text .reveal-line:nth-child(1) { transition-delay: 0.02s; }
.intro-text .reveal-line:nth-child(2) { transition-delay: 0.08s; }
.intro-text .reveal-line:nth-child(3) { transition-delay: 0.14s; }
.intro-text .reveal-line:nth-child(4) { transition-delay: 0.2s; }
.intro-text .reveal-line:nth-child(5) { transition-delay: 0.26s; }
.intro-text .reveal-line:nth-child(6) { transition-delay: 0.32s; }

/* ============================================
   Philosophy (split)
   ============================================ */

.philosophy {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 100px);
  padding: clamp(60px, 10vh, 140px) var(--pad);
  max-width: 1600px;
  margin: 0 auto;
  align-items: center;
}

.philosophy-img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
}

.img-parallax {
  width: 100%;
  height: 115%;
  margin-top: -7.5%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #2a2420;
  will-change: transform;
}

.philosophy-text h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
  text-transform: none;
}

.philosophy-text h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.philosophy-text p:not(.tag) {
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 48ch;
}

/* ============================================
   Services (colored blocks)
   ============================================ */

.services {
  padding-top: clamp(60px, 10vh, 120px);
}

.services-head {
  padding: 0 var(--pad) 40px;
  max-width: 1600px;
  margin: 0 auto;
}

.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 68vh;
  overflow: hidden;
  position: relative;
}

.service-block--terra { background: var(--terra); color: var(--white); }
.service-block--dark  { background: var(--dark);  color: var(--white); }
.service-block--sand  { background: var(--sand);  color: var(--fg); }
.service-block--olive { background: var(--olive); color: var(--white); }

.service-text {
  padding: clamp(40px, 6vw, 100px) clamp(30px, 4vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}

.huge-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(54px, 9vw, 160px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.service-text p {
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.5;
  max-width: 40ch;
  opacity: 0.85;
}

.service-img {
  overflow: hidden;
  position: relative;
}

/* ============================================
   Work grid
   ============================================ */

.work {
  padding: clamp(80px, 14vh, 160px) var(--pad);
  max-width: 1600px;
  margin: 0 auto;
}

.work-head { margin-bottom: 48px; }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 40px;
}

.work-card:nth-child(even) { margin-top: 100px; }

.work-img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 2px;
}

.work-card:hover .img-parallax { transform: scale(1.04); }
.work-card .img-parallax { transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1); }

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 15px;
}

.work-meta span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 26px);
  letter-spacing: -0.02em;
}

.work-meta span:last-child {
  color: var(--fg-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   Clients list
   ============================================ */

.clients {
  padding: clamp(80px, 14vh, 160px) var(--pad);
  max-width: 1600px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.clients-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 56px);
  letter-spacing: -0.03em;
}

.clients-list li {
  overflow: hidden;
  padding: 2px 0;
  line-height: 1.2;            /* fixed row height — immune to font swap */
  height: 1.2em;
}

.clients-list li span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s cubic-bezier(0.16, 0.84, 0.24, 1);
  will-change: transform;
}

.clients-list li.is-in span {
  transform: translateY(0);
}

.clients-list li:hover span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

/* ============================================
   CTA + Footer
   ============================================ */

.cta {
  padding: clamp(100px, 16vh, 200px) var(--pad);
  max-width: 1600px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 11vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.18em;
  margin-bottom: 60px;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 52px);
  letter-spacing: -0.025em;
  padding: 14px 0;
  border-bottom: 2px solid var(--fg);
  transition: gap 0.4s ease, color 0.3s ease;
}

.cta-link:hover { gap: 40px; color: var(--accent); border-color: var(--accent); }

.cta-link em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}

.cta-arrow { font-weight: 300; }

.footer {
  padding: 60px var(--pad) 80px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-dim);
}

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

.footer-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 14px;
}

.footer-meta { text-align: right; }
.footer-disclaimer {
  margin-top: 12px !important;
  font-family: var(--font-display);
  font-size: 10px !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  opacity: 0.6;
}
.footer .is-demo { cursor: default; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .hero-marquee { width: calc(100% - 120px); font-size: 14px; }
  .hero-title { bottom: 140px; }
  .scroll-circle { width: 76px; height: 76px; font-size: 11px; }

  .philosophy { grid-template-columns: 1fr; gap: 40px; }

  .service-block { grid-template-columns: 1fr; min-height: auto; }
  .service-img { aspect-ratio: 4 / 3; }

  .work-grid { grid-template-columns: 1fr; gap: 40px; }
  .work-card:nth-child(even) { margin-top: 0; }

  .clients-list { grid-template-columns: 1fr; }

  .footer { grid-template-columns: 1fr 1fr; }
  .footer-meta { text-align: left; grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .word-inner, .clients-list li span { transform: translateY(0) !important; }
  .reveal, .reveal-line { opacity: 1 !important; transform: none !important; }
}
