/* ============================
   ASD Klein – Stylesheet
   ============================ */

:root {
  --bg: #0e1116;
  --bg-alt: #151a22;
  --surface: #ffffff;
  --surface-muted: #f4f5f7;
  --text: #171a1f;
  --text-soft: #4b5261;
  --text-invert: #f5f6f8;
  --text-invert-soft: #aab0bd;
  --accent: #e2001a;
  --accent-dark: #a80014;
  --accent-soft: #fbd7db;
  --border: #e4e6ea;
  --border-dark: #262c36;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 45px -20px rgba(14, 17, 22, 0.35);
  --container: 1180px;
  --transition: 220ms ease;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

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

button {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }

p { margin: 0 0 1em; color: var(--text-soft); }

ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.icon-sm { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 12px 24px -10px rgba(226, 0, 26, 0.6); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--outline { border-color: rgba(255,255,255,0.35); color: var(--text-invert); }
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn--dark { background: #0e1116; color: #fff; }
.btn--dark:hover { background: #000; }
.btn--lg { padding: 15px 28px; font-size: 1rem; }

/* ---------- Top bar ---------- */
.top-bar {
  background: var(--bg);
  color: var(--text-invert-soft);
  font-size: 0.82rem;
}
.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 24px;
  flex-wrap: wrap;
}
.top-bar__calls { display: flex; gap: 20px; flex-wrap: wrap; }
.top-bar__phone { display: inline-flex; align-items: center; gap: 6px; color: var(--text-invert); font-weight: 600; }
.top-bar__phone .icon-sm { fill: var(--accent); }
.top-bar__phone:hover { color: var(--accent); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 22, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dark);
  padding-top: env(safe-area-inset-top);
}
.header__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
}
.header__top { position: relative; width: 100%; display: flex; justify-content: center; }

.logo { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 22px; color: var(--text-invert); }
.logo__icon { width: 150px; height: auto; flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name {
  font-size: 2.6rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text-invert);
}
.logo__name strong { color: var(--accent); font-weight: 900; }
.logo__suffix { font-size: 1.1rem; font-weight: 600; font-style: normal; opacity: 0.6; margin-left: 6px; }
.logo__tagline {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-invert-soft);
  margin-top: 6px;
}

.logo--footer .logo__icon { width: 100px; }
.logo--footer .logo__name { font-size: 1.9rem; }

.header__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.header__mobile-row {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 5px;
  margin-top: 2px;
  border-top: 1px solid var(--border-dark);
}
.header__mobile-calls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.header__mobile-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-invert);
  font-weight: 700;
  font-size: 1rem;
}
.header__mobile-phone .icon-sm { fill: var(--accent); }
.header__mobile-phone:hover { color: var(--accent); }

.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-invert-soft); font-weight: 600; font-size: 0.95rem; transition: color var(--transition); }
.nav a:hover { color: var(--text-invert); }

.header__cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
}
.nav-toggle span { height: 2px; width: 24px; background: var(--text-invert); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bg);
  color: var(--text-invert);
  overflow: hidden;
  padding: 100px 0 80px;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 700px 500px at 85% 15%, rgba(226, 0, 26, 0.32), transparent 60%),
    radial-gradient(ellipse 700px 600px at 10% 95%, rgba(14, 17, 22, 0.35), transparent 60%),
    linear-gradient(90deg, rgba(14,17,22,0.96) 0%, rgba(14,17,22,0.88) 40%, rgba(14,17,22,0.55) 100%),
    var(--hero-image, none);
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center 30%;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow--center { display: block; text-align: center; }
.eyebrow--lg { font-size: 1.2rem; }

.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--text-invert); }
.text-accent { color: var(--accent); }
.hero__lead { font-size: 1.15rem; color: var(--text-invert-soft); max-width: 560px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 48px; }

.hero__stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-size: 2.2rem; font-weight: 800; color: var(--accent); }
.stat__label { color: var(--text-invert-soft); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section--dark { background: var(--bg); color: var(--text-invert); }
.section--dark p { color: var(--text-invert-soft); }
.section--muted { background: var(--surface-muted); }

.section__title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); text-align: center; margin-bottom: 16px; }
.section__title--left { text-align: left; }
.section__lead { text-align: center; max-width: 620px; margin: 0 auto 56px; font-size: 1.05rem; }
.section__note { text-align: center; margin-top: 32px; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card__icon svg { width: 28px; height: 28px; fill: #0e1116; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { margin: 0; font-size: 0.95rem; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }
.check-list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.check-list li { display: flex; align-items: center; gap: 12px; color: var(--text-invert-soft); font-weight: 600; }
.check-list li::before {
  content: "";
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' stroke='%230e1116' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
}
.about__visual { display: flex; justify-content: center; }
.badge-circle {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-dark));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 30px 60px -20px rgba(226, 0, 26, 0.5);
}
.badge-circle__num { font-size: 3rem; font-weight: 800; }
.badge-circle__label { font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; }

/* ---------- Location cards ---------- */
.location-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.location-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.location-card__addr { font-weight: 600; color: var(--text); margin-bottom: 14px; }
.location-card__phone {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}
.location-card__fax { font-size: 0.85rem; color: var(--text-soft); margin: 0; }

/* ---------- Partners ---------- */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.partner-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.partner-grid a:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.partner-grid img { height: 34px; width: auto; max-width: 130px; object-fit: contain; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-dark) 100%);
  padding: 70px 0;
  color: #fff;
  text-align: center;
}
.cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.cta p { color: rgba(255,255,255,0.9); max-width: 500px; margin: 0 auto 30px; }
.cta__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list .icon-sm { width: 22px; height: 22px; fill: var(--accent); }
.contact-list a { font-weight: 600; color: var(--text); }
.contact-list a:hover { color: var(--accent); }

.contact__form {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact__form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.contact__form input,
.contact__form textarea {
  font: inherit;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact__form .btn { align-self: flex-start; }
.form-status { font-size: 0.9rem; font-weight: 600; min-height: 1.2em; margin: 0; }
.form-status.success { color: #1a8a4a; }

/* ---------- Footer ---------- */
.footer { background: var(--bg); color: var(--text-invert-soft); padding: 50px 0 30px; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 30px;
}
.footer__brand p { color: var(--text-invert-soft); margin-top: 8px; font-size: 0.9rem; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { font-weight: 600; }
.footer__links a:hover { color: var(--accent); }
.footer__copy { text-align: center; margin: 24px 0 0; font-size: 0.85rem; }

/* ---------- Mobile call FAB ---------- */
.mobile-call {
  display: none;
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: calc(20px + env(safe-area-inset-right));
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px -10px rgba(226, 0, 26, 0.7);
  z-index: 90;
}
.mobile-call .icon-sm { width: 24px; height: 24px; }

/* ---------- Scroll-in animation ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.45) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery__item:hover::after { opacity: 1; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,0.7);
}
.lightbox__close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  transition: background var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }

/* ---------- Legal pages ---------- */
.legal {
  padding: 140px 0 100px;
  max-width: 820px;
  margin: 0 auto;
}
.legal h1 { font-size: 2.2rem; margin-bottom: 30px; }
.legal h2 { font-size: 1.3rem; margin-top: 40px; }
.legal p, .legal li { color: var(--text-soft); }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.legal a { color: var(--accent); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .header__cta { display: none; }
  .nav-toggle { display: flex; }
  .top-bar { display: none; }
  .header__mobile-row { display: flex; }
  .header__inner { gap: 4px; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .about, .contact { grid-template-columns: 1fr; }
  .about__visual { order: -1; }
  .mobile-call { display: flex; }

  .header__inner { position: relative; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--border-dark);
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .hero { padding: 80px 0 60px; }
  .top-bar__inner { justify-content: center; text-align: center; }
  .top-bar__text { display: none; }
  .logo__icon { width: 130px; }
  .logo__name { font-size: 2.2rem; }
  .gallery { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 420px) {
  .logo { gap: 14px; }
  .logo__icon { width: 100px; }
  .logo__name { font-size: 1.7rem; }
  .logo__suffix { font-size: 0.9rem; margin-left: 4px; }
  .logo__tagline { font-size: 0.68rem; letter-spacing: 0.08em; }
  .logo--footer .logo__icon { width: 56px; }
  .logo--footer .logo__name { font-size: 1.2rem; }
  .hero__stats { gap: 24px; }
  .stat__num { font-size: 1.8rem; }
  .container { padding: 0 16px; }
}
