/* ============ Home Hero (video) ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Set on the wrapper because main.js drives each video's own opacity for the loop crossfade */
  opacity: 0.85;
}
.hero-video-wrap video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1.02);
  will-change: transform;
  pointer-events: none;
}
/* This is a decorative background video (no controls attribute is set), but
   some mobile browsers still render their own big play/pause affordance on
   a video that isn't yet playing. Hide that native UI defensively. */
.hero-video-wrap video::-webkit-media-controls,
.hero-video-wrap video::-webkit-media-controls-start-playback-button,
.hero-video-wrap video::-webkit-media-controls-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
  pointer-events: none !important;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4,7,15,0.55) 0%, rgba(4,7,15,0.65) 45%, var(--bg) 100%),
    linear-gradient(90deg, rgba(4,7,15,0.75) 0%, rgba(4,7,15,0.25) 55%, rgba(4,7,15,0.65) 100%);
}
/* Only set vertical padding so .container keeps its side gutters */
.hero-content { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 60px; width: 100%; }
.hero-content h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); max-width: 760px; }
.hero-content .lead { font-size: 1.15rem; max-width: 560px; color: var(--text-dim); }
@media (max-width: 640px) {
  .hero-content { padding-left: 20px; padding-right: 20px; }
  .hero-content .lead { font-size: 1rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
/* Autoplay blocked (e.g. iOS Low Power Mode): hide the video element so no
   native play button shows, and fall back to the poster image instead. */
.hero-video-wrap { background: url("../images/hero-wave.png") center / cover no-repeat; }
.hero-video-wrap.video-blocked video { display: none; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin: var(--space-5) 0 var(--space-6); flex-wrap: wrap; }
.play-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
}
.play-badge svg { width: 12px; height: 12px; }
.scroll-cue {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.scroll-cue.hide {
  opacity: 0;
  visibility: hidden;
}
.scroll-cue .mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-cue .mouse::after {
  content: "";
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--brand-2);
  animation: scroll-cue-move 1.6s infinite;
}
@keyframes scroll-cue-move {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  100% { opacity: 0; }
}

/* ============ Section background orbs ============ */
.orb-field { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  background: var(--brand-gradient);
}
.orb-1 { width: 420px; height: 420px; top: -120px; right: -80px; }
.orb-2 { width: 340px; height: 340px; bottom: -100px; left: -60px; opacity: 0.22; }

/* ============ Services Grid ============ */
/* Service cards: photo (from the inline --img) fades in on hover, keyboard focus or tap */
.svc-card { position: relative; overflow: hidden; isolation: isolate; cursor: pointer; outline: none; }
.svc-card::before,
.svc-card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.45s ease, transform 0.6s ease; }
.svc-card::before { background: var(--img) center / cover no-repeat; transform: scale(1.08); }
.svc-card::after { background: linear-gradient(180deg, rgba(4,7,15,0.35) 0%, rgba(4,7,15,0.82) 100%); }
.svc-card p { transition: color 0.3s ease; }
.svc-card.is-active::before, .svc-card.is-touched::before,
.svc-card:focus-visible::before { opacity: 1; transform: scale(1); }
.svc-card.is-active::after, .svc-card.is-touched::after,
.svc-card:focus-visible::after { opacity: 1; }
.svc-card.is-active p, .svc-card.is-touched p,
.svc-card:focus-visible p { color: var(--text); }
@media (hover: hover) {
  .svc-card:hover::before { opacity: 1; transform: scale(1); }
  .svc-card:hover::after { opacity: 1; }
  .svc-card:hover p { color: var(--text); }
}
.services-intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-6); align-items: center; }

/* ============ Why choose / features ============ */
.feature-strip {
  padding: var(--space-8) 0;
  position: relative;
}
.feature-strip .section-head.center::before,
.feature-strip .section-head.center::after { display: none; }
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
.feature-item { text-align: center; }
.feature-icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-2);
  background: radial-gradient(circle, rgba(47,125,251,0.12), transparent 70%);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.feature-item p { font-size: 0.88rem; }
@media (max-width: 1023px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } .services-intro { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr 1fr; } }

/* ============ Values grid (about) ============ */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .values-grid { grid-template-columns: 1fr 1fr; } }

/* ============ Story split ============ */
.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center; }
.split-row img { border-radius: var(--radius-lg); border: 1px solid var(--border-strong); }
.mini-stats { display: flex; gap: var(--space-6); margin-top: var(--space-5); }
.mini-stats .num { font-family: "Space Grotesk", sans-serif; font-size: 2rem; font-weight: 700; color: var(--brand-2); }
.mini-stats .label { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 900px) { .split-row { grid-template-columns: 1fr; } .split-row.reverse .media { order: -1; } }

/* ============ Portfolio Grid ============ */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.project-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 24px 48px rgba(0,0,0,0.4); }
.project-card .thumb { aspect-ratio: 342/160; overflow: hidden; }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .thumb img { transform: scale(1.06); }
.project-card .info { padding: var(--space-4); }
.project-card .info h3 { font-size: 1.05rem; margin-bottom: 2px; }
.project-card .info p { font-size: 0.85rem; margin: 0; }
.project-card.hidden { display: none; }
.project-card .demo-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 10px; }
.project-card .demo-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 8px var(--brand-2); }
@media (max-width: 1023px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .portfolio-grid { grid-template-columns: 1fr; } }

/* ============ Testimonials ============ */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.testimonial-card .stars { color: #facc15; display: flex; gap: 3px; margin-bottom: var(--space-3); }
.testimonial-card .stars svg { width: 16px; height: 16px; fill: #facc15; }
.testimonial-card .quote-icon { color: var(--brand-2); opacity: 0.6; margin-bottom: 10px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: var(--space-4); }
.testimonial-author .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #04070f; font-size: 0.95rem;
}
.testimonial-author .name { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.testimonial-author .role { font-size: 0.8rem; color: var(--text-muted); }
@media (max-width: 1023px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ============ CTA Band ============ */
.cta-band {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  padding: var(--space-6);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 180% at 0% 0%, rgba(47,125,251,0.18), transparent 60%), var(--surface);
}
.cta-band .icon-badge-lg {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--brand-gradient-soft);
  border: 1px solid var(--border-strong);
  color: var(--brand-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cta-band .icon-badge-lg svg { width: 28px; height: 28px; }
.cta-band-text { flex: 1; display: flex; gap: var(--space-4); align-items: center; }
.cta-band h2 { font-size: 1.5rem; margin-bottom: 4px; }
.cta-band p { margin: 0; }
@media (max-width: 900px) { .cta-band { flex-direction: column; align-items: flex-start; } .cta-band-text { flex-direction: column; align-items: flex-start; } }

/* ============ Blog ============ */
.blog-list { display: flex; flex-direction: column; }
.blog-row {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
  transition: transform 0.25s ease;
}
.blog-row:hover { transform: translateX(4px); }
.blog-row .thumb { border-radius: var(--radius); overflow: hidden; aspect-ratio: 305/148; }
.blog-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-row .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.blog-row .meta .date { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.blog-row h3 { font-size: 1.25rem; margin-bottom: 6px; }
.blog-row .arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-2);
  transition: all 0.25s ease;
}
.blog-row:hover .arrow { background: var(--brand-gradient); color: #04070f; border-color: transparent; }
@media (max-width: 780px) {
  .blog-row { grid-template-columns: 1fr; }
  .blog-row .arrow { display: none; }
}

.post-body { max-width: 760px; margin: 0 auto; }
.post-body h2 { font-size: 1.5rem; margin-top: var(--space-6); }
.post-body p { font-size: 1.02rem; }
.post-step { display: flex; gap: var(--space-4); margin-bottom: var(--space-5); }
.post-step .step-num {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand-gradient-soft);
  border: 1px solid var(--border-strong);
  color: var(--brand-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: "Space Grotesk", sans-serif;
}
.post-share { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-5); flex-wrap: wrap; gap: 16px; }
.post-meta-bar { display: flex; align-items: center; gap: 20px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: var(--space-5); flex-wrap: wrap; }
.post-meta-bar span { display: flex; align-items: center; gap: 6px; }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-6); align-items: start; }
.contact-info-item { display: flex; gap: var(--space-4); margin-bottom: var(--space-5); }
.contact-info-item .icon-badge { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-gradient); color: #04070f; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.contact-info-item .icon-badge svg { width: 22px; height: 22px; }
.contact-info-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.contact-info-item p { margin: 0; font-size: 0.92rem; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); }
.form-group { margin-bottom: var(--space-4); }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.form-group .req { color: #f87171; }
.form-control {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  min-height: 48px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control option {
  background: var(--surface);
  color: var(--text);
}
.form-control option:disabled { color: var(--text-muted); }
.form-control:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(34,211,238,0.15); outline: none; }
textarea.form-control { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }
.form-status { margin-top: var(--space-3); font-size: 0.9rem; padding: 12px 16px; border-radius: var(--radius-sm); display: none; }
.form-status.success { display: block; background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); color: #86efac; }
.form-status.error { display: block; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.4); color: #fca5a5; }
.field-error { color: #fca5a5; font-size: 0.78rem; margin-top: 6px; display: none; }
.form-control.invalid { border-color: #f87171; }
.form-control.invalid + .field-error { display: block; }
@media (max-width: 1023px) { .contact-grid { grid-template-columns: 1fr; } }

/* ============ Pricing ============ */
.pricing-toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: var(--space-6); }
.stat-row-centered {
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  column-gap: var(--space-7);
  margin-top: var(--space-6);
}
@media (max-width: 900px) {
  .stat-row-centered { column-gap: var(--space-4); }
}
@media (max-width: 767px) {
  .stat-row-centered {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    row-gap: var(--space-5);
    padding: 0 20px;
  }
  .stat-row-centered .stat-item {
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
  }
  .stat-row-centered .stat-item .num { white-space: nowrap; }
}
.switch { position: relative; width: 52px; height: 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-gradient); transition: transform 0.25s ease; }
.switch.on::after { transform: translateX(24px); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); align-items: stretch; }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: var(--brand-2); background: linear-gradient(180deg, rgba(34,211,238,0.06), var(--surface) 40%); box-shadow: 0 0 60px rgba(34,211,238,0.12); transform: scale(1.03); transform-origin: top center; padding-top: 64px; }
.price-card .badge { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); }
.price-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.price-amount { display: flex; align-items: baseline; gap: 6px; margin: var(--space-3) 0; }
.price-amount .amount { font-family: "Space Grotesk", sans-serif; font-size: 2.75rem; font-weight: 700; }
.price-amount .period { color: var(--text-muted); font-size: 0.9rem; }
.price-features { margin: var(--space-4) 0; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.price-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text-dim); }
.price-features svg { width: 18px; height: 18px; color: var(--brand-2); flex-shrink: 0; margin-top: 2px; }
@media (max-width: 1023px) { .pricing-grid { grid-template-columns: 1fr; } .price-card.featured { transform: none; } }

.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: var(--space-4) 0; }
.faq-question { display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: var(--space-4); }
.faq-question h3 { font-size: 1rem; margin: 0; }
.faq-question svg { width: 20px; height: 20px; color: var(--brand-2); flex-shrink: 0; transition: transform 0.3s ease; }
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-answer p { padding-top: var(--space-3); margin: 0; }
.faq-item.open .faq-answer { max-height: 240px; }

/* ============ 404 ============ */
.error-page { min-height: 100vh; display: flex; align-items: center; padding-top: var(--header-h); position: relative; overflow: hidden; }
.error-code {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 700;
  text-align: center;
  line-height: 1;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 40px rgba(47,125,251,0.5));
}
.error-page h2 { text-align: center; font-size: 2rem; }
.error-page p.text-center { max-width: 480px; margin-left: auto; margin-right: auto; }
.error-actions { display: flex; justify-content: center; margin-top: var(--space-5); }

/* ============ Case study / project detail ============ */
.case-checklist { display: flex; flex-direction: column; gap: 14px; margin: var(--space-5) 0; }
.case-checklist li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.case-checklist svg { width: 20px; height: 20px; color: var(--brand-2); }
.case-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: var(--space-6); }
.case-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.case-gallery .shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); aspect-ratio: 4/3; }
.case-gallery .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.case-gallery .shot:hover img { transform: scale(1.08); }
.case-gallery .shot.brand-panel { display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.case-gallery .shot.brand-panel img { width: 60%; object-fit: contain; }
@media (max-width: 1023px) { .case-gallery { grid-template-columns: repeat(2, 1fr); } }

.related-nav { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) 0; }
.related-nav a { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brand-2); }
.related-nav svg { width: 18px; height: 18px; }
