﻿/* ============ Scheibenfolierungszentrum — Design Tokens ============ */
:root {
  --bg: #0E1215;
  --bg-elev: #161B1F;
  --surface: #1A2024;
  --surface-2: #232A2F;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --fg: #F2F0EC;
  --fg-muted: #B8B5AE;
  --fg-dim: #7A7A75;
  --accent: oklch(0.68 0.16 152);
  --accent-hover: oklch(0.74 0.17 152);
  --accent-deep: oklch(0.45 0.13 152);
  --accent-glow: oklch(0.68 0.16 152 / 0.25);
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

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

/* ============ Typography ============ */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px; background: var(--accent);
}
.eyebrow.no-line::before { display: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; margin: 0; line-height: 1.05; }
p { margin: 0; }

.h-display { font-size: clamp(48px, 7vw, 96px); }
.h-1 { font-size: clamp(40px, 5vw, 64px); }
.h-2 { font-size: clamp(28px, 3vw, 40px); }

/* ============ Layout ============ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
section { padding: 120px 0; position: relative; }
section.tight { padding: 80px 0; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary {
  background: var(--accent);
  color: #08120C;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 12px 32px -8px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--fg); background: rgba(255,255,255,0.04); }
.btn-wa {
  background: #25D366;
  color: #08120C;
}
.btn-wa:hover { background: #2EE676; transform: translateY(-1px); }

/* ============ Reveal animations ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

.reveal-left { opacity: 0; transform: translateX(-32px); transition: opacity 1s ease, transform 1s cubic-bezier(0.2,0.8,0.2,1); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(32px); transition: opacity 1s ease, transform 1s cubic-bezier(0.2,0.8,0.2,1); }
.reveal-right.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.94); transition: opacity 1s ease, transform 1s cubic-bezier(0.2,0.8,0.2,1); }
.reveal-scale.in { opacity: 1; transform: none; }

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes shimmer-text {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes drift-up {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.float-slow { animation: float-slow 6s ease-in-out infinite; }
.shimmer-text {
  background: linear-gradient(90deg, var(--fg) 0%, var(--accent) 50%, var(--fg) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-text 6s linear infinite;
}

/* Card hover lift */
.lift { transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.4s ease, border-color 0.3s; }
.lift:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -16px rgba(0,0,0,0.5); }

/* Image zoom on hover (apply to img wrapper) */
.img-zoom { overflow: hidden; }
.img-zoom > * { transition: transform 0.8s cubic-bezier(0.2,0.8,0.2,1); }
.img-zoom:hover > * { transform: scale(1.06); }

/* ============ Mobile-frame mode ============ */
body.mobile-mode {
  background: #000;
}
body.mobile-mode .desktop-only { display: none; }
.mobile-only { display: none; }
body.mobile-mode .mobile-only { display: block; }

/* ============ Mobile responsive (real mobile or iPhone frame) ============ */
@media (max-width: 768px) {
  section { padding: 72px 0; }
  section.tight { padding: 56px 0; }
  .container { padding: 0 20px; }
  .h-display { font-size: clamp(40px, 12vw, 64px); }
  .h-1 { font-size: clamp(32px, 9vw, 44px); }
  .h-2 { font-size: clamp(24px, 7vw, 32px); }
}
/* When viewing inside iPhone frame the wrapper queries the iframe width — use a class fallback */
body.mobile-mode section { padding: 64px 0 !important; }
body.mobile-mode section.tight { padding: 48px 0 !important; }
body.mobile-mode .container { padding: 0 18px !important; }
body.mobile-mode .h-1 { font-size: clamp(28px, 8.5vw, 40px) !important; }
body.mobile-mode h1, body.mobile-mode h2 { line-height: 1.08; }

body.mobile-mode .hero-grid { grid-template-columns: 1fr !important; gap: 32px !important; padding-top: 24px !important; padding-bottom: 24px !important; }
body.mobile-mode .hero-typo-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
body.mobile-mode .h-display { font-size: clamp(36px, 11vw, 56px) !important; }
body.mobile-mode .static-hero-img { height: 320px !important; margin-top: 40px !important; }
body.mobile-mode .metrics-grid { grid-template-columns: repeat(2, 1fr) !important; }
body.mobile-mode .metrics-grid > div { border-right: none !important; border-bottom: 1px solid var(--line); }

/* Generic mobile stacking — apply class .stack-mobile to any 2-col grid */
body.mobile-mode .stack-mobile { grid-template-columns: 1fr !important; gap: 28px !important; }
body.mobile-mode .stack-mobile-tight { grid-template-columns: 1fr !important; gap: 16px !important; }

/* Card grids → 1 col on mobile */
body.mobile-mode section [style*="repeat(2, 1fr)"],
body.mobile-mode section [style*="repeat(3, 1fr)"],
body.mobile-mode section [style*="repeat(4, 1fr)"]:not(.metrics-grid) {
  grid-template-columns: 1fr !important;
}
body.mobile-mode section [style*="repeat(6, 1fr)"] { grid-template-columns: repeat(3, 1fr) !important; }

/* Reduce hero paddings on mobile */
body.mobile-mode section[style*="92vh"],
body.mobile-mode section[style*="90vh"],
body.mobile-mode section[style*="88vh"] {
  min-height: auto !important;
  padding: 60px 0 !important;
}

/* Floating CTA size on mobile */
body.mobile-mode .float-btns { right: 14px !important; bottom: 14px !important; gap: 10px !important; }
body.mobile-mode .float-btn { width: 50px !important; height: 50px !important; }
body.mobile-mode .float-btn svg { width: 18px !important; height: 18px !important; }
body.mobile-mode .float-btn svg[viewBox="0 0 24 24"][fill="currentColor"] { width: 22px !important; height: 22px !important; }

/* CTA section collapse in mobile frame */
body.mobile-mode .cta-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
body.mobile-mode .cta-visual { display: none !important; }
body.mobile-mode .before-after-slider { aspect-ratio: 4 / 3 !important; }
body.mobile-mode .gallery-grid { display: flex !important; flex-direction: column !important; gap: 12px !important; }
body.mobile-mode .gallery-item { aspect-ratio: 4 / 3 !important; width: 100% !important; }
body.mobile-mode .hero-content { padding-bottom: 48px !important; padding-top: 56px !important; }

/* Reviews + FAQ sticky disable on mobile */
body.mobile-mode #faq [style*="position: sticky"] { position: static !important; }

/* Footer on mobile */
body.mobile-mode footer [style*="2fr 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; gap: 32px !important; }

/* Contact grid */
body.mobile-mode #contact [style*="1fr 1.2fr"] { grid-template-columns: 1fr !important; }
body.mobile-mode #contact [style*="padding: 48"] { padding: 32px !important; }

/* Hero CTAs centered horizontally if needed */
body.mobile-mode .h-display { font-size: clamp(38px, 13vw, 56px) !important; line-height: 1.02 !important; }

/* ============ Helpers ============ */
.divider { height: 1px; background: var(--line); width: 100%; }
.tonum { font-variant-numeric: tabular-nums; }
.kicker {
  font-family: var(--serif);
  font-style: italic;
  color: var(--fg-muted);
  font-size: 18px;
}

/* Subtle grain overlay */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2D353B; }

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

/* Offset sections so fixed header doesn't hide content */
section[id] { scroll-margin-top: 90px; }

/* Burger: hidden on desktop */
.pill-burger { display: none; }

/* Tablet breakpoint — hide nav, phone number text */
@media (max-width: 1024px) {
  .desktop-nav { display: none !important; }
  .pill-phone-text { display: none !important; }
  .pill-phone-btn { display: none !important; }
  .pill-burger { display: flex !important; }

  /* Benefits: 4-col → 2-col on tablet */
  .benefits-lux-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .benefits-lux-grid > div {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 44px 32px !important;
  }
  .benefits-lux-grid > div:nth-child(odd) {
    border-right: 1px solid var(--line) !important;
  }
  .benefits-lux-grid > div:nth-last-child(-n+2) {
    border-bottom: none !important;
  }
}

/* Mobile-mode (iOS iframe) — fixed → sticky so it stays inside frame */
body.mobile-mode .pill-header {
  position: sticky !important;
  padding: 10px 10px !important;
}
body.mobile-mode .pill-nav {
  padding: 6px 6px 6px 14px !important;
  /* cancel old generic rule */
  height: auto !important;
}
body.mobile-mode .logo-sub { display: none !important; }
body.mobile-mode .logo-name { font-size: 14px !important; }
body.mobile-mode .pill-phone-text { display: none !important; }
body.mobile-mode .pill-phone-btn { display: none !important; }
body.mobile-mode .pill-burger { display: flex !important; }
body.mobile-mode .desktop-nav { display: none !important; }
body.mobile-mode .pill-menu { display: none !important; }

/* ============ Soft Section Transitions ============ */

/* Remove hard borders — sections with matching bg blend naturally */
#benefits {
  border-top: none !important;
  border-bottom: none !important;
}
.cta-section {
  border-top: none !important;
  border-bottom: none !important;
}

/* Elevated sections: gradient fade instead of flat bg + hard border */
#before-after {
  background: linear-gradient(to bottom,
    var(--bg) 0%,
    var(--bg-elev) 12%,
    var(--bg-elev) 88%,
    var(--bg) 100%
  ) !important;
  border-top: none !important;
  border-bottom: none !important;
}
#faq {
  background: linear-gradient(to bottom,
    var(--bg) 0%,
    var(--bg-elev) 12%,
    var(--bg-elev) 88%,
    var(--bg) 100%
  ) !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* ============ Section Transitions ============ */

/* Variant A — Centered accent bloom (top) */
#contact::before,
.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 340px;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, var(--accent-glow), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Variant B — Left-side accent bloom */
#services::before,
#before-after::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 220px;
  background: radial-gradient(ellipse 55% 100% at 12% 0%, var(--accent-glow), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Variant C — Right-side accent bloom */
#why::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 220px;
  background: radial-gradient(ellipse 55% 100% at 88% 0%, var(--accent-glow), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Variant D — Glowing hairline divider */
#reviews::before,
#faq::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-deep), var(--accent), var(--accent-deep), transparent);
  box-shadow: 0 0 18px 3px var(--accent-glow);
  pointer-events: none;
  z-index: 1;
}

/* Variant E — Dark vignette fade at bottom */
#gallery::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 130px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 0;
}

/* ============ Real-mobile media queries ============ */
@media (max-width: 768px) {
  section { padding: 64px 0 !important; }
  section.tight { padding: 48px 0 !important; }
  .container { padding: 0 18px; }
  .h-display { font-size: clamp(40px, 13vw, 60px) !important; line-height: 1.02 !important; }
  .h-1 { font-size: clamp(30px, 9vw, 44px); }
  .pill-header { padding: 12px 14px !important; }

  /* Collapse 2-col section header grids */
  section [style*="repeat(2, 1fr)"],
  section [style*="repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  section [style*="grid-template-columns: 1fr 1fr"],
  section [style*="1fr 1.1fr"],
  section [style*="1fr 1.2fr"],
  section [style*="380px 1fr"],
  section [style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Generic 4-col collapse (not metrics strip) */
  section [style*="repeat(4, 1fr)"]:not(.metrics-grid) {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Hero variants */
  .hero-grid { grid-template-columns: 1fr !important; gap: 32px !important; padding: 24px 0 !important; }
  .hero-typo-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .static-hero-img { height: 280px !important; margin-top: 40px !important; }
  section[style*="92vh"], section[style*="90vh"], section[style*="88vh"] {
    min-height: 80svh !important;
    padding: 60px 0 !important;
  }

  /* Metrics strip → 2 col */
  .metrics-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .metrics-grid > div { border-right: none !important; border-bottom: 1px solid var(--line) !important; }

  /* FAQ sticky disable */
  #faq [style*="position: sticky"] { position: static !important; }

  /* Contact */
  #contact [style*="1fr 1.2fr"] { grid-template-columns: 1fr !important; }

  /* Footer */
  footer [style*="2fr 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* WhyUs 2-col */
  #why [style*="1fr 1fr"] { grid-template-columns: 1fr !important; gap: 0 !important; }
  .why-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
  .why-grid > div { padding: 28px 0 !important; border-bottom: 1px solid var(--line) !important; }
  .why-grid > div:first-child { border-top: none !important; }

  /* CTA section collapse */
  .cta-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
  .cta-visual { display: none !important; }

  /* Before/After slider — wider ratio is unreadable on small screens */
  .before-after-slider { aspect-ratio: 4 / 3 !important; }

  /* Gallery — switch to flex column so span-2 row doesn't break single-col layout */
  .gallery-grid { display: flex !important; flex-direction: column !important; gap: 12px !important; }
  .gallery-item { aspect-ratio: 4 / 3 !important; grid-row: auto !important; width: 100% !important; }

  /* Hero inner container — reduce vertical padding so hero doesn't feel too tall */
  .hero-content { padding-bottom: 56px !important; padding-top: 64px !important; }

  /* Floating CTAs */
  .float-btns { right: 14px !important; bottom: 14px !important; gap: 10px !important; }
  .float-btn { width: 50px !important; height: 50px !important; }

  /* Benefits lux → 1-col on small screens */
  .benefits-lux-grid {
    grid-template-columns: 1fr !important;
  }
  .benefits-lux-grid > div {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 40px 24px !important;
  }
  .benefits-lux-grid > div:nth-child(odd) {
    border-right: none !important;
  }
  .benefits-lux-grid > div:last-child {
    border-bottom: none !important;
  }
}
