/* Abyss Gaming Hub v234Z R92 — responsive public navigation, feature carousel,
   and live security-status presentation.
   Owns only public-home interaction/layout refinements introduced by R92.
   Base public design remains in public-home.css, R90 composition remains intact,
   and R89 continues to own phone safe-area/notch geometry. */

body.public-home-page {
  --agh-r92-carousel-gap: 18px;
  --agh-r92-nav-collapse: 1080px;
}

/* ---------- One-line adaptive top navigation ---------- */
body.public-home-page .nav-inner {
  flex-wrap: nowrap;
  min-width: 0;
}

body.public-home-page .brand,
body.public-home-page .nav-actions,
body.public-home-page .nav-menu {
  flex: 0 0 auto;
}

body.public-home-page .nav-links {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  gap: clamp(12px, 1.55vw, 25px);
  white-space: nowrap;
}

body.public-home-page .nav-links a,
body.public-home-page .nav-actions,
body.public-home-page .nav-actions a {
  white-space: nowrap;
}

/* Compact the full desktop bar before it reaches the point where labels can
   fold onto a second visual row. */
@media (min-width: 1081px) and (max-width: 1260px) {
  body.public-home-page .nav-inner { gap: 16px; }
  body.public-home-page .nav-links { gap: 13px; font-size: 11px; }
  body.public-home-page .brand { gap: 9px; }
  body.public-home-page .brand-sub { display: none; }
  body.public-home-page .nav-signin { padding-inline: 8px; }
  body.public-home-page .nav-primary { padding-inline: 13px; }
  body.public-home-page .nav-session { max-width: 108px; }
}

/* At laptop/narrow-window widths, switch deliberately to the existing menu
   instead of allowing the desktop links/actions to wrap. */
@media (max-width: 1080px) {
  body.public-home-page .nav-links,
  body.public-home-page .nav-actions {
    display: none;
  }

  body.public-home-page .nav-menu {
    display: grid;
    place-items: center;
  }

  body.public-home-page .site-nav.open .nav-links {
    display: grid;
    position: absolute;
    left: max(14px, calc((100vw - min(1180px, calc(100vw - 40px))) / 2));
    right: max(14px, calc((100vw - min(1180px, calc(100vw - 40px))) / 2));
    top: 64px;
    gap: 0;
    padding: 8px;
    border: 1px solid rgba(130, 232, 249, .12);
    border-radius: 18px;
    background: rgba(3, 13, 22, .98);
    box-shadow: 0 25px 60px rgba(0, 0, 0, .42);
  }

  body.public-home-page .site-nav.open .nav-links a {
    padding: 13px 12px;
    border-radius: 10px;
  }

  body.public-home-page .site-nav.open .nav-links a:hover,
  body.public-home-page .site-nav.open .nav-links a:focus-visible {
    background: rgba(255, 255, 255, .035);
  }
}

/* R89 owns the actual safe-area offsets below 780px and loads after this file. */

/* ---------- Feature carousel ---------- */
body.public-home-page .feature-carousel {
  position: relative;
}

body.public-home-page .feature-carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x pan-y pinch-zoom;
  border-radius: 28px;
}

body.public-home-page .feature-carousel-viewport::-webkit-scrollbar {
  display: none;
}

body.public-home-page .feature-carousel .capability-grid {
  display: flex;
  width: max-content;
  max-width: none;
  gap: var(--agh-r92-carousel-gap);
  align-items: stretch;
  padding: 2px 2px 8px;
}

body.public-home-page .feature-carousel .capability-card,
body.public-home-page .feature-carousel .capability-card-wide {
  flex: 0 0 clamp(430px, 45vw, 560px);
  width: clamp(430px, 45vw, 560px);
  min-width: 0;
  min-height: 388px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body.public-home-page .feature-carousel .capability-card-wide {
  grid-column: auto;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .72fr);
  gap: 24px;
}

body.public-home-page .feature-carousel .artwork-demo {
  min-width: 0;
  padding: 14px;
  gap: 9px;
}

body.public-home-page .feature-carousel .capability-card:focus-visible {
  outline: 2px solid rgba(132, 239, 255, .78);
  outline-offset: -3px;
}

body.public-home-page .feature-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

body.public-home-page .feature-carousel-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #6f8e9b;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

body.public-home-page .feature-carousel-status b {
  color: #b7f5ff;
  font-size: 11px;
}

body.public-home-page .feature-carousel-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.public-home-page .feature-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #284653;
  cursor: pointer;
  transition: width .16s ease, border-radius .16s ease, background .16s ease, box-shadow .16s ease;
}

body.public-home-page .feature-carousel-dot[aria-current="true"] {
  width: 22px;
  border-radius: 999px;
  background: #7ae7f6;
  box-shadow: 0 0 15px rgba(92, 222, 241, .26);
}

body.public-home-page .feature-carousel-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.public-home-page .feature-carousel-arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(132, 239, 255, .14);
  border-radius: 13px;
  background: rgba(255, 255, 255, .032);
  color: #b8f4fc;
  font-size: 18px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, opacity .16s ease;
}

body.public-home-page .feature-carousel-arrow:hover,
body.public-home-page .feature-carousel-arrow:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(132, 239, 255, .32);
  background: rgba(92, 211, 235, .08);
}

body.public-home-page .feature-carousel-arrow:disabled {
  opacity: .28;
  cursor: default;
  transform: none;
}

/* Give the first featured slide room to breathe without restoring the old
   full-width vertical stack. */
body.public-home-page .feature-carousel .capability-card-wide h3 {
  font-size: clamp(25px, 2.3vw, 34px);
}

/* ---------- Security section + conditional trust widget ---------- */
body.public-home-page .security-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.public-home-page .security-item {
  min-width: 0;
}

body.public-home-page .security-item[data-turnstile-security].is-live {
  border-color: rgba(120, 239, 191, .15);
  background: rgba(120, 239, 191, .035);
}

body.public-home-page .security-trust-badge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 42;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(119, 238, 191, .18);
  border-radius: 15px;
  background: rgba(3, 13, 22, .88);
  color: #d8f8ed;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .34), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

body.public-home-page .security-trust-badge[hidden] {
  display: none !important;
}

body.public-home-page .security-trust-badge:hover,
body.public-home-page .security-trust-badge:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(119, 238, 191, .35);
  background: rgba(5, 21, 33, .95);
}

body.public-home-page .security-trust-shield {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(120,239,191,.16), rgba(82,205,239,.09));
  color: #7eebbb;
  font-size: 15px;
  font-weight: 1000;
  box-shadow: inset 0 0 0 1px rgba(124, 240, 196, .10);
}

body.public-home-page .security-trust-copy {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

body.public-home-page .security-trust-copy b {
  font-size: 9px;
  letter-spacing: .02em;
}

body.public-home-page .security-trust-copy span {
  color: #71998e;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  body.public-home-page .feature-carousel .capability-card,
  body.public-home-page .feature-carousel .capability-card-wide {
    flex-basis: min(76vw, 620px);
    width: min(76vw, 620px);
  }
}

@media (max-width: 780px) {
  body.public-home-page .feature-carousel-viewport {
    margin-right: -14px;
    padding-right: 14px;
    border-radius: 24px 0 0 24px;
  }

  body.public-home-page .feature-carousel .capability-card,
  body.public-home-page .feature-carousel .capability-card-wide {
    flex-basis: min(86vw, 520px);
    width: min(86vw, 520px);
    min-height: 370px;
  }

  body.public-home-page .feature-carousel .capability-card-wide {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  body.public-home-page .feature-carousel .artwork-demo {
    margin-top: auto;
  }

  body.public-home-page .feature-carousel-controls {
    margin-top: 14px;
  }

  body.public-home-page .feature-carousel-dots {
    display: none;
  }

  body.public-home-page .security-list {
    grid-template-columns: 1fr;
  }

  /* The fixed trust mark is useful on desktop but competes with browser chrome
     and content on phones. Security remains documented in the section itself. */
  body.public-home-page .security-trust-badge {
    display: none !important;
  }
}

@media (max-width: 560px) {
  body.public-home-page .feature-carousel .capability-card,
  body.public-home-page .feature-carousel .capability-card-wide {
    flex-basis: calc(100vw - 46px);
    width: calc(100vw - 46px);
    min-height: 350px;
    padding: 24px;
  }

  body.public-home-page .feature-carousel-status {
    letter-spacing: .06em;
  }

  body.public-home-page .feature-carousel-arrow {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.public-home-page .feature-carousel-viewport { scroll-behavior: auto; }
  body.public-home-page .feature-carousel-dot,
  body.public-home-page .feature-carousel-arrow,
  body.public-home-page .security-trust-badge { transition: none; }
}
