/* === AGS America Premium Homepage === */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-light: #f0ede8;
  --bg-dark: #111111;
  --text-on-light: #1a1a1a;
  --text-on-dark: #f0ede8;
  --accent: #c8a45c;
  --accent-hover: #dbb96e;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-on-dark);
  overflow-x: hidden;
}

/* === Loader === */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: 0.3em;
}

.loader-bar-track {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}

#loader-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.1s linear;
}

#loader-percent {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 3vw;
  background: var(--bg-dark);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo-link {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* === Hero === */
.hero-standalone {
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 5vw;
  z-index: 10;
}

.hero-standalone .section-label {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 12rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--text-on-dark);
  margin-bottom: 2rem;
}

.hero-heading span {
  display: block;
  opacity: 0;
  transform: translateY(40px);
}

.hero-tagline {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  max-width: 480px;
  line-height: 1.6;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 5vw;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-indicator svg {
  animation: bobDown 2s ease-in-out infinite;
}

@keyframes bobDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* === Canvas === */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
}

.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* === Dark Overlay === */
#dark-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

/* === Marquee === */
.marquee-wrap {
  position: fixed;
  z-index: 3;
  width: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

#marquee1 {
  bottom: 12vh;
}

#marquee2 {
  top: 15vh;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 12vw);
  font-weight: 700;
  color: rgba(255,255,255,0.06);
  white-space: nowrap;
  will-change: transform;
  line-height: 1;
}

/* === Scroll Container === */
#scroll-container {
  position: relative;
  width: 100%;
  height: 680vh;
  z-index: 5;
}

/* === Scroll Sections === */
.scroll-section {
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.scroll-section.visible {
  opacity: 1;
  pointer-events: auto;
}

.section-content {
  min-height: 100vh;
}

/* Side alignment zones */
.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
  justify-content: flex-start;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
  justify-content: flex-end;
}

.section-inner {
  max-width: 40vw;
  background: rgba(17, 17, 17, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2rem 2.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.section-body {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
}

/* === Stats === */
.section-stats {
  justify-content: center;
  text-align: center;
}

.section-stats .stats-grid {
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem 4rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2.5rem;
  max-width: 1050px;
  margin: 0 auto;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* === CTA === */
.cta-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.85rem 2rem;
  max-width: 100%;
  background: var(--accent);
  color: var(--bg-dark);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.section-cta {
  min-height: auto;
}

.section-cta .section-inner {
  padding-bottom: 5rem;
}

.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* === Footer === */
.site-footer {
  position: relative;
  z-index: 10;
  background: var(--bg-dark);
  padding: 1.25rem 5vw;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.footer-info {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* === Mobile === */
/* === Hamburger Toggle === */
.nav-toggle {
  display: none;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  z-index: 201;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 2.5px 0;
  background: #fff;
  border-radius: 1px;
  -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17,17,17,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 200;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .hero-heading {
    font-size: clamp(2.5rem, 12vw, 5rem);
  }

  #scroll-container {
    height: 550vh;
  }

  .align-left,
  .align-right {
    padding-left: 5vw;
    padding-right: 5vw;
    justify-content: center;
  }

  .section-inner {
    max-width: 90vw;
  }

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

  .section-stats .stats-grid {
    padding: 2rem;
  }

  .marquee-text {
    font-size: 6rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
