/* Base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #101215; background: #0f1114; }
img { max-width: 100%; display: block; }

:root{
  --bg: #0f1114;
  --ink: #101215;
  --ink-contrast: #eaf2ff;
  --muted: #9aa3ad;
  --brand: #12a4ea; /* cyan-blue */
  --panel: #161a20;
  --panel-2:#0c0f14;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
}

.container { width: min(1200px, 92vw); margin: 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15,17,20,.85); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid #1f2530; }
.header-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: .75rem 0; }
.brand { display: flex; gap: .6rem; align-items: center; text-decoration: none; color: #e6eefc; font-weight: 800; letter-spacing: .2px; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; }
.nav a { color: #c9d6ea; text-decoration: none; margin: 0 .8rem; font-weight: 600; }
.nav a:hover { color: white; }
.cta { padding: .55rem .8rem; border: 1px solid #2a3240; border-radius: 10px; color: #dfe9fb; text-decoration: none; font-weight: 700; }
.cta:hover { background: #1a2230; }

/* Blocks */
.block { position: relative; padding: clamp(56px, 10vw, 120px) 0; }
.bg-light { background: linear-gradient(180deg,#0f1114,#12161d); }
.bg-dark { background: linear-gradient(180deg,#0d1117,#0a0d12); color: #e8f1ff; }
.bg-grid { background: radial-gradient(circle at 10% 10%, rgba(18,164,234,.06), transparent 40%), radial-gradient(circle at 90% 0, rgba(18,164,234,.05), transparent 40%), linear-gradient(180deg,#0f1114,#12161d); }

.bg-hero {
  position: relative;
  background: url('assets/photos/hero-wingliner.png') center/cover no-repeat;
}
.bg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.bg-hero .container {
  position: relative;
  z-index: 1;
}

.bg-gallery { background: linear-gradient(180deg,#0f1114,#12161d); }

.overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(15,17,20,.9)); }

/* Hero */
.hero-inner { position: relative; z-index: 1; color: #eef5ff; text-align: left; max-width: 920px; }
.hero-inner h1 { font-size: clamp(36px, 7vw, 64px); margin: 0 0 10px; line-height: 1.05; }
.hero-inner p { font-size: clamp(16px, 2.2vw, 20px); color:#cfe4ff; max-width: 720px; }
.hero-actions { margin-top: 24px; display: flex; gap: 12px; }
.btn { display: inline-block; padding: .9rem 1.1rem; border-radius: 14px; border: 1px solid #2b3444; color: #e7f0ff; text-decoration: none; font-weight: 700; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #001018; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
.card { background: var(--panel); border: 1px solid #212632; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.card-media { height: 150px; background-size: cover; background-position: center; }
.card-body { padding: 16px 16px 18px; color: #d9e6fb; }
.card h3 { margin: 0 0 8px; color: #ffffff; }

.media-wingliner { background-image: url('assets/photos/wingliner.png'); }
.media-lbw { background-image: url('assets/photos/reparaturen.png'); }
.media-sand { background-image: url('assets/photos/sandstrahlen.png'); }
.media-lack { background-image: url('assets/photos/lackieren.png'); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.person { background: var(--panel-2); border: 1px solid #202633; border-radius: 16px; padding: 14px; color: #d7e4fb; }
.person h3 { margin: 0 0 6px; color: #fff; }
.nick { color: var(--brand); font-weight: 800; }

/* Contact */
.contact { color:#e7f0ff; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 12px; }
.contact a { color: #bfe2ff; text-decoration: none; border-bottom: 1px dotted #2a7bbb; }
.contact a:hover { color: white; }

/* Footer */
.site-footer { background: #0a0d12; border-top: 1px solid #1c2230; color: #a8b4c9; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 0; }
@media (max-width: 640px){ .footer-grid { grid-template-columns: 1fr; } }


/* Video media */
.card-media.video { position: relative; height: 180px; }
.card-media.video video { position:absolute; inset:0; width:100%; height:100%; object-fit: cover; border:0; border-radius:0; }

/* Fixed 2x2 grid for Leistungen */
.cards-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 800px){ .cards-2x2 { grid-template-columns: 1fr; } }

/* White section titles for dark backgrounds */
#leistungen h2, #team h2 {
  color: #ffffff;
}

/* Fixed top bar with centered Wingo logo */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: rgba(10, 12, 15, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  backdrop-filter: saturate(160%) blur(6px);
}
.topbar img {
  height: 52px;
  opacity: 0.7;
}
body { padding-top: 72px; }

/* Floating contact button */
.fab{position:fixed;right:18px;bottom:96px;background:var(--brand);color:#001018;font-weight:800;padding:12px 16px;border-radius:999px;box-shadow:0 8px 26px rgba(0,0,0,.35);z-index:1200;cursor:pointer;user-select:none;}
.fab-menu{position:absolute;right:0;bottom:54px;display:none;flex-direction:column;gap:8px;}
.fab.open .fab-menu{display:flex;}
.fab-item{background:#0c0f14;color:#e7f0ff;text-decoration:none;padding:10px 12px;border-radius:10px;border:1px solid #2a3240;min-width:120px;text-align:center;}
.fab-item:hover{background:#141a22;}

/* Legal links under email */
.legal-links{margin-top:8px}
.legal-links a{display:block;color:#bfe2ff;text-decoration:none;margin:2px 0}
.legal-links a:hover{text-decoration:underline}

/* Legal pages: readable contrast + spacing */
.page-legal { padding-top: 72px; background-color: #0b1016; }
.page-legal main { color: #e9f2ff; }
.page-legal h1, .page-legal h2, .page-legal h3 { color: #ffffff; }
.page-legal a { color: #86caff; text-decoration: underline; }
.page-legal .btn { color: #001018; background-color: #bfe2ff; }
.page-legal main.block { background: #0f141b; }

/* Legal pages: strong readable theme */
#legal-root.page-legal{padding-top:72px;background:#0b1016}
#legal-root.page-legal main{color:#e9f2ff}
#legal-root.page-legal h1,#legal-root.page-legal h2,#legal-root.page-legal h3{color:#fff}
#legal-root.page-legal a:link{color:#86caff;text-decoration:underline}
#legal-root.page-legal a:visited{color:#7ab2e0}
#legal-root.page-legal a:hover{color:#a8d6ff}
#legal-root.page-legal .btn{color:#001018;background:#bfe2ff}
#legal-root.page-legal main.block{background:#0f141b}


/* === Mobile + Legal page readability overrides (added) === */

/* Make header a bit taller and logo bigger */
.site-header .container { width: min(1200px, 96vw); }
.brand img { width: 54px; height: 54px; } /* +~28% */
.header-grid { padding: 1rem 0; }

/* Respect iOS safe area at the very top */
.site-header { padding-top: max(env(safe-area-inset-top), 0px); }

/* Legal pages: responsive typography and safe spacing */
#legal-root.page-legal{ 
  padding-top: 96px; 
  word-wrap: break-word; 
  overflow-wrap: anywhere; 
  hyphens: auto;
}
#legal-root.page-legal h1{ font-size: clamp(1.8rem, 5.5vw, 2.4rem); line-height:1.15; }
#legal-root.page-legal h2{ font-size: clamp(1.15rem, 4.6vw, 1.45rem); line-height:1.25; }
#legal-root.page-legal p, 
#legal-root.page-legal li{ font-size: clamp(1rem, 3.9vw, 1.06rem); line-height:1.6; }

/* Better tap targets */
#legal-root.page-legal a { padding-bottom: 2px; }

@media (max-width: 640px){
  /* Give extra top room under taller header on phones */
  #legal-root.page-legal{ padding-top: 108px; }
}
/* === End overrides === */


/* === Adjust Back Button (centered, no underline) === */
.back-btn {
  display:block;
  margin: 36px auto 0;
  text-align:center;
  text-decoration:none !important;
  background:#8ac7ff;
  color:#0f1316 !important;
  font-weight:700;
  border-radius:10px;
  padding:14px 22px;
  width:max-content;
}
/* === End adjustment === */


/* === Scroll containment and bounce prevention === */
html, body {
  height: 100%;
  overscroll-behavior-y: none; /* stop rubber-banding on iOS 16+ / modern browsers */
  overscroll-behavior-x: none;
  overflow-x: hidden;
}

/* Limit scroll chaining from inner elements */
#legal-root, .page-legal, main {
  overscroll-behavior: contain;
}

/* === Back button perfect centering === */
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  background: #8ac7ff;
  color: #0f1316 !important;
  font-weight: 800;
  border-radius: 16px;
  padding: 14px 22px;
  min-height: 48px;
  line-height: 1;
  margin: 32px auto 0;
  width: max(220px, 60%);
}


/* === Legal pages start higher (less top gap) === */
#legal-root.page-legal {
  padding-top: 48px !important; /* start text near top */
}
@media (max-width:640px){
  #legal-root.page-legal { padding-top: 54px !important; }
}


/* === Logo bar upscale +32.5% === */
.site-header { padding-top: max(env(safe-area-inset-top), 0px); }
.header-grid { padding: 1.325rem 0 !important; } /* +32.5% */
.brand img { width: 56px !important; height: 56px !important; } /* 42px * 1.325 */
@media (min-width: 900px){
  .brand img { width: 60px !important; height: 60px !important; }
  .header-grid { padding: 1.4rem 0 !important; }
}
.nav a { padding: .2rem 0 !important; }


/* === Logo bar upscale +65% === */
.site-header { padding-top: max(env(safe-area-inset-top), 0px); }
.header-grid { padding: 1.65rem 0 !important; } /* +65% */
.brand img { width: 69px !important; height: 69px !important; } /* 42px * 1.65 */
@media (min-width: 900px){
  .brand img { width: 74px !important; height: 74px !important; }
  .header-grid { padding: 1.7rem 0 !important; }
}
.nav a { padding: .25rem 0 !important; }


/* === HERO WATERMARK LOGO UPSCALE (+65%) === */
.hero .brand-mark,
.hero .brand-mark img,
.hero .logo,
.hero .logo img,
#hero .logo,
#hero .logo img {
  width: 165% !important;
  max-width: none !important;
  height: auto !important;
  opacity: 0.9 !important;
  margin-top: 0 !important;
  transform: scale(1.65);
  transform-origin: center center;
}

@media (min-width: 900px) {
  .hero .brand-mark,
  .hero .brand-mark img,
  .hero .logo,
  .hero .logo img,
  #hero .logo,
  #hero .logo img {
    transform: scale(1.65);
  }
}


/* === HERO LOGO FINAL FIX (base size increased by 65%) === */
.hero .logo img,
.hero .brand-mark img,
.hero .hero-logo img,
#hero .logo img {
  width: 165% !important;
  max-width: none !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
  opacity: 0.9 !important;
}

/* Center and spacing adjustments */
.hero .logo,
.hero .brand-mark,
.hero .hero-logo,
#hero .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 1.5rem !important;
  padding-bottom: 0.5rem !important;
}


/* === Topbar logo + bar size increase (~+65%) === */
@media (max-width: 900px){
  .topbar { height: 118px !important; }
  .topbar img { height: 86px !important; }
  body { padding-top: 118px !important; }
}
@media (min-width: 901px){
  .topbar { height: 128px !important; }
  .topbar img { height: 92px !important; }
  body { padding-top: 128px !important; }
}
