/* ═══════════════════════════════════════════════
   Lattin Robotics – Shared Stylesheet
   Mobile-First, vollständig responsive
═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg:       #07090d;
  --bg2:      #0c1018;
  --surface:  #111822;
  --surface2: #182030;
  --accent:   #29d9f5;
  --accent-glow: rgba(41,217,245,.13);
  --red:      #ff5577;
  --red-glow: rgba(255,85,119,.12);
  --green:    #2ee8a4;
  --green-glow: rgba(46,232,164,.12);
  --text:     #ddeaf8;
  --text-mid: #a8c0d8;
  --text-dim: #607a94;
  --border:   rgba(41,217,245,.10);
  --border2:  rgba(41,217,245,.22);
  --radius:   10px;
  --radius-lg:16px;
  --font-head:'Syne', sans-serif;
  --font-body:'DM Sans', sans-serif;
  --nav-h:    64px;
  --side-pad: clamp(1.25rem, 5vw, 5%);
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  /* Hard stop for horizontal overflow on every device */
  overflow-x: hidden;
  max-width: 100vw;
}

/* Everything inside must stay within viewport */
img, video, iframe, table, pre, code {
  max-width: 100%;
}

/* Prevent long words / URLs from breaking layout */
p, h1, h2, h3, h4, li, a, span, label {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Subtle grid texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(41,217,245,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41,217,245,.018) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: min(900px, 100vw);
  height: 500px;
  background: radial-gradient(ellipse, rgba(41,217,245,.055) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--side-pad);
  background: rgba(7,9,13,.93);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.15rem; letter-spacing: -.025em;
  color: var(--text); text-decoration: none;
  flex-shrink: 0; z-index: 201;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-dim); text-decoration: none;
  font-size: .82rem; font-weight: 400;
  letter-spacing: .05em; text-transform: uppercase;
  transition: color .2s; padding: .25rem 0;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cta {
  background: var(--accent) !important; color: #04121a !important;
  padding: .42rem 1rem !important; border-radius: 5px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: #fff !important; color: #04121a !important; }

/* Hamburger */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; z-index: 201;
  background: none; border: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile full-screen menu */
.nav-mobile {
  display: none;
  position: fixed; inset: 0; top: var(--nav-h);
  background: rgba(7,9,13,.97); backdrop-filter: blur(20px);
  z-index: 199;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 1.8rem; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.nav-mobile.open { opacity: 1; pointer-events: all; }
.nav-mobile a {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 700;
  color: var(--text-mid); text-decoration: none;
  letter-spacing: -.01em; transition: color .2s;
}
.nav-mobile a:hover { color: var(--accent); }
.nav-mobile .mob-cta {
  background: var(--accent); color: #04121a !important;
  padding: .75rem 2.2rem; border-radius: 8px;
  font-size: 1.1rem !important; margin-top: .5rem;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  position: relative; z-index: 1;
  padding: calc(var(--nav-h) + 1.5rem) var(--side-pad) 0;
  font-size: .78rem; color: var(--text-dim);
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--accent); }

/* ── PAGE HERO (subpages) ── */
.page-hero {
  position: relative; z-index: 1;
  padding: 2.5rem var(--side-pad) 5rem;
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: start;
}

/* Hero tag */
.hero-tag {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .35rem .9rem; border-radius: 100px;
  margin-bottom: 1.4rem; border: 1px solid;
  
  max-width: 100%;
}
.tag-blue  { color: var(--accent); border-color: var(--border2); background: var(--accent-glow); }
.tag-red   { color: var(--red);    border-color: rgba(255,85,119,.25); background: var(--red-glow); }
.tag-green { color: var(--green);  border-color: rgba(46,232,164,.25); background: var(--green-glow); }

h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -.025em; margin-bottom: 1.1rem;
  
}
h1 em { font-style: normal; color: var(--accent); }

.hero-sub {
  font-size: clamp(.95rem, 2.5vw, 1.05rem);
  color: var(--text-mid); margin-bottom: 2rem;
   line-height: 1.7;
}
.hero-actions {
  display: flex; gap: .9rem; flex-wrap: wrap;
  
}

/* ── INFO CARD ── */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
  min-width: 0; /* prevent grid blowout */
}
.info-card-title {
  font-family: var(--font-head); font-size: .72rem;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .5rem;
}
.info-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.info-list li {
  display: flex; align-items: center; gap: .7rem;
  font-size: .875rem; color: var(--text-mid);
  padding: .55rem .8rem;
  background: var(--bg2); border-radius: 7px;
  border-left: 2.5px solid var(--accent);
  min-width: 0;
}
.info-card-footer {
  margin-top: 1.4rem; padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
}
.price-tag {
  font-family: var(--font-head); font-size: 1.5rem;
  font-weight: 800; color: var(--accent);
}
.price-tag span {
  font-size: .78rem; color: var(--text-dim);
  font-weight: 400; font-family: var(--font-body);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--accent); color: #04121a;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.6rem; border-radius: 7px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap; flex-shrink: 0;
}
.btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(41,217,245,.25); }
.btn-primary:active { transform: scale(.97); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; color: var(--text-mid);
  font-family: var(--font-body); font-weight: 400; font-size: .95rem;
  padding: .8rem 1.6rem; border-radius: 7px;
  text-decoration: none; border: 1px solid var(--border2); cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap; flex-shrink: 0;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-ghost:active { transform: scale(.97); }

/* ── SECTIONS ── */
section { position: relative; z-index: 1; }
.section-wrap {
  max-width: 1100px; margin: 0 auto;
  padding: 5rem var(--side-pad);
}
.bg-alt { background: var(--bg2); }

.section-tag {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem; display: block;
}
h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.12;
  margin-bottom: .65rem;
}
h3 { font-family: var(--font-head); font-weight: 700; }
.section-sub {
  color: var(--text-mid); font-size: clamp(.9rem, 2vw, 1rem);
  max-width: 520px; line-height: 1.65;
}

/* ── CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem; margin-top: 2.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  position: relative; overflow: hidden;
  min-width: 0;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 2.5px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,.35); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 1.8rem; margin-bottom: .7rem; display: block; }
.card h3 { font-size: .95rem; margin-bottom: .35rem; }
.card p { color: var(--text-dim); font-size: .875rem; line-height: 1.6; }

.card.red-accent::before   { background: linear-gradient(90deg, var(--red), transparent); }
.card.red-accent:hover     { border-color: rgba(255,85,119,.3); }
.card.green-accent::before { background: linear-gradient(90deg, var(--green), transparent); }
.card.green-accent:hover   { border-color: rgba(46,232,164,.3); }

/* ── TWO-COL ── */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem; margin-top: 2.5rem;
}
.two-col .card { display: flex; gap: 1rem; align-items: flex-start; }
.two-col .card-icon {
  font-size: 1.3rem; width: 44px; height: 44px; flex-shrink: 0;
  background: var(--accent-glow); border: 1px solid var(--border);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 0;
}

/* ── STEPS ── */
.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 2rem; margin-top: 2.5rem; position: relative;
}
.steps-row::before {
  content: ''; position: absolute; top: 37px; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), var(--accent), var(--border2), transparent);
}
.step { text-align: center; }
.step-num {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; margin: 0 auto 1.2rem;
  position: relative; z-index: 1;
  transition: border-color .3s, background .3s, transform .3s;
}
.step:hover .step-num { border-color: var(--accent); background: var(--accent-glow); transform: scale(1.05); }
.step h3 { font-size: .92rem; margin-bottom: .3rem; }
.step p { color: var(--text-dim); font-size: .82rem; line-height: 1.55; }

/* ── FAQ ── */
.faq-list { margin-top: 2.5rem; display: flex; flex-direction: column; gap: .6rem; max-width: 820px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color .2s;
}
.faq-item.open { border-color: var(--border2); }
.faq-q {
  padding: 1.1rem 1.3rem;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; user-select: none;
  min-height: 54px; gap: .75rem;
  -webkit-tap-highlight-color: transparent;
}
.faq-q::after {
  content: '+'; font-size: 1.3rem; color: var(--accent);
  transition: transform .3s; flex-shrink: 0; line-height: 1;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  color: var(--text-mid); font-size: .88rem; line-height: 1.65;
  padding: 0 1.3rem;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 1.3rem 1.2rem; }

/* ── CTA BAND ── */
.cta-band {
  background: linear-gradient(135deg, rgba(41,217,245,.07), rgba(0,50,100,.18));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 4.5rem var(--side-pad); text-align: center;
  position: relative; z-index: 1;
}
.cta-band h2 { font-size: clamp(1.4rem, 4vw, 2.3rem); margin-bottom: .6rem; }
.cta-band p {
  color: var(--text-mid); margin-bottom: 1.8rem;
  max-width: 440px; margin-left: auto; margin-right: auto;
  font-size: clamp(.9rem, 2vw, 1rem);
}

/* ── CHECK LIST ── */
.check-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; margin-top: 1.4rem; }
.check-list li { display: flex; align-items: flex-start; gap: .7rem; font-size: .95rem; color: var(--text-mid); }
.check-list li::before {
  content: '✓'; width: 20px; height: 20px; flex-shrink: 0;
  background: var(--accent-glow); border: 1px solid rgba(41,217,245,.28);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: .65rem; margin-top: .2rem;
}

/* ── FOOTER ── */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 2.5rem var(--side-pad); position: relative; z-index: 1; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .9rem;
  font-size: .82rem; color: var(--text-dim);
}
footer a { color: var(--text-dim); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity:1; transform:translateY(0); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse  { 0%,100% { opacity:1; } 50% { opacity:.3; } }

.reveal { opacity:1; transform:none; }


/* ════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════════════════ */

/* ── Tablet ≤ 960px ── */
@media (max-width: 960px) {
  .page-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2rem var(--side-pad) 4rem;
  }
  .two-col   { grid-template-columns: 1fr; }
  .steps-row { gap: 1.8rem; }
  .steps-row::before { display: none; }

  /* Show burger, hide desktop links */
  .nav-burger { display: flex; }
  .nav-links  { display: none; }
  .nav-mobile { display: flex; }
}

/* ── Mobile ≤ 640px ── */
@media (max-width: 640px) {
  :root {
    --nav-h:    56px;
    --side-pad: 1.1rem;
  }

  body { font-size: 15px; }

  /* Global overflow guard */
  .section-wrap,
  .page-hero,
  .cta-band,
  .breadcrumb,
  footer { padding-left: var(--side-pad); padding-right: var(--side-pad); }

  h1 { font-size: clamp(1.75rem, 7.5vw, 2.2rem); letter-spacing: -.02em; }
  h2 { font-size: clamp(1.35rem, 5.5vw, 1.75rem); }
  h3 { font-size: .95rem; }

  .hero-sub { font-size: .95rem; }

  /* Stack buttons vertically, always centred */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;   /* buttons fill width */
    gap: .65rem;
  }

  /* Every button on mobile: full width + centred content */
  .btn-primary,
  .btn-ghost {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: .9rem 1.2rem;
    font-size: .92rem;
    white-space: normal;
    box-sizing: border-box;
  }

  /* CTA band button centred */
  .cta-band { display: flex; flex-direction: column; align-items: center; }
  .cta-band .btn-primary { width: auto; min-width: min(260px, 90%); justify-content: center; }

  /* About section button */
  .about-text > div { display: flex; justify-content: center; }

  /* Contact form button */
  .contact-form .btn-primary { width: 100%; justify-content: center; }

  /* Plan cards (wartungspaket) */
  .plan-card .btn-primary,
  .plan-card .btn-ghost { width: 100%; justify-content: center; }

  /* Info card */
  .info-card { padding: 1.25rem; }
  .info-card-footer { flex-direction: column; align-items: stretch; gap: .9rem; }
  .info-card-footer .btn-primary { width: 100%; justify-content: center; }
  .info-list li { font-size: .82rem; }

  /* Cards single column */
  .cards-grid { grid-template-columns: 1fr; gap: .85rem; }
  .card { padding: 1.35rem; }

  /* Two-col goes 1 col */
  .two-col { grid-template-columns: 1fr; }

  /* Steps – 2 per row on mobile */
  .steps-row { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .step-num  { width: 62px; height: 62px; font-size: 1.1rem; }
  .step h3   { font-size: .875rem; }
  .step p    { font-size: .78rem; }

  /* FAQ */
  .faq-list { max-width: 100%; }
  .faq-q    { font-size: .85rem; padding: 1rem 1rem; }
  .faq-a    { font-size: .85rem; }
  .faq-item.open .faq-a { padding: 0 1rem 1rem; }

  /* CTA */
  .cta-band { padding-top: 3rem; padding-bottom: 3rem; }
  .cta-band .btn-primary { white-space: normal; width: auto; min-width: min(260px, 90%); }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: .65rem; }
  .footer-links { gap: 1rem; }

  /* Section padding */
  .section-wrap { padding-top: 3.5rem; padding-bottom: 3.5rem; }

  /* Breadcrumb */
  .breadcrumb { padding-top: calc(var(--nav-h) + 1rem); }
}

/* ── Very small ≤ 380px ── */
@media (max-width: 380px) {
  :root { --side-pad: .9rem; }
  .steps-row { grid-template-columns: 1fr; }
  h1 { font-size: 1.65rem; }
  .nav-mobile a { font-size: 1.25rem; }
}

/* ── No-hover (touch) devices ── */
@media (hover: none) {
  .card:hover        { transform: none; box-shadow: none; }
  .btn-primary:hover { transform: none; box-shadow: none; background: var(--accent); }
  .btn-ghost:hover   { transform: none; }
  .step:hover .step-num { transform: none; }
}

/* ── Global mobile button safety net ── */
@media (max-width: 640px) {
  /* Any standalone button not inside a flex row gets centered */
  .cta-band a.btn-primary,
  .cta-band button.btn-primary {
    display: flex;
    margin-left: auto;
    margin-right: auto;
    width: auto;
    min-width: min(240px, 85%);
    justify-content: center;
    align-items: center;
  }
  /* Hero actions always full width and centred */
  .hero-actions a,
  .hero-actions button {
    width: 100%;
    justify-content: center;
    align-items: center;
    display: flex;
  }
  /* Info card footer button always full width */
  .info-card-footer a.btn-primary,
  .info-card-footer button.btn-primary {
    width: 100%;
    justify-content: center;
  }
}
