/*
 * star.css — Star Technologies Design System
 * Tokens, reset, layout base, nav, footer, animações
 * stechb.com
 */

/* ── Tokens ── */
:root {
  --black:       #000000;
  --graphite:    #0F0F0F;
  --white:       #FFFFFF;
  --gray:        #C8C8C8;
  --gray-dim:    #6a6a6a;
  --gray-line:   #1f1f1f;
  --accent:      #00C853;
  --accent-dim:  rgba(0,200,83,0.12);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --pad:    clamp(24px, 5vw, 56px);
  --radius: 2px;

  --transition-fast:   0.18s ease;
  --transition-normal: 0.28s ease;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }

body {
  background:    var(--black);
  color:         var(--white);
  font-family:   var(--font-body);
  font-weight:   300;
  min-height:    100vh;
  overflow-x:    hidden;
  position:      relative;
  display:       flex;
  flex-direction: column;
}

/* ── Grid overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.016) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.016) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 1;
}

/* ── Constellation ── */
.constellation {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.constellation span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--white);
  border-radius: 50%;
  opacity: 0.2;
}
.constellation span:nth-child(3n) { background: var(--accent); opacity: 0.35; }
.constellation span:nth-child(odd) { opacity: 0.1; }

/* ── Corner brackets ── */
.bracket {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255,255,255,0.35);
  z-index: 10;
  pointer-events: none;
}
.bracket.tl { top: 20px; left: 20px; border-right: 0; border-bottom: 0; }
.bracket.tr { top: 20px; right: 20px; border-left: 0; border-bottom: 0; }
.bracket.bl { bottom: 20px; left: 20px; border-right: 0; border-top: 0; }
.bracket.br { bottom: 20px; right: 20px; border-left: 0; border-top: 0; }

/* ── Layout ── */
.page {
  position: relative;
  z-index: 5;
  padding: 0 var(--pad);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── NAV ── */
nav.star-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-line);
  gap: 24px;
  position: sticky;
  top: 0;
  background: var(--black);
  z-index: 50;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  flex-shrink: 0;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  width: 26px;
  height: 26px;
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.nav-links a:hover { color: var(--white); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Language switcher ── */
.lang-switch {
  display: flex;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  border: 1px solid var(--gray-line);
  padding: 4px;
  border-radius: var(--radius);
}
.lang-switch a {
  display: inline-block;
  background: transparent;
  color: var(--gray-dim);
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  border-radius: 1px;
  text-decoration: none;
}
.lang-switch a:hover { color: var(--white); }
.lang-switch a.active {
  background: var(--white);
  color: var(--black);
  font-weight: 500;
}

/* ── CTA button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--gray);
  border-color: var(--gray-line);
}
.btn-ghost:hover {
  color: var(--white);
  border-color: var(--gray-dim);
}

/* ── Eyebrow ── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gray-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 20px;
}
.eyebrow .pulse {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,200,83,0.4); }
  50%       { opacity: 0.6; box-shadow: 0 0 0 7px rgba(0,200,83,0); }
}

/* ── Footer strip ── */
footer.star-footer {
  border-top: 1px solid var(--gray-line);
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--gray-dim);
  text-transform: uppercase;
  position: relative;
  z-index: 5;
}
footer.star-footer a {
  color: var(--gray-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
}
footer.star-footer a:hover { color: var(--accent); }
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ── Reveal animation ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}
[data-delay="1"] { transition-delay: 0.12s; }
[data-delay="2"] { transition-delay: 0.24s; }
[data-delay="3"] { transition-delay: 0.36s; }
[data-delay="4"] { transition-delay: 0.50s; }
[data-delay="5"] { transition-delay: 0.65s; }

/* ── Main flex grow (evita espaço vazio no mobile) ── */
.page > main {
  flex: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .bracket   { display: none; }

  /* CTA do nav some no mobile — hero tem seus próprios botões */
  .nav-cta { display: none; }

  /* Nav compacto no mobile */
  nav.star-nav { padding: 16px 0; gap: 12px; }
  .nav-right   { gap: 8px; flex-shrink: 0; }
  .logo span:last-child { font-size: 12px; letter-spacing: 0.05em; }
}
@media (max-width: 400px) {
  /* Extremamente estreito: abreviar logo text */
  .logo span:last-child { display: none; }
}
@media (max-width: 480px) {
  .footer-links { gap: 10px; flex-wrap: wrap; flex-direction: row; }
  footer.star-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Button mobile — allow wrap, nunca sair do ecrã ── */
@media (max-width: 600px) {
  .btn { white-space: normal; text-align: center; line-height: 1.4; }
  .cta-buttons { width: 100%; }
  .cta-buttons .btn { width: 100%; justify-content: center; box-sizing: border-box; }
}
