/*** ============================================================
     Veritron sp. z o.o. — custom stylesheet
     Tailwind (CDN) handles utility classes; this file covers
     the preloader, hero spotlight-reveal mechanic, animations,
     and hand-crafted components that Tailwind utilities alone
     can't express cleanly.
     ============================================================ ***/

:root {
  --nav-h: 76px;
}

html {
  scroll-padding-top: var(--nav-h);
}

::selection {
  background: #091426;
  color: #ffffff;
}

/*** ---------- Preloader ---------- ***/
#preloader {
  position: fixed;
  inset: 0;
  background-color: #f7f9fb;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.preloader-mark {
  display: flex;
  justify-content: center;
}

.preloader-mark svg {
  animation: preloaderPulse 1.6s ease-in-out infinite;
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.loader-line {
  width: 180px;
  height: 2px;
  background: #e0e3e5;
  position: relative;
  overflow: hidden;
  margin-top: 18px;
}

.loader-line::after {
  content: '';
  position: absolute;
  left: -50%;
  width: 50%;
  height: 100%;
  background: #091426;
  animation: loaderSlide 1.3s infinite ease-in-out;
}

@keyframes loaderSlide {
  0% { left: -50%; }
  100% { left: 100%; }
}

/*** ---------- Fixed navigation ---------- ***/
.site-nav {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.site-nav .nav-logo-bg { color: transparent; }

.site-nav .nav-wordmark {
  color: #ffffff;
  transition: color 0.35s ease;
}

.site-nav .nav-burger {
  color: #ffffff;
  font-size: 20px;
  transition: color 0.35s ease;
}

.nav-pill-link {
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-pill-link:hover,
.nav-pill-link.is-active {
  color: #ffffff;
  background-color: rgba(255,255,255,0.16);
}

.site-nav nav.nav-pill {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 9999px;
  padding: 0.35rem;
}

/* Scrolled state: light solid bar so it reads over light sections */
.site-nav.is-scrolled {
  background-color: rgba(247,249,251,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(9,20,38,0.08), 0 8px 24px -12px rgba(9,20,38,0.12);
}

.site-nav.is-scrolled .nav-wordmark { color: #091426; }
.site-nav.is-scrolled .nav-logo-bg { color: #091426; }
.site-nav.is-scrolled .nav-burger { color: #091426; }
.site-nav.is-scrolled .nav-pill-link { color: #45474c; }
.site-nav.is-scrolled .nav-pill-link:hover,
.site-nav.is-scrolled .nav-pill-link.is-active { color: #091426; background-color: #e6e8ea; }
.site-nav.is-scrolled nav.nav-pill {
  background: #eceef0;
  border-color: #e0e3e5;
}

/* Force the logo mark path to draw in the correct colour without JS branching */
.site-nav svg rect.nav-logo-bg { fill: #ffffff; opacity: 0.0; }
.site-nav a.flex svg path { stroke: #ffffff; }
.site-nav.is-scrolled a.flex svg path { stroke: #091426; }
.site-nav a.flex svg rect { fill: #ffffff; opacity: 0.18; }
.site-nav.is-scrolled a.flex svg rect { fill: #091426; opacity: 0.12; }

/*** ---------- Brand logo hover animation (header + footer) ---------- ***/
.brand-logo svg {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 50% 50%;
}

.brand-logo:hover svg { transform: rotate(-10deg) scale(1.12); }

.brand-logo span {
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.brand-logo:hover span { color: #e8702a; letter-spacing: 0.01em; }

/*** ---------- Nav dropdowns (Services / Legal) ---------- ***/
.nav-dropdown-wrap {
  position: relative;
  /* Padding + negative margin extends the wrap's own hoverable box down to
     meet the dropdown, so crossing the visual gap never breaks :hover. */
  padding-bottom: 18px;
  margin-bottom: -18px;
}

.services-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 460px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #e0e3e5;
  border-radius: 0.5rem;
  box-shadow: 0 24px 48px -16px rgba(9,20,38,0.28);
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}

.services-dropdown.legal-dropdown {
  width: 300px;
  grid-template-columns: 1fr;
}

.nav-dropdown-wrap:hover .services-dropdown,
.services-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.services-dropdown a,
.services-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.375rem;
  color: #45474c;
  transition: background-color 0.15s ease, color 0.15s ease;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.services-dropdown .dd-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 0.5rem;
  background: #f2f4f6;
  color: #855300;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.services-dropdown .dd-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #091426;
}

.services-dropdown .dd-desc {
  display: block;
  font-size: 12px;
  color: #75777d;
  margin-top: 1px;
}

.services-dropdown a:hover,
.services-dropdown button:hover { background-color: #f2f4f6; }
.services-dropdown a:hover .dd-icon,
.services-dropdown button:hover .dd-icon { background-color: #855300; color: #ffffff; }

.services-dropdown-all {
  grid-column: 1 / -1;
  border-top: 1px solid #e0e3e5;
  margin-top: 0.25rem;
  padding-top: 0.85rem !important;
  justify-content: space-between;
  color: #091426 !important;
  font-weight: 600 !important;
  font-size: 14px;
}

/*** ---------- Mobile menu ---------- ***/
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  background: #ffffff;
  border-top: 1px solid transparent;
  transition: max-height 0.4s ease, border-color 0.4s ease;
}

.mobile-menu.is-open {
  max-height: 640px;
  border-top-color: #e0e3e5;
}

.mobile-menu-link {
  display: block;
  padding: 0.9rem 1.5rem;
  color: #191c1e;
  font-weight: 500;
  border-bottom: 1px solid #eceef0;
  text-align: left;
  background: none;
}

.mobile-services-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f7f9fb;
}

.mobile-services-panel.is-open { max-height: 400px; }

.mobile-services-panel a,
.mobile-services-panel button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 2rem;
  font-size: 14px;
  color: #45474c;
  border-bottom: 1px solid #eceef0;
  width: 100%;
  text-align: left;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  cursor: pointer;
}

.mobile-services-panel a i,
.mobile-services-panel button i { color: #855300; width: 16px; }

/*** ---------- Modals (services + success) ---------- ***/
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 1rem;
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open { visibility: visible; pointer-events: auto; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 20, 38, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.modal.is-open .modal-backdrop { opacity: 1; }

.modal-panel {
  position: relative;
  background: #ffffff;
  width: 100%;
  max-width: 720px;
  margin: auto;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(9, 20, 38, 0.45);
  opacity: 0;
  transform: scale(0.92) translateY(24px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.is-open .modal-panel {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal-panel.modal-panel-sm { max-width: 480px; }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(9, 20, 38, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover { background: #e8702a; transform: rotate(90deg); }

.modal-media {
  height: 220px;
  position: relative;
}

.modal-media img { width: 100%; height: 100%; object-fit: cover; }

.modal-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9,20,38,0.55) 0%, rgba(9,20,38,0) 45%);
}

.modal-media-badge {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-body {
  padding: 1.75rem 1.75rem 2rem;
  max-height: calc(90vh - 220px);
  overflow-y: auto;
}

.modal-body h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #091426;
  margin-bottom: 0.65rem;
}

.modal-body > p.modal-intro {
  color: #45474c;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.modal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f2f4f6;
  color: #45474c;
  font-size: 12px;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
}

.modal-meta i { color: #855300; }

.modal-body h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #091426;
  margin: 1.4rem 0 0.75rem;
}

.modal-body h4:first-of-type { margin-top: 0; }

.modal-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}

.modal-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 14px;
  color: #45474c;
  line-height: 1.5;
}

.modal-features li i { color: #855300; margin-top: 3px; }

.modal-cta {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e3e5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-cta-text { font-size: 13px; color: #75777d; }

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #091426;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-cta:hover { background: #e8702a; }

@media (max-width: 640px) {
  .modal-features { grid-template-columns: 1fr; }
  .modal-cta { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Success modal specifics */
.modal-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 9999px;
  background: #e6f4ec;
  color: #1e6f46;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 1.25rem;
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes successPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

body.modal-open { overflow: hidden; }

#mobileServicesToggle.is-open i { transform: rotate(180deg); }

/*** ---------- Hero ---------- ***/
.hero-section { isolation: isolate; }

.hero-vignette {
  background:
    linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 30%),
    linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 22%);
}

@keyframes heroReveal {
  0% { opacity: 0; transform: translateY(28px); filter: blur(12px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes heroFadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes heroZoom {
  0% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.hero-anim {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-reveal { animation-name: heroReveal; animation-duration: 1.1s; }
.hero-fade { animation-name: heroFadeUp; animation-duration: 1s; }
.hero-zoom { animation: heroZoom 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

.scroll-bounce { animation: scrollBounce 1.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .hero-anim, .hero-zoom, .scroll-bounce { animation: none; opacity: 1; }
}

/*** ---------- Scroll fade-in (Intersection Observer driven) ---------- ***/
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible { opacity: 1; transform: translateY(0); }

.delay-100.visible, .delay-100 { transition-delay: 0.1s; }
.delay-200.visible, .delay-200 { transition-delay: 0.2s; }
.delay-300.visible, .delay-300 { transition-delay: 0.3s; }

/*** ---------- Step badges (process timeline) ---------- ***/
.step-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: #855300;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: -3.5rem auto 0.75rem;
  box-shadow: 0 4px 14px rgba(9,20,38,0.18);
  border: 4px solid #ffffff;
  position: relative;
}

@media (max-width: 767px) {
  .step-badge { margin: 0 auto 0.75rem; }
}

/*** ---------- Process section (before/after spotlight) ---------- ***/
.process-section { isolation: isolate; }

.process-vignette {
  background:
    linear-gradient(to bottom, rgba(9,20,38,0.55) 0%, rgba(9,20,38,0.25) 30%, rgba(9,20,38,0.25) 70%, rgba(9,20,38,0.55) 100%);
}

.process-step-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 20px 45px -18px rgba(9,20,38,0.45);
}

/*** ---------- Service cards ---------- ***/
.service-card {
  background: #ffffff;
  border: 1px solid #e0e3e5;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(9,20,38,0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  scroll-margin-top: calc(var(--nav-h) + 12px);
  cursor: pointer;
}

.service-card:focus-visible {
  outline: 3px solid #e8702a;
  outline-offset: 2px;
}

.service-card:hover {
  box-shadow: 0 20px 40px -18px rgba(9,20,38,0.22);
  transform: translateY(-4px);
}

.service-card-img {
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}

.service-card:hover .service-card-img { transform: scale(1.06); }

.service-icon-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: rgba(9,20,38,0.82);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  backdrop-filter: blur(4px);
}

.service-link {
  display: inline-flex;
  align-items: center;
  color: #855300;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.service-link:hover { color: #684000; }

/*** ---------- Testimonials ---------- ***/
.testimonial-card {
  background: #ffffff;
  border: 1px solid #e0e3e5;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(9,20,38,0.04);
}

.avatar-initials {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  background: #091426;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/*** ---------- Contact ---------- ***/
.contact-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 0.5rem;
  background: #eceef0;
  color: #855300;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  margin-top: 0.15rem;
}

.form-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #c5c6cd;
  border-radius: 0.25rem;
  padding: 0.75rem;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #091426;
  box-shadow: 0 0 0 3px rgba(9,20,38,0.1);
}

.form-success {
  color: #1e6f46;
  background: #e6f4ec;
  border: 1px solid #bfe3cf;
  border-radius: 0.375rem;
  padding: 0.85rem 1rem;
  font-size: 14px;
  margin-top: 0.5rem;
}

.map-frame iframe { display: block; filter: grayscale(0.15) contrast(1.03); }

/*** ---------- CTA banner ---------- ***/
.cta-banner { isolation: isolate; }

/*** ---------- Contact section ambient background ---------- ***/
.contact-section { isolation: isolate; }

.contact-ambient-bg {
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.05);
  opacity: 0.4;
  transform: scale(1.15);
  animation: contactAmbientDrift 24s ease-in-out infinite alternate;
}

@keyframes contactAmbientDrift {
  0% { transform: scale(1.15) translate(0, 0); }
  100% { transform: scale(1.24) translate(-2%, -1.5%); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-ambient-bg { animation: none; }
}

/*** ---------- Footer ---------- ***/
.footer-link {
  color: #a9b0bb;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  display: inline-block;
}

.footer-link:hover { color: #ffffff; }

/*** ---------- Cookie banner ---------- ***/
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: #e6e8ea;
  border-top: 1px solid #c5c6cd;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 -4px 24px rgba(9,20,38,0.08);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.cookie-banner.is-visible { transform: translateY(0); }

.cookie-btn {
  padding: 0.6rem 1.15rem;
  border-radius: 0.25rem;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cookie-btn-outline {
  border: 1px solid #091426;
  color: #091426;
  background: transparent;
}

.cookie-btn-outline:hover { background: #ffffff; }

.cookie-btn-solid {
  background: #091426;
  color: #ffffff;
  border: 1px solid #091426;
}

.cookie-btn-solid:hover { background: #1e293b; }

/*** ---------- Back to top ---------- ***/
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  background: #091426;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(9,20,38,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, visibility 0.3s;
  z-index: 80;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: #e8702a; }

/*** ---------- Legal pages (Terms / Privacy) ---------- ***/
.legal-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #091426;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
}

.legal-content h2:first-of-type { margin-top: 0.5rem; }

.legal-content p {
  font-family: 'Inter', sans-serif;
  color: #45474c;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 1rem;
  color: #45474c;
}

.legal-content li { margin-bottom: 0.4rem; line-height: 1.7; }

.legal-content strong { color: #091426; }

.legal-content a {
  color: #855300;
  text-decoration: underline;
}

.legal-content a:hover { color: #684000; }

/*** ---------- Misc ---------- ***/
img { max-width: 100%; }
