@import url('./tokens.css');

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

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

body {
  margin: 0;
  background: var(--fpv-bg);
  color: var(--fpv-text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.eyebrow {
  display: inline-block;
  /* width: max-content keeps the chip hugging its label even when a flex/grid parent would otherwise stretch it. */
  width: max-content;
  max-width: 100%;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fpv-text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease-out-quart), background 0.2s, color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--fpv-accent); color: var(--black); }
.btn-primary:hover { background: #d8ff5c; }
.btn-secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.25); }
.btn-secondary:hover { background: rgba(255,255,255,0.06); }

/* ────────── Navbar ────────── */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1rem 0;
  /* Subtle dark gradient guarantees nav legibility even when the hero scrub
     happens to land on a bright frame (sky, snow, etc). Fades to transparent
     about a navbar's height below — hero content still feels edge-to-edge. */
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.18) 60%, transparent 100%);
  transition: background 0.3s var(--ease-out-quart), backdrop-filter 0.3s;
}
.navbar.is-scrolled {
  background: rgba(23,23,23,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-brand .brand-mark { color: var(--fpv-accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--fpv-text-muted);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--fpv-text); }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--fpv-text-muted);
}
.lang-switch a { padding: 0.25rem 0.5rem; border-radius: 0.375rem; }
.lang-switch a.is-active { color: var(--fpv-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--fpv-text);
  padding: 0.5rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  /* Mobile top bar: brand + lang-switch + hamburger only.
     Primary CTA hides — the dropdown's "Kontakt/Contact" link is the same destination. */
  .navbar-inner { gap: 0.75rem; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-primary { display: none; }
  .nav-cta { gap: 0.5rem; }
  .lang-switch { font-size: 0.8125rem; }

  .navbar.is-open .navbar-inner { position: relative; }
  .navbar.is-open .nav-links {
    display: flex;
    position: absolute;
    inset: calc(100% + 0.5rem) 1rem auto 1rem;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    background: var(--fpv-surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 48px rgba(0,0,0,0.45);
    gap: 0;
  }
  .navbar.is-open .nav-links a {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--fpv-text);
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
  }
  .navbar.is-open .nav-links a:hover,
  .navbar.is-open .nav-links a:active,
  .navbar.is-open .nav-links a.is-active {
    background: rgba(255,255,255,0.06);
    color: var(--fpv-text);
  }

  /* Burger ⇄ close glyph swap. font-size: 0 collapses the HTML "☰" text so
     ::before is the only thing painted — keeps swap CSS-only across 8 HTMLs. */
  .nav-toggle { font-size: 0; line-height: 1; }
  .nav-toggle::before { content: '\2630'; font-size: 1.5rem; line-height: 1; }
  .navbar.is-open .nav-toggle::before { content: '\2715'; }
}

/* ────────── Hero scrub ────────── */

.scrub-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--black);
}
.scrub-section .scrub-video,
.scrub-section .scrub-poster-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  z-index: 1;
}
.scrub-section .scrub-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--black);
}
.scrub-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 6vw, 4rem);
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.scrub-overlay > * { pointer-events: auto; }
.scrub-overlay .hero-title { max-width: 28ch; }
.scrub-overlay .hero-sub { max-width: 50ch; margin-top: 1.25rem; color: rgba(255,255,255,0.85); }
.scrub-overlay .hero-cta { margin-top: 1.75rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ────────── Hero (autoplay) ────────── */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--black);
}
.hero .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ────────── Sections ────────── */

section { padding: clamp(4rem, 10vh, 7rem) 0; }
.section-dark { background: var(--black); }
.section-darker { background: #0e0e0e; }

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 3rem;
  max-width: 60ch;
}
.section-head p { color: var(--fpv-text-muted); font-size: 1.0625rem; }

/* Value-prop strip */
.value-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.value-card {
  padding: 1.75rem;
  background: var(--fpv-surface);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.06);
}
.value-card .value-icon { color: var(--fpv-accent); margin-bottom: 1rem; font-size: 1.5rem; }
.value-card h3 { margin-bottom: 0.5rem; }
.value-card p { color: var(--fpv-text-muted); }

/* Real-estate showcase: sticky left, scrolling right */
.split-showcase {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .split-showcase { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .split-showcase .sticky-text { position: sticky; top: 6rem; }
}
.sticky-text h2 { margin-bottom: 1rem; }
.sticky-text p { color: var(--fpv-text-muted); margin-bottom: 1.5rem; }
.sticky-text ul { padding-left: 1.25rem; margin: 0 0 1.5rem; color: var(--fpv-text-muted); }
.sticky-text ul li { margin-bottom: 0.5rem; }

.case-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--fpv-surface);
  aspect-ratio: 16/10;
}
.case-card video, .case-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-card .case-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.8));
}
.case-card .case-meta h3 { font-size: 1.125rem; }
.case-card .case-meta p { color: var(--fpv-text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.portfolio-grid .case-card { margin-bottom: 0; aspect-ratio: 1/1; }

/* Process */
.process-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: process;
}
.process-step {
  padding: 1.75rem;
  background: var(--fpv-surface);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.06);
  counter-increment: process;
}
.process-step::before {
  content: counter(process, decimal-leading-zero);
  display: block;
  font-size: 0.875rem;
  color: var(--fpv-accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.process-step h3 { margin-bottom: 0.5rem; }
.process-step p { color: var(--fpv-text-muted); font-size: 0.95rem; }

/* Testimonials / clients */
.testimonial {
  max-width: 50rem;
  margin: 0 auto;
  text-align: center;
}
.testimonial blockquote {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.35;
  margin: 0 0 1.5rem;
  font-weight: 500;
}
.testimonial cite { color: var(--fpv-text-muted); font-style: normal; font-size: 0.95rem; }
.client-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  align-items: center;
}
.client-logos img { max-height: 36px; width: auto; opacity: 0.6; transition: opacity 0.2s; }
.client-logos img:hover { opacity: 1; }

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.pricing-card {
  padding: 2rem;
  background: var(--fpv-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pricing-card.is-featured { border-color: var(--fpv-accent); }
.pricing-card h3 { font-size: 1.25rem; }
.pricing-card .price { font-size: 2rem; font-weight: 700; }
.pricing-card .price small { font-size: 0.875rem; color: var(--fpv-text-muted); font-weight: 400; }
.pricing-card ul { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
.pricing-card ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--fpv-text-muted);
  font-size: 0.95rem;
}
.pricing-card ul li:last-child { border-bottom: 0; }

/* FAQ */
.faq-list { max-width: 50rem; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  font-size: 1.0625rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--fpv-accent);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 0 1.5rem;
  color: var(--fpv-text-muted);
  max-width: 70ch;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-form { display: grid; gap: 1rem; }
.contact-form label { display: grid; gap: 0.375rem; font-size: 0.875rem; color: var(--fpv-text-muted); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--fpv-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--fpv-text);
  font-family: inherit;
  font-size: 1rem;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--fpv-accent);
  outline-offset: 1px;
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.form-status { margin: 0; font-size: 0.875rem; min-height: 1.25rem; }
.form-status.is-ok { color: var(--fpv-accent); }
.form-status.is-err { color: #ff6b6b; }
.contact-meta { display: grid; gap: 1.5rem; align-content: start; color: var(--fpv-text-muted); }
.contact-meta dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.contact-meta dd { margin: 0.25rem 0 0; color: var(--fpv-text); }

/* Footer */
.footer {
  background: #0a0a0a;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }
.footer-col h4 { margin-bottom: 1rem; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fpv-text-muted); }
.footer-col a, .footer-col p { display: block; color: var(--fpv-text-muted); padding: 0.25rem 0; font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--fpv-text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--fpv-text-muted);
  font-size: 0.875rem;
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-quart), transform 0.8s var(--ease-out-quart);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}
