/* ============================================
   AltHub Landing Page — Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0e0e13;
  --bg-card: #13110f;
  --bg-card-hover: #1a1714;
  --bg-glass: rgba(10, 10, 15, 0.7);

  --text-primary: #fdf6ec;
  --text-secondary: #8a7d6b;
  --text-muted: #5a5045;

  --accent-red: #e63946;
  --accent-red-bright: #ff4d5a;
  --accent-red-dim: rgba(230, 57, 70, 0.15);
  --accent-red-glow: rgba(230, 57, 70, 0.3);
  --accent-cream: #fdf6ec;
  --accent-cream-dim: rgba(253, 246, 236, 0.1);

  --border-subtle: rgba(253, 246, 236, 0.06);
  --border-card: rgba(253, 246, 236, 0.08);
  --border-hover: rgba(204, 68, 68, 0.3);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-accent: 'Playfair Display', serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --nav-height: 72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent-red);
  color: var(--bg-primary);
}

/* --- Loading Screen --- */
/* --- Flash Intro --- */
.flash-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--accent-red);
  pointer-events: none;
  animation: flashSwirl 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes flashSwirl {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  40% {
    opacity: 0.8;
    transform: scale(1.1) rotate(1deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.3) rotate(3deg);
    pointer-events: none;
    visibility: hidden;
  }
}


/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Utility --- */
.italic-accent {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--accent-red-bright);
}


/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: var(--border-subtle);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav__logo-icon {
  display: none;
}

.nav__logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #1a1a1f;
  padding: 4px 8px;
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.3s;
  letter-spacing: 0.01em;
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__cta {
  font-size: 0.8125rem;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 2px 0;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .nav__links,
  .nav__cta {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }
}

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.mobile-menu--open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__link {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.mobile-menu__link:hover {
  color: var(--text-primary);
}

.mobile-menu__cta {
  margin-top: 16px;
}

.nav__toggle--active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle--active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle--active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
}

.btn--small {
  padding: 8px 18px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn--primary {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-red-dim);
}

.btn--primary:hover {
  background: var(--accent-red-bright);
  box-shadow: 0 4px 24px var(--accent-red-dim);
  transform: translateY(-1px);
}

.btn--ghost {
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--border-hover);
  background: var(--accent-red-dim);
  transform: translateY(-1px);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(253, 246, 236, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(253, 246, 236, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.hero__glow--1 {
  width: 500px;
  height: 500px;
  background: var(--accent-red);
  top: -10%;
  left: -5%;
  opacity: 0.12;
}

.hero__glow--2 {
  width: 400px;
  height: 400px;
  background: var(--accent-red-bright);
  bottom: -5%;
  right: -5%;
  opacity: 0.08;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: wordReveal 0.8s var(--ease-out) forwards;
}

.hero__word:nth-child(1) { animation-delay: 0.1s; }
.hero__word:nth-child(2) { animation-delay: 0.25s; }
.hero__word:nth-child(4) { animation-delay: 0.45s; }

@keyframes wordReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.hero__stat-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-red);
  border-radius: 50%;
  opacity: 0.7;
}

.hero__stat-sep {
  width: 1px;
  height: 14px;
  background: var(--border-subtle);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-red), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Marquee --- */
.marquee {
  padding: 20px 0;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}

.marquee--reverse .marquee__track {
  animation-direction: reverse;
}

.marquee__item {
  font-family: var(--font-heading);
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.marquee__dot {
  width: 4px;
  height: 4px;
  background: var(--accent-red);
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.5;
}

@keyframes marqueeScroll {
  to {
    transform: translateX(-50%);
  }
}

/* --- Section --- */
.section {
  padding: 120px 0;
  position: relative;
}

.section__header {
  margin-bottom: 64px;
}

.section__label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 480px;
}

/* --- Features --- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.4s var(--ease-out), border-color 0.4s, background 0.4s, box-shadow 0.4s;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, var(--accent-red-dim), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card__icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-red-dim);
  border-radius: var(--radius-sm);
  color: var(--accent-red);
  margin-bottom: 20px;
}

.feature-card__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card__desc {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 18px;
}

.feature-card__tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-card__tags span {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(253, 246, 236, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Teams --- */
.teams__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.teams__lead {
  font-size: 1.125rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.teams__body {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.teams__stat-row {
  display: flex;
  gap: 32px;
}

.teams__stat {
  text-align: left;
}

.teams__stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-red-bright), var(--accent-cream));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.teams__stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.teams__features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.teams__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: border-color 0.3s, background 0.3s;
}

.teams__feature-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.teams__feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-red-dim);
  border-radius: var(--radius-sm);
  color: var(--accent-red);
}

.teams__feature-item h4 {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.teams__feature-item p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .teams__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .teams__stat-row {
    gap: 24px;
  }
}

/* --- Download --- */
.download {
  background: var(--bg-secondary);
}

.download .section__header {
  text-align: center;
}

.download .section__subtitle {
  margin-left: auto;
  margin-right: auto;
}

.download__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.download__card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 28px 32px;
  text-align: center;
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}

.download__card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.download__card--featured {
  border-color: var(--accent-red);
  background: linear-gradient(180deg, rgba(204, 68, 68, 0.06) 0%, var(--bg-card) 100%);
}

.download__card-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--accent-red);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.download__card-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-red);
}

.download__card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.download__card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.download__card-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.download__step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.download__step span {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--accent-red-dim);
  color: var(--accent-red);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
}

.download__mac-note {
  margin-top: 14px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.download__mac-note code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.625rem;
  background: rgba(253, 246, 236, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

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

/* --- Footer --- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-subtle);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.footer__col-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer__link {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.footer__credit {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer__credit strong {
  color: var(--accent-red);
  font-weight: 600;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay for feature cards */
.feature-card.reveal[data-delay="1"] { transition-delay: 0.08s; }
.feature-card.reveal[data-delay="2"] { transition-delay: 0.16s; }
.feature-card.reveal[data-delay="3"] { transition-delay: 0.24s; }
.feature-card.reveal[data-delay="4"] { transition-delay: 0.32s; }
.feature-card.reveal[data-delay="5"] { transition-delay: 0.40s; }

.download__card.reveal[data-delay="1"] { transition-delay: 0.1s; }
.download__card.reveal[data-delay="2"] { transition-delay: 0.2s; }

/* --- Section padding mobile --- */
@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }
  .hero__content {
    padding: 60px 16px;
  }
  .hero__stats {
    gap: 12px;
  }
  .hero__stat-sep {
    display: none;
  }
}

/* --- Smooth scrollbar colors --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
