/* Varatharajan Solutions – Landingpage (Entwurf 1c «Monolith») */

:root {
  --ink: #0a0a0a;
  --paper: #f7f7f5;
  --text: #333333;
  --muted: #555555;
  --line: #d6d6d2;
  --dark-muted: #a3a3a3;
  --dark-label: #b3b3b3;
  --dark-text: #cccccc;
  --dark-border: #6b6b6b;

  --serif: 'IBM Plex Serif', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; }

a { color: inherit; text-decoration: none; }

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

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

/* ---------- Links mit wachsender Unterstreichung ---------- */

.link {
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0% 1px;
  transition: background-size 0.45s var(--ease-out);
}
.link:hover,
.link:focus-visible {
  background-position: 0 100%;
  background-size: 100% 1px;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.45s var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.45s var(--ease-out);
}
.btn:hover,
.btn:focus-visible { color: var(--paper); }
.btn:hover::before,
.btn:focus-visible::before { transform: scaleY(1); }

.btn-light {
  padding: 0 32px;
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}
.btn-light::before { background: var(--ink); }
.btn-light:hover,
.btn-light:focus-visible { color: var(--paper); }
.btn-light:disabled { cursor: progress; opacity: 0.6; }

.note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.note.light { color: var(--dark-label); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow.light { color: var(--dark-label); }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  min-height: clamp(680px, 100svh, 960px);
}

.hero-stage {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 32px 48px 48px;
  background: var(--ink);
  color: var(--paper);
}

.stage-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stage-top .muted { color: var(--dark-muted); }

.stage-logo {
  display: block;
  align-self: center;
  width: min(360px, 70%);
  height: auto;
}

.stage-trio {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--dark-muted);
}

.hero-text {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
  padding: 32px 56px 56px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px 32px;
  font-family: var(--sans);
  font-size: 14px;
}

.lang {
  display: flex;
  gap: 4px;
  font-size: 13px;
}
.lang button {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.3s ease;
}
.lang button:hover { text-decoration-color: var(--dark-muted); }
.lang button[aria-pressed="true"] { text-decoration-color: var(--ink); }

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hero-title {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 76px);
  line-height: 1.04;
  font-weight: 300;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-sub {
  margin: 0;
  max-width: 470px;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  font-family: var(--sans);
}

/* ---------- Leistungen ---------- */

.services {
  max-width: 1344px;
  margin: 0 auto;
  padding: 120px 48px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.section-head h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

.service-list {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}

.service {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--ink);
}
.service .roman {
  flex: 0 0 88px;
  font-size: 15px;
  font-style: italic;
}
.service h3 {
  flex: 4 1 260px;
  margin: 0;
  font-size: clamp(30px, 2.8vw, 40px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  transition: transform 0.6s var(--ease-out);
}
.service p {
  flex: 5 1 320px;
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  text-wrap: pretty;
}
.service .tags {
  flex: 3 1 200px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

@media (hover: hover) {
  .service:hover h3 { transform: translateX(12px); }
}

/* ---------- Kontakt ---------- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 120px 32px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.contact h2 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(40px, 5.6vw, 80px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.form {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
  font-family: var(--sans);
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--dark-text);
}
.form-row label { flex: 1 1 240px; }

.form input,
.form textarea {
  width: 100%;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--dark-border);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.form input { min-height: 52px; padding: 0 16px; }
.form textarea { padding: 14px 16px; resize: vertical; min-height: 140px; }
.form input:hover,
.form textarea:hover { border-color: var(--dark-muted); }
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--paper);
  background-color: rgba(247, 247, 245, 0.04);
}
.form [aria-invalid="true"] { border-color: #e8a3a3; }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.form-status {
  margin: 0;
  min-height: 1.5em;
  font-size: 14px;
  color: var(--dark-text);
}
.form-status.error { color: #e8a3a3; }

/* Honeypot: für Menschen unsichtbar, für Screenreader ausgeblendet */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-thanks {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 36px);
  font-style: italic;
}

.contact-mail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.contact-mail .note { margin: 0; font-size: 15px; }
.contact-mail .btn { min-height: 56px; padding: 0 36px; font-size: 16px; }

.contact-address {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--dark-text);
}

/* ---------- Impressum ---------- */

.imprint {
  max-width: 1344px;
  margin: 0 auto;
  padding: 96px 48px 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
.imprint h2 {
  flex: 1 1 260px;
  margin: 0;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--ink);
}
.imprint > div {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
}
.imprint strong { font-weight: 500; color: var(--ink); }
.imprint .mail-reveal,
.imprint a.mail {
  min-height: 44px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  background-image: none;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px 48px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  color: #444444;
}
.footer-links { display: flex; gap: 24px; }

/* ---------- Datenschutz / Rechtstexte ---------- */

.legal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 48px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.legal-header a { display: inline-flex; align-items: center; gap: 14px; }
.legal-header img { width: 28px; height: auto; }

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 32px 120px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.legal h1 {
  margin: 20px 0 16px;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
}
.legal h2 {
  margin: 56px 0 12px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}
.legal p,
.legal ul { margin: 0 0 16px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal strong { font-weight: 500; color: var(--ink); }
.legal a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.legal .meta { color: var(--muted); font-size: 14px; }
.legal .back { margin-top: 64px; }

/* ---------- Animationen ----------
   Nur aktiv, wenn JavaScript läuft (Klasse .js) und der Nutzer keine
   reduzierte Bewegung wünscht. Ohne JS bleibt alles sofort sichtbar. */

@media (prefers-reduced-motion: no-preference) {

  /* Intro-Sequenz im Hero, gestaffelt über --d */
  .js .intro {
    opacity: 0;
    transform: translateY(16px);
    animation: fade-up 0.9s var(--ease-out) forwards;
    animation-delay: calc(var(--d, 0) * 110ms + 150ms);
  }

  /* Logo: weiches Einblenden mit leichtem Zoom */
  .js .stage-logo {
    opacity: 0;
    transform: scale(0.94);
    filter: blur(6px);
    animation: logo-in 1.6s var(--ease-out) 0.2s forwards;
  }

  /* Titel: Wort für Wort aus einer Maske */
  .js .hero-title .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
  }
  .js .hero-title .w > span {
    display: inline-block;
    transform: translateY(110%);
    animation: word-up 1s var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 70ms + 350ms);
  }

  /* Scroll-Reveal */
  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.9s var(--ease-out),
      transform 0.9s var(--ease-out);
    transition-delay: calc(var(--rd, 0) * 90ms);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Leistungen: Linie zeichnet sich von links nach rechts */
  .js .service.reveal {
    border-bottom-color: transparent;
  }
  .js .service.reveal::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 1.2s var(--ease-in-out);
    transition-delay: calc(var(--rd, 0) * 90ms + 150ms);
  }
  .js .service.reveal.is-visible::after { transform: scaleX(1); }

  .js .service-list.reveal-line { border-top-color: transparent; }
  .js .service-list.reveal-line::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 1.2s var(--ease-in-out);
  }
  .js .service-list.reveal-line.is-visible::before { transform: scaleX(1); }

  /* Danke-Nachricht nach dem Senden */
  .form-thanks { animation: fade-up 0.8s var(--ease-out) both; }
}

/* ---------- Zusätzliche Bewegung ---------- */

/* Fortschrittslinie: invertiert sich über hellen und dunklen Flächen */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 2px;
  background: #ffffff;
  mix-blend-mode: difference;
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Laufband zwischen Hero und Leistungen */
.marquee { display: none; }
.js .marquee {
  display: block;
  overflow: hidden;
  padding: 28px 0;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
  user-select: none;
}
.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee-item {
  padding: 0 28px;
  font-size: clamp(30px, 4.4vw, 64px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
}
.marquee-sep {
  font-family: var(--sans);
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 300;
  color: var(--muted);
}

/* Logo-Bühne: Parallax bleibt innerhalb der dunklen Fläche */
.hero-stage { overflow: hidden; }
.stage-top,
.stage-trio { position: relative; z-index: 1; }
.stage-logo { will-change: translate; }

/* Buttons: magnetisch, kehren weich zurück */
.btn { transition: color 0.45s var(--ease-out), translate 0.5s var(--ease-out); }

/* Senden: laufende Linie am unteren Rand */
.btn.is-loading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40%;
  height: 2px;
  background: var(--ink);
  animation: loading-bar 1.1s var(--ease-in-out) infinite;
}

/* Leistungen: Fläche fährt beim Hover von links ein */
.service { isolation: isolate; }
.service::before {
  content: "";
  position: absolute;
  inset: 0 -24px;
  z-index: -1;
  background: #ecece8;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease-out);
}
.service .roman,
.service .tags { transition: transform 0.6s var(--ease-out), color 0.4s ease; }

@media (hover: hover) {
  .service:hover::before { transform: scaleX(1); }
  .service:hover .roman { transform: translateX(8px); }
  .service:hover .tags { color: var(--ink); }
}

/* Formular: Beschriftung reagiert auf Fokus */
.form label { transition: color 0.3s ease; }
.form label:focus-within { color: var(--paper); }

@media (prefers-reduced-motion: no-preference) {

  /* Überschriften Wort für Wort beim Scrollen */
  .js .reveal[data-split] {
    opacity: 1;
    transform: none;
  }
  .js .reveal[data-split] .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
  }
  .js .reveal[data-split] .w > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 55ms);
  }
  .js .reveal[data-split].is-visible .w > span { transform: none; }

  /* Formularfelder nacheinander */
  .js .form.reveal label,
  .js .form.reveal .form-foot {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  }
  .js .form.reveal.is-visible label,
  .js .form.reveal.is-visible .form-foot { opacity: 1; transform: none; }
  .js .form.reveal .form-row label:nth-child(2) { transition-delay: 80ms; }
  .js .form.reveal > label { transition-delay: 160ms; }
  .js .form.reveal .form-foot { transition-delay: 240ms; }

  /* Laufband blendet beim Laden ein */
  .js .marquee {
    animation: fade-up 1s var(--ease-out) 0.9s both;
  }
}

@keyframes loading-bar {
  from { transform: translateX(-100%); }
  to   { transform: translateX(250%); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(0.94); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

@keyframes word-up {
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

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

@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero-stage { padding: 24px 24px 32px; gap: 40px; }
  .stage-logo { width: min(220px, 55%); }
  .hero-text { padding: 24px 24px 64px; gap: 48px; }
  .nav { justify-content: flex-start; gap: 4px 24px; }
  .services { padding: 88px 24px; gap: 48px; }
  .service { padding: 32px 0; }
  .service .roman { flex-basis: 100%; }
  .contact { padding: 88px 24px; }
  .imprint { padding: 72px 24px 48px; }
  .footer { padding: 24px; }
  .legal-header { padding: 20px 24px; }
  .legal { padding: 64px 24px 88px; }
}

@media (max-width: 480px) {
  .stage-top .muted { display: none; }
  .form-foot .btn { width: 100%; }
}

@media print {
  .hero-stage,
  .contact { background: none; color: var(--ink); }
  .stage-logo,
  .nav,
  .form { display: none; }
}
