/* Asteroid RH — angular / sharp theme + layout refresh */

:root {
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --radius-2xl: 0px;
  --radius-3xl: 0px;
  --angular-line: rgba(155, 239, 60, 0.35);
  --angular-edge: rgba(255, 255, 255, 0.12);
  --angular-panel: rgba(255, 255, 255, 0.03);
  --space-grid: rgba(155, 239, 60, 0.04);
}

/* Force sharp corners site-wide (keep star dots round) */
.rounded-sm,
.rounded,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
.rounded-full,
.card-surface {
  border-radius: 0 !important;
}

/* Status / star dots stay circular */
.animate-twinkle,
span.h-1\.5.w-1\.5,
span.h-2.w-2,
span.inline-block.h-2.w-2 {
  border-radius: 9999px !important;
}

/* Header — geometric bar */
header.fixed {
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0);
  transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

header.fixed.scrolled {
  background: rgba(6, 6, 7, 0.88) !important;
  border-bottom-color: var(--angular-edge);
  backdrop-filter: blur(10px);
}

header nav {
  min-height: 4.25rem;
}

/* Hero — full-bleed composition */
#top.hero-angular {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 5.5rem;
  padding-bottom: 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(155, 239, 60, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(125, 188, 255, 0.06), transparent 50%),
    linear-gradient(180deg, #050506 0%, #0a0c10 45%, #060607 100%);
}

#top.hero-angular::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--space-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--space-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

#top.hero-angular::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 1px solid transparent;
  background:
    linear-gradient(#060607, #060607) padding-box,
    linear-gradient(135deg, rgba(155, 239, 60, 0.25), transparent 40%, transparent 60%, rgba(125, 188, 255, 0.2)) border-box;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: screen;
}

#top .hero-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 640px) {
  #top .hero-shell {
    padding-inline: 2rem;
  }
}

@media (min-width: 1024px) {
  #top .hero-shell {
    padding-inline: 2.5rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    min-height: calc(100svh - 9rem);
  }
}

#top .hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
  max-width: 36rem;
}

#top .hero-brand {
  font-family: var(--font-display), ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

#top .hero-brand span {
  display: block;
  color: #9bef3c;
}

#top .hero-lead {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.65;
  color: rgba(198, 214, 230, 0.72);
}

#top .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

#top .hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 28rem);
  aspect-ratio: 1;
}

@media (min-width: 1024px) {
  #top .hero-visual {
    width: min(100%, 34rem);
    justify-self: end;
  }
}

#top .hero-visual-frame {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(155, 239, 60, 0.28);
  pointer-events: none;
  animation: frame-pulse 4.5s ease-in-out infinite;
}

#top .hero-visual-frame::before,
#top .hero-visual-frame::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border-color: #9bef3c;
  border-style: solid;
}

#top .hero-visual-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

#top .hero-visual-frame::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

#top .hero-mascot {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  animation: mascot-float 6s ease-in-out infinite;
}

#top .hero-mascot img {
  object-fit: contain;
  filter: drop-shadow(0 24px 48px rgba(155, 239, 60, 0.18));
}

#top .hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: rgba(198, 214, 230, 0.4);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Angular CTA buttons */
.btn-angular-primary,
a.btn-angular-primary,
a.bg-orbital.rounded-full,
button.bg-orbital.rounded-full,
a[class*="bg-orbital"][class*="rounded-full"] {
  border-radius: 0 !important;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  box-shadow: none !important;
}

.btn-angular-ghost,
a.btn-angular-ghost {
  border-radius: 0 !important;
  position: relative;
}

.btn-angular-ghost::after,
a.btn-angular-ghost::after,
a[class*="px-7"][class*="border-white"][class*="rounded-full"]::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-top: 2px solid rgba(155, 239, 60, 0.7);
  border-right: 2px solid rgba(155, 239, 60, 0.7);
  pointer-events: none;
}

/* Section rhythm */
main > section:not(#top) {
  position: relative;
}

main > section:not(#top)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--angular-edge), transparent);
  pointer-events: none;
}

/* Panel / card angular treatment */
.card-surface,
#lore > div,
#contracts .card-surface,
#roadmap article,
#community article,
#faq details,
main article,
main aside {
  border-radius: 0 !important;
  position: relative;
}

.card-surface {
  background: linear-gradient(160deg, rgba(12, 16, 22, 0.95), rgba(8, 10, 14, 0.98));
  border: 1px solid var(--angular-edge) !important;
  box-shadow: none !important;
}

.card-surface::before,
#lore > div:first-of-type::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-top: 2px solid var(--angular-line);
  border-left: 2px solid var(--angular-line);
  pointer-events: none;
  z-index: 2;
}

.card-surface::after,
#lore > div:first-of-type::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border-right: 2px solid var(--angular-line);
  border-bottom: 2px solid var(--angular-line);
  pointer-events: none;
  z-index: 2;
}

#lore > div:first-of-type {
  border-radius: 0 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Timeline markers — squares instead of circles */
#lore span.absolute.h-3.w-3 {
  border-radius: 0 !important;
  transform: rotate(45deg);
}

/* Soften glow blobs into angular washes */
main .blur-3xl {
  border-radius: 0 !important;
  opacity: 0.55;
  filter: blur(56px);
}

/* Original hero (post-hydration) layout polish */
#top:not(.hero-angular) {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 70% 35%, rgba(155, 239, 60, 0.07), transparent 55%),
    linear-gradient(180deg, #050506 0%, #0a0c10 50%, #060607 100%) !important;
}

#top:not(.hero-angular) > .absolute.inset-0.bg-black {
  background:
    linear-gradient(var(--space-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--space-grid) 1px, transparent 1px),
    #060607 !important;
  background-size: 48px 48px, 48px 48px, auto !important;
  opacity: 1;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 25%, transparent 80%);
}

#top:not(.hero-angular) .relative.mx-auto.mb-8.h-28,
#top:not(.hero-angular) .relative.mx-auto.mb-8.h-28.sm\:mb-12,
#top:not(.hero-angular) [class*="h-28"][class*="w-28"] {
  width: min(72vw, 18rem) !important;
  height: min(72vw, 18rem) !important;
  margin-bottom: 1.75rem !important;
}

@media (min-width: 640px) {
  #top:not(.hero-angular) [class*="sm:h-36"] {
    width: 20rem !important;
    height: 20rem !important;
  }
}

#top:not(.hero-angular) h1.font-display {
  font-size: clamp(3rem, 9vw, 5.5rem) !important;
  letter-spacing: -0.04em;
}

#top:not(.hero-angular) .flex.max-w-2xl.flex-col {
  max-width: 40rem !important;
  gap: 1.35rem !important;
}

/* Hide CA chip in first viewport for cleaner hero composition */
#top:not(.hero-angular) .flex.w-full.max-w-2xl.flex-wrap.items-center.justify-center.gap-2 {
  display: none !important;
}

/* Square badges / pills sitewide (except status dots & stars) */
.rounded-full:not(.animate-twinkle):not(.h-1\.5):not(.h-2):not(.inline-block.h-2) {
  border-radius: 0 !important;
}

/* FAQ / details */
#faq details,
#faq summary {
  border-radius: 0 !important;
}

/* Footer polish */
footer {
  border-top: 1px solid var(--angular-edge);
}

/* Reveal fallback if client animation never runs */
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes frame-pulse {
  0%,
  100% {
    border-color: rgba(155, 239, 60, 0.22);
  }
  50% {
    border-color: rgba(155, 239, 60, 0.5);
  }
}

#top .hero-copy > *,
#top .hero-visual {
  opacity: 0;
  animation: hero-in 0.7s ease forwards;
}

#top .hero-copy > *:nth-child(1) {
  animation-delay: 0.05s;
}
#top .hero-copy > *:nth-child(2) {
  animation-delay: 0.15s;
}
#top .hero-copy > *:nth-child(3) {
  animation-delay: 0.25s;
}
#top .hero-copy > *:nth-child(4) {
  animation-delay: 0.35s;
}
#top .hero-visual {
  animation-delay: 0.2s;
}

/* Mobile stacking */
@media (max-width: 1023px) {
  #top .hero-copy {
    text-align: center;
    align-items: center;
    margin-inline: auto;
  }

  #top .hero-actions {
    justify-content: center;
  }

  #top .hero-visual {
    order: -1;
    width: min(72vw, 18rem);
  }

  #top.hero-angular {
    padding-top: 6rem;
    padding-bottom: 5rem;
  }
}
