/* ASV Skopje — homepage. Layers on top of asv-legal.css, which supplies the
   palette, the top bar, the footer and the scroll-reveal machinery. */

/* ---------- hero ---------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--dark-2);
  color: #fff;
  padding: 84px 20px 64px;
  overflow: hidden;
}

.hero::after {              /* faint grid, echoes the survey drawings */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }

/* Emblem as a faint watermark on the right of the hero. Decorative only —
   aria-hidden in the markup — and it drops out on narrow screens where it
   would otherwise sit behind the headline. */
.hero-emblem {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: min(40vw, 470px);
  opacity: .13;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

@media (max-width: 900px) { .hero-emblem { display: none; } }

.hero-kicker {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 300;
  font-size: .76rem;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 200;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -.5px;
  margin-bottom: 20px;
}

.hero h1 strong { font-weight: 600; color: var(--accent); }

.hero-lead { font-size: 1.12rem; color: #a9b2be; max-width: 56ch; margin-bottom: 30px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 2px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
  border: 1px solid transparent;
}

.btn-primary { background: var(--accent); color: #04143a; }
.btn-primary:hover { background: #b3dbf7; color: #04143a; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,.28); color: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- scrubbed reconstruction --------------------------------------- */

/* Tall on purpose: its height is the scroll distance the video is scrubbed
   across. The sticky child is what the reader actually sees. */
.scrub { position: relative; height: 340vh; background: var(--navy-deep); }

.scrub-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  isolation: isolate;
}

/* The reconstruction fills the viewport as a background layer. The source is
   600x360, so it is upscaled — the scrim, the grain and the survey grid above
   it are what keep that from reading as a low-quality video rather than as a
   deliberately atmospheric one. */
.scrub-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.scrub-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* A hair of scale hides edge softness from the upscale; contrast/saturation
     put back what the stretch washes out. */
  transform: scale(1.04);
  filter: contrast(1.08) saturate(1.06) brightness(.92);
}

/* Scrim: dark enough that white type stays legible over any frame of the
   video, weighted to the side the copy sits on. */
.scrub-sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(1,6,46,.95) 0%, rgba(1,6,46,.86) 38%, rgba(1,6,46,.45) 70%, rgba(1,6,46,.62) 100%),
    linear-gradient(180deg, rgba(1,6,46,.85) 0%, rgba(1,6,46,.22) 30%, rgba(1,6,46,.3) 70%, rgba(1,6,46,.92) 100%);
}

/* Survey grid over the footage — ties the hero and the reconstruction together
   and further masks the upscale. */
.scrub-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
}

.scrub-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.scrub-head { max-width: 620px; }

.scrub-head .hero-kicker { margin-bottom: 12px; }

.scrub-head h2 {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 200;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  color: #fff;
  border: 0;
  margin: 0 0 16px;
  padding: 0;
  line-height: 1.08;
  letter-spacing: -.4px;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}

.scrub-head p {
  color: #c2c9d4;
  margin: 0;
  font-size: 1.08rem;
  max-width: 48ch;
  text-shadow: 0 1px 20px rgba(0,0,0,.6);
}

/* Corner readout, in the language of the reconstruction software itself. */
.viewport-label {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .62rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  background: rgba(1,6,46,.55);
  border: 1px solid rgba(255,255,255,.14);
  padding: 6px 12px;
  border-radius: 2px;
  backdrop-filter: blur(6px);
}

/* Timeline pinned to the bottom of the viewport. */
.viewport-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 3px;
  background: rgba(255,255,255,.12);
}

.viewport-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.scrub-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
}

/* ---------- generic section ---------------------------------------------- */

.section { padding: 90px 20px; }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-light { background: var(--bg); }
.section-dark { background: var(--dark); color: #fff; }

.section-dark h2, .section-dark h3 { color: #fff; border-color: rgba(255,255,255,.14); }
.section-dark p { color: #a9b2be; }

.section-title {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 200;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.15;
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

.section-lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; margin-bottom: 34px; }
.section-dark .section-lead { color: #a9b2be; }

/* ---------- stats --------------------------------------------------------- */

.stats { display: flex; flex-wrap: wrap; gap: 44px; margin-top: 40px; }

.stat-num {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 200;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: Montserrat, Arial, sans-serif;
  font-size: .74rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #8b94a1;
  margin-top: 8px;
}

/* ---------- 3D expertise track -------------------------------------------- */

.track-wrap { position: relative; margin-top: 10px; padding: 0 6px; }

.track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 40px 4px 46px;
  perspective: 1100px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.track::-webkit-scrollbar { display: none; }

.oblast {
  flex: 0 0 clamp(250px, 30vw, 330px);
  scroll-snap-align: center;
  background: #061049;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .18s linear, opacity .18s linear, border-color .25s ease;
  will-change: transform;
}

.oblast:hover { border-color: rgba(143,201,240,.55); }

.oblast-img { position: relative; aspect-ratio: 45 / 28; overflow: hidden; background: var(--navy-deep); }
.oblast-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.oblast-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,16,73,0) 40%, rgba(6,16,73,.94) 100%);
}

.oblast-body { padding: 20px 22px 26px; }

.oblast h3 {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: .3px;
}

.oblast p { font-size: .95rem; color: #9aa3b0; margin: 0; }

/* Arrows straddle the carousel rather than sitting under it, so the control is
   where the movement happens. They float above the cards on a blurred navy
   disc — the cards slide underneath and must stay readable through them. */
.track-nav { position: static; }

.track-nav button {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  z-index: 5;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(1,6,46,.72);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 22px rgba(1,6,46,.5);
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.track-nav button[data-track-nav="prev"] { left: -10px; }
.track-nav button[data-track-nav="next"] { right: -10px; }

.track-nav button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(1,6,46,.92);
}

.track-nav button[data-track-nav="prev"]:hover { transform: translateY(-50%) translateX(-3px); }
.track-nav button[data-track-nav="next"]:hover { transform: translateY(-50%) translateX(3px); }

/* ---------- team ---------------------------------------------------------- */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.member { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 22px; }
.member h3 { font-size: .98rem; margin: 0 0 4px; border: 0; padding: 0; }
.member p { font-size: .88rem; color: var(--muted); margin: 0; }

.member .role {
  font-family: Montserrat, Arial, sans-serif;
  font-size: .68rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-top: 8px;
}

/* ---------- payment ------------------------------------------------------- */

.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.pay-step {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  padding: 24px;
  border-radius: 4px;
}

.pay-step .n {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 200;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

/* ---------- contact ------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.contact-grid h3 {
  font-size: .8rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 0;
  padding: 0;
}

@media (max-width: 720px) {
  .hero { padding: 56px 20px 44px; }
  .section { padding: 60px 20px; }
  .scrub { height: 280vh; }
  .track-nav button { width: 44px; height: 44px; font-size: 1rem; }
  .track-nav button[data-track-nav="prev"] { left: -4px; }
  .track-nav button[data-track-nav="next"] { right: -4px; }
  .scrub-head h2 { font-size: 1.8rem; }
  .scrub-head p { font-size: 1rem; }
  .stats { gap: 28px; }
}

/* Reduced motion: the cards never receive their JS transforms, so make sure
   they still read as a clean horizontal set rather than a broken 3D layout. */
@media (prefers-reduced-motion: reduce) {
  .oblast { transform: none !important; opacity: 1 !important; }
  .track { scroll-snap-type: none; }
}

/* ---------- App Store badge ---------------------------------------------- */

/* Apple's badge artwork, used unmodified as their guidelines require: no
   recolouring, no added effects, and never smaller than the minimum size. */
.app-get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
}

.app-badge {
  display: inline-block;
  line-height: 0;
  transition: transform .2s ease, opacity .2s ease;
  background: none;          /* cancels the inherited link underline animation */
}

.app-badge:hover { transform: translateY(-2px); opacity: .88; }

.app-badge img { height: 53px; width: auto; display: block; }

@media (max-width: 480px) {
  .app-get { gap: 12px; }
  .app-badge img { height: 46px; }
}
