/* Home-page-specific styles */

/* ── Hero ── */

.hero {
  position: relative;
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 68px;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(1.0);
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 40, .25);
  z-index: 1;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 50% at 70% 60%, rgba(46, 134, 193, .08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(91, 192, 250, .05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(46, 134, 193, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 134, 193, .04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  overflow: hidden;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  height: 100%;
  opacity: .06;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
}

.hero-wave:nth-child(1) {
  animation: waveFloat 8s ease-in-out infinite;
}

.hero-wave:nth-child(2) {
  animation: waveFloat 12s ease-in-out infinite reverse;
  bottom: 20px;
  opacity: .04;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  animation: slideRight 1s ease .2s both;
}


.hero h1 {
  font-size: 3.2rem;
  line-height: 1.12;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1.5px;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

.hero h1 em {
  font-style: normal;
  color: #5BC0FA;
  -webkit-text-fill-color: #5BC0FA;
  text-shadow: 0 0 20px rgba(91, 192, 250, .6), 0 2px 8px rgba(0, 0, 0, .7);
}

.hero-sub {
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero visual — ADCP illustration */

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1.2s ease .5s both;
}

.inst {
  position: relative;
  width: 380px;
  height: 380px;
}

.adcp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 140px;
  background: linear-gradient(180deg, #3A5F82, #1E3A5C);
  border-radius: 16px 16px 30px 30px;
  border: 2px solid rgba(46, 134, 193, .3);
  box-shadow:
    0 0 40px rgba(46, 134, 193, .15),
    inset 0 -20px 40px rgba(0, 0, 0, .2);
}

.adcp::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: var(--blue);
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(46, 134, 193, .5);
}

.adcp::after {
  content: 'DF9';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .5);
  letter-spacing: 2px;
}

.beam {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, rgba(61, 174, 245, .5), transparent);
  transform-origin: top center;
  animation: beamPulse 3s ease-in-out infinite;
}

.beam:nth-child(2) { transform: translate(-50%, 0) rotate(-30deg); animation-delay: .3s; }
.beam:nth-child(3) { transform: translate(-50%, 0) rotate(-15deg); animation-delay: .6s; }
.beam:nth-child(4) { transform: translate(-50%, 0) rotate(0deg);   animation-delay: .9s; }
.beam:nth-child(5) { transform: translate(-50%, 0) rotate(15deg);  animation-delay: 1.2s; }
.beam:nth-child(6) { transform: translate(-50%, 0) rotate(30deg);  animation-delay: 1.5s; }

.rr {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(46, 134, 193, .2);
  border-radius: 50%;
  animation: ripple 4s ease-out infinite;
}

.rr:nth-child(7) { width: 140px; height: 140px; animation-delay: 0s; }
.rr:nth-child(8) { width: 140px; height: 140px; animation-delay: 1.3s; }
.rr:nth-child(9) { width: 140px; height: 140px; animation-delay: 2.6s; }

.dr {
  position: absolute;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--blue-bright);
  opacity: .7;
  white-space: nowrap;
}

.dr:nth-child(10) { top: 20%; right: 10%; animation: dataStream 4s ease infinite; }
.dr:nth-child(11) { top: 40%; right: 5%;  animation: dataStream 4s ease 1.5s infinite; }
.dr:nth-child(12) { top: 60%; left: 5%;   animation: dataStream 4s ease .8s infinite; }
.dr:nth-child(13) { top: 30%; left: 8%;   animation: dataStream 4s ease 2.2s infinite; }

.orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(46, 134, 193, .1);
  border-radius: 50%;
}

.orb1 { width: 240px; height: 240px; }
.orb2 { width: 320px; height: 320px; }

/* ── Product stats (inline) ── */

.pstats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1rem 0;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  overflow: hidden;
}

.pstat {
  padding: .75rem 1rem;
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.pstat:nth-child(3n) {
  border-right: none;
}

.pstat:nth-last-child(-n+3) {
  border-bottom: none;
}

.pstat-n {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -1px;
}

.pstat-l {
  font-size: .7rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ── Products grid ── */

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.products-grid .pcard {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.products-grid .pvis {
  height: auto;
  min-height: 100%;
}

.products-grid .pinfo {
  display: flex;
  flex-direction: column;
}

/* ── Technology section ── */

.tech-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.tech-step {
  background: rgba(46, 134, 193, .06);
  border: 1px solid rgba(46, 134, 193, .15);
  border-radius: 12px;
  padding: 2rem 1.5rem;
}

.tech-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.tech-step h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: .75rem;
  font-weight: 600;
}

.tech-step p {
  color: var(--gray-300);
  line-height: 1.7;
  font-size: .9rem;
}

/* ── Applications grid ── */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ── Field Gallery ── */

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  height: 560px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* Col 1: two wide photos stacked */
.gallery-wide:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.gallery-wide:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

/* Col 2: tall photo spanning both rows */
.gallery-tall:nth-child(2) {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* Col 3: tall photo spanning both rows */
.gallery-tall:nth-child(4) {
  grid-column: 3;
  grid-row: 1 / 3;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .7) 0%, transparent 100%);
  font-size: .82rem;
  color: #fff;
  font-weight: 500;
}

/* ── Software section ── */

.sw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.sw-vis {
  background: var(--navy-mid);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(46, 134, 193, .15);
  position: relative;
  overflow: hidden;
}

/* Software visual variant: real product screenshots */
.sw-vis-screenshots {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.sw-screenshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid rgba(46, 134, 193, .2);
  transition: transform .35s ease;
}

.sw-screenshot[data-media="lightbox"]:hover {
  transform: scale(1.01);
}

.sw-win {
  background: #0D1B2A;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(46, 134, 193, .2);
}

.sw-tb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(46, 134, 193, .08);
  border-bottom: 1px solid rgba(46, 134, 193, .1);
}

.sw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.sw-dot.r { background: #FF5F57; }
.sw-dot.y { background: #FFBD2E; }
.sw-dot.g { background: #28CA41; }

.sw-tt {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--gray-300);
  margin-left: 8px;
}

.sw-body {
  padding: 1.5rem;
  min-height: 280px;
}

.sw-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  padding: 0 1rem;
  border-left: 1px solid rgba(46, 134, 193, .2);
  border-bottom: 1px solid rgba(46, 134, 193, .2);
}

.sw-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  border-radius: 2px 2px 0 0;
  min-width: 6px;
  opacity: .7;
  transition: opacity .3s;
}

.sw-bar:hover {
  opacity: 1;
}

.sw-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(46, 134, 193, .06);
  font-family: var(--font-mono);
  font-size: .7rem;
}

.sw-lbl { color: var(--gray-500); }
.sw-val { color: var(--blue-bright); }

.sw-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 1rem;
}

.sw-content p {
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: .95rem;
}

/* ── Roadmap ── */

.rm-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-top: 3rem;
}

.rm-track::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 5%;
  right: 5%;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), rgba(46, 134, 193, .2));
  z-index: 0;
}

.rm-step {
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rm-status {
  margin-top: auto;
}

.rm-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: 18px auto 1rem;
}

.rm-dot.on {
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(46, 134, 193, .2);
}

.rm-dot.off {
  background: var(--navy-mid);
  border: 2px solid rgba(46, 134, 193, .3);
}

.rm-step h5 {
  font-size: .85rem;
  color: #fff;
  margin-bottom: .25rem;
}

.rm-step p {
  font-size: .75rem;
  color: var(--gray-500);
}

.rm-status {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-top: .5rem;
}

.rm-status.live { color: var(--green); }
.rm-status.beta { color: var(--blue-bright); }
.rm-status.dev  { color: var(--gray-500); }

/* ── About grid ── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -.5px;
}

.about-content p {
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: .95rem;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── CTA ── */

.cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 50%,
    rgba(46, 134, 193, .08) 0%,
    transparent 70%
  );
}

.cta h2 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  position: relative;
}

.cta p {
  color: var(--gray-300);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  position: relative;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

/* ── Responsive: home-specific ── */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-visual {
    display: none;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .sw-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 220px;
    height: auto;
  }

  .gallery-wide:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .gallery-wide:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
  }

  .gallery-tall:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .gallery-tall:nth-child(4) {
    grid-column: 1 / 3;
    grid-row: 3;
    height: 280px;
  }

  .rm-track {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .rm-track::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .products-grid .pcard {
    grid-template-columns: 1fr;
  }

  .products-grid .pvis-photos {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
  }

  .products-grid .pvis-photo {
    aspect-ratio: 3 / 2;
    height: auto;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 220px);
    height: auto;
  }

  .gallery-wide:nth-child(1),
  .gallery-tall:nth-child(2),
  .gallery-wide:nth-child(3),
  .gallery-tall:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
    height: auto;
  }

  .hero-actions {
    flex-direction: column;
  }

  .rm-track {
    grid-template-columns: 1fr;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .tech-steps {
    grid-template-columns: 1fr;
  }

  .pstats {
    grid-template-columns: repeat(2, 1fr);
  }

  .pstat {
    border-right: none;
    border-bottom: 1px solid var(--gray-100);
  }

  .pstat:nth-child(3n) {
    border-right: none;
  }

  .pstat:nth-child(even) {
    border-left: 1px solid var(--gray-100);
  }

  .pstat:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--gray-100);
  }

  .pstat:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .cta h2 {
    font-size: 1.6rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}
