/* =========================================
   NOMAD BYTE STUDIOS — Global Styles
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&family=DM+Mono:wght@400;500&display=swap');

/* ---- Variables ---- */
:root {
  --black:     #0a0a0a;
  --off-white: #f0ede6;
  --accent:    #c8ff00;
  --gray:      #888888;
  --border:    rgba(240, 237, 230, 0.12);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --nav-height: 89px;   /* desktop */
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* ---- Noise overlay ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  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");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9000;
}

/* ---- Navigation ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(18px);
  min-height: var(--nav-height);
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.12em;
  color: var(--off-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 38px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--gray);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color 0.25s;
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* Nav CTA */
.nav-links a.nav-cta {
  color: var(--accent);
  border: 1px solid rgba(200, 255, 0, 0.35);
  padding: 7px 14px;
  padding-bottom: 7px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a.nav-cta::after { display: none; }

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

/* Nav estimator pill */
.nav-links a.nav-estimator {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
}

.nav-links a.nav-estimator::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease infinite;
  flex-shrink: 0;
}

.nav-links a.nav-estimator::after { display: none; }
.nav-links a.nav-estimator:hover { opacity: 0.7; }

.nav-links a:not(.nav-cta):not(.nav-estimator):hover  { color: var(--off-white); }
.nav-links a:not(.nav-cta):not(.nav-estimator).active { color: var(--off-white); }
.nav-links a:not(.nav-cta):not(.nav-estimator):hover::after,
.nav-links a:not(.nav-cta):not(.nav-estimator).active::after { width: 100%; }

/* ---- Page wrapper ---- */
.page {
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + 40px);
}

/* ---- Section header ---- */
.section-header { margin-bottom: 72px; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 6vw, 92px);
  line-height: 1;
  letter-spacing: 0.02em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
}

footer p {
  font-size: 12px;
  color: var(--gray);
  font-family: var(--font-mono);
  line-height: 1.4;
}

.footer-mark {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.18em;
  color: rgba(240, 237, 230, 0.2);
  white-space: nowrap;
}

@media (max-width: 600px) {
  footer p { font-size: 11px; }
  .footer-mark { font-size: 13px; }
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.anim-fade-up  { animation: fadeUp  0.85s ease both; }
.anim-fade-in  { animation: fadeIn  0.6s  ease both; }
.anim-delay-1  { animation-delay: 0.1s; }
.anim-delay-2  { animation-delay: 0.2s; }
.anim-delay-3  { animation-delay: 0.35s; }
.anim-delay-4  { animation-delay: 0.5s; }

/* ---- Shared CTA button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 30px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--off-white);
}

.btn svg { width: 15px; }

/* ---- Hamburger Menu ---- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 600;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--off-white);
  margin: 6px 0;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -5px); }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  nav { padding: 20px 32px; }
  .nav-links { gap: 24px; }
}

@media (max-width: 860px) {
  /* Redefine la variable para que todos los calc() que la usen
     se actualicen automáticamente en este breakpoint */
  :root { --nav-height: 64px; }

  nav {
    padding: 14px 24px;
    flex-wrap: wrap;
    min-height: auto;
    gap: 0;
  }

  .nav-logo {
    flex: 1;
    min-width: 0;
  }

  .lang-switcher {
    order: 2;
    margin-right: 12px;
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    order: 4;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    align-items: flex-start;
  }

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

  .nav-links li { width: 100%; }

  .nav-links a {
    font-size: 11px;
    padding: 12px 0;
    display: block;
    border-bottom: 1px solid var(--border);
    color: var(--gray);
  }

  .nav-links li:last-child a { border-bottom: none; }

  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--accent); }

  .nav-links a.nav-cta {
    margin-top: 8px;
    padding: 10px 14px;
    display: inline-block;
    width: auto;
    border: 1px solid rgba(200, 255, 0, 0.35);
  }

  .nav-links a.nav-estimator { font-size: 10px; }

  footer {
    padding: 24px 20px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Usa la variable actualizada: 64 + 40 = 104px */
  .page { padding-top: calc(var(--nav-height) + 40px); }
}

@media (max-width: 600px) {
  /* Nav aún más compacto */
  :root { --nav-height: 54px; }

  nav { padding: 10px 16px; }

  .nav-logo-text { font-size: 16px; letter-spacing: 0.08em; }
  .nav-logo img { width: 28px; height: 28px; }

  .section-title { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; }

  .btn { padding: 11px 22px; font-size: 10px; gap: 8px; }
  .btn svg { width: 12px; }

  /* Usa la variable actualizada: 54 + 40 = 94px */
  .page { padding-top: calc(var(--nav-height) + 40px); }
}

@media (max-width: 400px) {
  nav { padding: 10px 12px; }
  .nav-logo-text { font-size: 14px; letter-spacing: 0.05em; }
}
