/* ========================================
   ZONA FRONTIER — Style System
   ======================================== */

/* === RESET === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === CUSTOM PROPERTIES === */
:root {
  /* Background */
  --bg-primary:     #0A0A0F;
  --bg-secondary:   #111118;
  --bg-card:        #16161F;
  --bg-card-hover:  #1C1C28;

  /* Accent */
  --accent:         #00D4FF;
  --accent-dim:     #0099CC;
  --accent-glow:    rgba(0, 212, 255, 0.15);
  --accent-gradient: linear-gradient(135deg, #00D4FF 0%, #0066FF 100%);

  /* Text */
  --text-primary:   #F0F0F5;
  --text-secondary: #A0A0B0;
  --text-tertiary:  #606070;
  --text-accent:    #00D4FF;

  /* Borders */
  --border:         #1E1E2A;
  --border-accent:  rgba(0, 212, 255, 0.2);

  /* Status */
  --status-live:    #00FF88;
  --status-soon:    #FFB800;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:    0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-glow:  0 0 30px rgba(0, 212, 255, 0.1);

  /* Fonts */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;

  /* Type Scale */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   2rem;
  --text-4xl:   2.5rem;
  --text-hero:  clamp(3.5rem, 10vw, 8rem);
}

/* === BASE === */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  display: block;
  max-width: 100%;
}

/* === LAYOUT === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === SECTION PATTERNS === */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--text-4xl);
  }
}

/* ========================================
   NAV
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all 0.4s ease;
}

.nav--scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.15em;
  transition: color 0.3s ease;
}

.nav__logo:hover {
  color: var(--accent);
}

.nav__logo-accent {
  color: var(--accent);
  font-weight: 400;
}

.nav__links {
  display: none;
  gap: 2.5rem;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.nav__links a:hover {
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }
}

.nav__lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  transition: border-color 0.3s ease;
}

.nav__lang:hover {
  border-color: var(--border-accent);
}

.nav__lang-option {
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}

.nav__lang-option.active {
  color: var(--accent);
}

.nav__lang-divider {
  color: var(--text-tertiary);
}

/* Mobile toggle */
.nav__mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .nav__mobile-toggle {
    display: none;
  }
}

/* Mobile menu */
.nav__links--mobile-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: brightness(0.5) saturate(0.6) hue-rotate(10deg);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10, 10, 15, 0.4) 0%,
      rgba(10, 10, 15, 0.1) 40%,
      rgba(10, 10, 15, 0.7) 80%,
      rgba(10, 10, 15, 1.0) 100%
    );
  z-index: 1;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 1.5rem;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2em;
  line-height: 1;
  margin-bottom: 1rem;
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.hero__sub {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--accent);
  padding: 0.85rem 2.2rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero__cta:hover {
  background: #33DDFF;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.3);
  transform: translateY(-1px);
}

.hero__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: var(--accent);
  opacity: 0.5;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { height: 20px; opacity: 0.3; }
  50% { height: 40px; opacity: 0.7; }
}

@media (min-width: 768px) {
  .hero__tagline {
    font-size: var(--text-xl);
  }
}

/* Hero entrance — pure CSS, no GSAP dependency */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroFadeScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes heroBadgeIn {
  from { opacity: 0; transform: translateY(-15px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero__badge {
  animation: heroBadgeIn 0.8s ease-out 0.3s both;
}

.hero__title {
  animation: heroFadeScale 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero__tagline {
  animation: heroFadeUp 0.8s ease-out 0.9s both;
}

.hero__sub {
  animation: heroFadeUp 0.8s ease-out 1.1s both;
}

.hero__cta {
  animation: heroFadeUp 0.6s ease-out 1.3s both;
}

.hero__scroll {
  animation: heroFadeUp 1s ease-out 1.8s both;
}

/* ========================================
   ABOUT
   ======================================== */
.about {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.about__intro {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 3.5rem;
  line-height: 1.8;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .about__grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
    row-gap: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .about__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Capability Cards */
.capability-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.capability-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.capability-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.capability-card:hover::before {
  width: 60px;
}

.capability-card__icon {
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.capability-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.capability-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   PROJECTS
   ======================================== */
.projects {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

.projects__stack {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Project Cards */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

/* ========================================
   PROJECT SHOWCASE (full-width featured)
   ======================================== */
.project-showcase {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
}

.project-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  z-index: 1;
}

.project-showcase:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow), 0 8px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

@media (min-width: 768px) {
  .project-showcase {
    grid-template-columns: 1fr 1fr;
  }

  .project-showcase:nth-child(even) {
    direction: rtl;
  }

  .project-showcase:nth-child(even) > * {
    direction: ltr;
  }
}

.project-showcase__img {
  position: relative;
  overflow: hidden;
  min-height: 250px;
}

.project-showcase__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s ease;
  filter: brightness(0.8) saturate(0.9);
}

.project-showcase:hover .project-showcase__img img {
  transform: scale(1.05);
  filter: brightness(0.9) saturate(1);
}

.project-showcase__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.3) 0%, rgba(10, 10, 15, 0) 100%);
}

.project-showcase__body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
}

@media (min-width: 768px) {
  .project-showcase__body {
    padding: 2.5rem;
  }
}

.project-showcase__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .project-showcase__title {
    font-size: var(--text-4xl);
  }
}

.project-showcase__subtitle {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-dim);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.project-showcase__desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.project-showcase__stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.project-showcase__link {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.project-showcase__link:hover {
  color: #33DDFF;
  transform: translateX(6px);
}

/* Project card image (legacy, keep for backwards compat) */
.project-card__img {
  margin: -2rem -2rem 1.5rem -2rem;
  overflow: hidden;
  border-radius: 2px 2px 0 0;
}

.project-card__img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.8);
  transition: all 0.4s ease;
}

.project-card:hover .project-card__img img {
  filter: brightness(0.85) saturate(1);
  transform: scale(1.03);
}

.project-card--featured {
  border-color: var(--border-accent);
}

.project-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
}

.project-card--upcoming {
  border-style: dashed;
}

/* Status badges */
.project-card__status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  display: inline-block;
  width: fit-content;
  margin-bottom: 1.25rem;
}

.project-card__status--live {
  color: var(--status-live);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.project-card__status--soon {
  color: var(--status-soon);
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.2);
}

.project-card__header {
  margin-bottom: 1rem;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.project-card__subtitle {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.project-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Stats */
.project-card__stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.project-card__stat {
  display: flex;
  flex-direction: column;
}

.project-card__stat-num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.project-card__stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Tags */
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.tag--muted {
  color: var(--text-tertiary);
  background: rgba(96, 96, 112, 0.1);
  border-color: rgba(96, 96, 112, 0.2);
}

/* Project link */
.project-card__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  display: inline-block;
}

.project-card__link:hover {
  color: #33DDFF;
  transform: translateX(4px);
}

/* ========================================
   CONTACT
   ======================================== */
.contact {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.contact__intro {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 3rem;
  text-align: center;
}

.contact .section-label,
.contact .section-title {
  text-align: center;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.contact__item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.contact__icon {
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.contact__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.contact__value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.15em;
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ========================================
   GRAIN OVERLAY
   ======================================== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ========================================
   MARQUEE
   ======================================== */
.marquee {
  overflow: hidden;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 60s linear infinite;
}

.marquee__content {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-25%); }
}

/* ========================================
   GLITCH EFFECT (hero title hover)
   ======================================== */

/* ========================================
   UTILITIES / ACCESSIBILITY
   ======================================== */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero__video {
    display: none;
  }

  .hero__canvas {
    display: none;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}
