:root {
  --bg: #ffffff;
  --surface: #f6f7fb;
  --text: #111827;
  --muted: #4b5563;
  --primary: #0b5fff;
  --primary-dark: #0849c5;
  --accent: #0f766e;
  --border: #e5e7eb;
  --ok: #166534;
  --logo-blue: #4a90b0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: transparent;
}

body {
  line-height: 1.55;
  position: relative;
  background: transparent;
}

body.bg-static {
  background-image: url("/assets/staklo-bg-rotated.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

body.no-scroll {
  overflow: hidden;
}

.page-bg-parallax {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background-image: url("/assets/staklo-bg-rotated.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: translate3d(0, var(--page-bg-offset, 0px), 0) scale(1.16);
  will-change: transform;
}

a {
  color: inherit;
}

img,
video {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.container {
  width: min(100% - 32px, 1100px);
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(5px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(214, 220, 231, 0.95);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--logo-blue);
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo-frame {
  width: 120px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.logo-mark {
  width: 86px;
  height: 86px;
  object-fit: contain;
  background: transparent;
  border: 0;
  padding: 0;
  margin-right: -13px;
  transform: translateY(2px);
}

.brand-l {
  font-size: 1.35em;
  font-weight: 900;
  line-height: 1;
}

.brand-rest {
  margin-left: 1px;
}

.lang-switch {
  display: flex;
  gap: 6px;
}

.lang-switch a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 999px;
}

.lang-switch a.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 18px 0 22px;
  min-height: clamp(520px, 74vh, 760px);
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(
      108deg,
      rgba(8, 14, 26, 0.62) 0%,
      rgba(8, 14, 26, 0.48) 38%,
      rgba(8, 14, 26, 0.18) 58%,
      rgba(8, 14, 26, 0.08) 100%
    ),
    var(--hero-image);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  transform: translate3d(0, var(--hero-offset, 0px), 0) scale(1.04);
  will-change: transform;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 8, 15, 0.07) 0%,
    rgba(5, 8, 15, 0.2) 54%,
    rgba(5, 8, 15, 0.3) 100%
  );
}

.hero-grid {
  display: grid;
  gap: 16px;
}

.hero-grid > div {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 4px;
  max-width: 560px;
}

.hero-grid figure {
  display: none;
}

.hero-grid figure img {
  border-radius: 0;
  height: min(70vh, 620px);
  object-fit: cover;
  object-position: center;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.28);
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #f8dc55;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 12px 0 10px;
  font-size: clamp(26px, 7.3vw, 44px);
  line-height: 1.1;
  color: #ffe03d;
  text-shadow: 0 2px 14px rgba(7, 13, 23, 0.45);
}

.lead {
  font-size: 17px;
  color: rgba(240, 246, 255, 0.95);
  margin: 0 0 20px;
  text-shadow: 0 1px 10px rgba(4, 8, 18, 0.38);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(7, 12, 20, 0.62);
  color: #f3f7ff;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(7, 12, 20, 0.28);
}

.btn:hover {
  background: rgba(9, 16, 27, 0.74);
}

.btn.alt {
  background: rgba(7, 12, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.stats {
  margin-top: 14px;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stat {
  background: rgba(5, 10, 18, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 11px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  color: #f5f8ff;
}

.stat strong {
  display: block;
  font-size: 20px;
  color: #fff;
}

.section {
  padding: 18px 0;
}

.section > .container {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(214, 222, 235, 0.88);
  border-radius: 16px;
  backdrop-filter: blur(2px);
  padding: 18px 14px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.section:nth-of-type(even) {
  background: transparent;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 5.8vw, 34px);
  letter-spacing: -0.2px;
}

.section p.section-intro {
  margin: 0 0 16px;
  color: #2f3746;
  max-width: 70ch;
}

.section-media {
  margin: 0 0 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(209, 217, 230, 0.9);
}

.section-media img {
  width: 100%;
  height: clamp(170px, 30vw, 260px);
  object-fit: cover;
  object-position: center 22%;
  border-radius: 0;
}

.cards {
  display: grid;
  gap: 14px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.55);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
  border-color: rgba(96, 165, 250, 0.52);
}

.card::before {
  content: none;
}

.card::after {
  content: none;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.2;
}

.card-media {
  width: 100%;
  height: clamp(150px, 26vw, 220px);
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 10px;
}

.card-media-flip-x {
  transform: scaleX(-1);
}

.card-media-door {
  object-position: center 14%;
}

.card-media-renovation {
  object-position: center 18%;
}

.card-copy {
  position: relative;
  z-index: 1;
}

.card .small {
  margin: 0;
  line-height: 1.6;
}

.gallery-grid {
  margin-top: 8px;
}

.video-grid {
  margin-top: 12px;
}

.detail-toggle {
  width: 100%;
  margin: 6px 0 12px;
  padding: 14px 16px 50px;
  border: 1px solid rgba(17, 24, 39, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: #111827;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.1px;
  text-align: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.07);
}

.detail-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 2px;
  height: 30px;
  background: currentColor;
  opacity: 0.76;
  transform: translateX(-50%);
  animation: arrowStemFloat 1200ms ease-in-out infinite;
}

.detail-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
  animation: arrowHeadFloat 1200ms ease-in-out infinite;
}

.detail-toggle[aria-expanded="true"]::before {
  bottom: -4px;
  height: 18px;
}

.detail-toggle[aria-expanded="true"]::after {
  transform: translateX(-50%) rotate(-135deg);
  bottom: -10px;
}

.projects-panel[hidden] {
  display: none;
}

@keyframes arrowStemFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.72;
  }
  50% {
    transform: translateX(-50%) translateY(5px);
    opacity: 1;
  }
}

@keyframes arrowHeadFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(45deg);
    opacity: 0.72;
  }
  50% {
    transform: translateX(-50%) translateY(5px) rotate(45deg);
    opacity: 1;
  }
}

.flip-carousel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  overflow: hidden;
  perspective: 1200px;
}

.flip-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef2f8;
}

.flip-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform-origin: left center;
  backface-visibility: hidden;
}

.flip-slide.active {
  opacity: 1;
  visibility: visible;
}

.flip-slide.enter-next {
  animation: pageInNext 420ms ease both;
}

.flip-slide.enter-prev {
  animation: pageInPrev 420ms ease both;
}

.flip-slide.exit-next {
  animation: pageOutNext 420ms ease both;
}

.flip-slide.exit-prev {
  animation: pageOutPrev 420ms ease both;
}

.flip-slide img,
.flip-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.flip-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.flip-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.flip-btn:hover {
  background: #f3f4f6;
}

.flip-meta {
  font-size: 13px;
  color: var(--muted);
}

.gallery-image {
  cursor: zoom-in;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(6, 10, 18, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  width: min(96vw, 1300px);
  display: grid;
  gap: 10px;
  justify-items: center;
}

.lightbox-image {
  width: auto;
  max-width: 96vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-meta {
  color: #d6deea;
  font-size: 14px;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(12, 18, 31, 0.7);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(12, 18, 31, 0.72);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav.prev {
  left: 12px;
}

.lightbox-nav.next {
  right: 12px;
}

@keyframes pageInNext {
  from {
    opacity: 0;
    visibility: visible;
    transform: rotateY(-72deg) translateX(8%);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0) translateX(0);
  }
}

@keyframes pageOutNext {
  from {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0) translateX(0);
  }
  to {
    opacity: 0;
    visibility: hidden;
    transform: rotateY(72deg) translateX(-8%);
  }
}

@keyframes pageInPrev {
  from {
    opacity: 0;
    visibility: visible;
    transform: rotateY(72deg) translateX(-8%);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0) translateX(0);
  }
}

@keyframes pageOutPrev {
  from {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0) translateX(0);
  }
  to {
    opacity: 0;
    visibility: hidden;
    transform: rotateY(-72deg) translateX(8%);
  }
}

.testimonial {
  border-left: 4px solid var(--primary);
  background: var(--surface);
  padding: 12px 12px 12px 14px;
  border-radius: 10px;
}

.testimonial-image-card {
  position: relative;
  border-left: 0;
  border: 1px solid rgba(147, 197, 253, 0.55);
  background: transparent;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.testimonial-image-card img {
  width: 100%;
  border-radius: 10px;
}

.testimonial-image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
  border-color: rgba(96, 165, 250, 0.52);
}

.testimonial-image-card::before {
  content: none;
}

.testimonial-image-card::after {
  content: none;
}

.contact-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.contact-list {
  margin: 0;
  padding-left: 16px;
}

.contact-list.trust-image-list {
  padding-left: 0;
  list-style: none;
}

.trust-image-item {
  margin: 0;
}

.trust-image-item img {
  width: 100%;
  border-radius: 10px;
}

form {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg {
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero-bg,
  .page-bg-parallax {
    transform: none !important;
    will-change: auto;
  }

  .topbar,
  .section > .container {
    backdrop-filter: none;
  }

  .section-media img {
    height: clamp(220px, 52vw, 340px);
    object-position: center 18%;
  }
}

footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 100px;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid var(--border);
  background: #fff;
}

.sticky-cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.sticky-cta a {
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  background: #fff;
}

.sticky-cta a.primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 80px;
  z-index: 50;
  background: #111827;
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.cookie-actions button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
}

.cookie-actions .accept {
  background: #22c55e;
}

.cookie-actions .reject {
  background: #d1d5db;
}

@media (min-width: 860px) {
  .hero {
    padding: 18px 0 22px;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 20px;
  }

  .hero-grid > div {
    padding: 12px 8px;
  }

  .lead {
    margin-bottom: 26px;
  }

  .hero-grid figure {
    display: block;
  }

  .stats {
    display: grid;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section > .container {
    padding: 24px 20px;
  }

  .video-grid {
    gap: 14px;
  }

  .gallery-grid {
    gap: 14px;
  }

  .flip-stage {
    aspect-ratio: 16 / 8;
  }

  .contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}
