/* ==========================================================================
   Orion Street — hoja de estilos
   Paleta: cielo nocturno de Tenerife. Betelgeuse (naranja) y Rigel (azul),
   las dos estrellas más brillantes de Orión, actúan como acentos.
   ========================================================================== */

:root {
  --fondo:      #140b21; /* morado-noche derivado del logo */
  --superficie: #1e1230;
  --borde:      #37254f;
  --texto:      #f2eef7;
  --texto-suave:#b3a8c6;
  --amarillo:   #f5ce4e; /* colores del logotipo */
  --naranja:    #f0914a;
  --magenta:    #d31a66;
  --morado:     #6e3390;
  --azul:       #45a8dc;
  --degradado:  linear-gradient(100deg, var(--amarillo), var(--naranja) 35%, var(--magenta) 75%);
  --radio: 10px;
  --ancho: 1080px;
  --f-display: 'Poppins', system-ui, sans-serif;
  --f-body: 'Poppins', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--ancho); margin: 0 auto; padding: 0 1.25rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- Tipografía ---------- */

h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0 0 .6em; }

h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }

.accent {
  background: var(--degradado);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--naranja); margin: 0 0 1rem;
}

.lead { font-size: 1.2rem; color: var(--texto-suave); max-width: 34em; }

a { color: var(--azul); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; border-radius: 3px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  background: linear-gradient(100deg, var(--naranja), var(--magenta));
  color: #fff;
  font-weight: 600;
  padding: .8rem 1.7rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--f-body);
  font-size: 1rem;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover, .btn:focus-visible { text-decoration: none; transform: translateY(-2px); filter: brightness(1.12); }

.btn-ghost { background: transparent; color: var(--texto); border-color: var(--borde); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--superficie); }

.btn-big { padding: 1rem 2.4rem; font-size: 1.1rem; }
.btn-small { padding: .45rem 1.1rem; font-size: .92rem; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 28, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}

.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }

.brand { display: flex; align-items: center; gap: .6rem; color: var(--texto); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.brand-name em { font-style: normal; color: var(--azul); }

.menu { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--texto-suave); font-weight: 500; }
.menu a[aria-current="page"], .menu a:hover { color: var(--texto); text-decoration: none; }
.menu .btn { color: #fff; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 12vw, 9rem) 0;
  border-bottom: 1px solid var(--borde);
}

.hero-inner { position: relative; z-index: 1; }

.constellation {
  position: absolute;
  right: -4%; top: 50%;
  transform: translateY(-50%);
  height: 115%;
  color: var(--texto-suave);
  opacity: .9;
  pointer-events: none;
}

.c-lines path { opacity: .3; }

.star { fill: var(--texto); }
.star.betelgeuse { fill: var(--naranja); }
.star.rigel { fill: var(--azul); }

@media (prefers-reduced-motion: no-preference) {
  .star { animation: parpadeo 3.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
  .star:nth-child(2n) { animation-delay: 1.1s; }
  .star:nth-child(3n) { animation-delay: 2.2s; }
  @keyframes parpadeo {
    0%, 100% { opacity: 1; }
    50%      { opacity: .45; }
  }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

/* ---------- Secciones ---------- */

.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--superficie); border-block: 1px solid var(--borde); }
.section-sub { color: var(--texto-suave); margin-top: -.4rem; margin-bottom: 2.2rem; }

.page-head { padding-bottom: 0; }

/* ---------- Rejillas y tarjetas ---------- */

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

.card {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.6rem;
}
.card p { color: var(--texto-suave); margin-bottom: 0; }

.section-alt .card { background: var(--fondo); }

/* ---------- Proceso ---------- */

.paso h3 { color: var(--azul); text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; }
.paso p { color: var(--texto-suave); }

/* ---------- Servicios ---------- */

.servicios { display: grid; gap: 1.4rem; grid-template-columns: repeat(2, 1fr); }
.servicio {
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.8rem;
  background: linear-gradient(160deg, var(--superficie), var(--fondo));
}
.servicio:first-child { grid-column: 1 / -1; }
.servicio h3 { font-size: 1.3rem; }
.servicio p { color: var(--texto-suave); margin-bottom: 0; }

/* ---------- Sobre / testimonios ---------- */

.sobre-texto { margin: 0; max-width: 44em; }
.sobre-texto p { font-size: 1.25rem; line-height: 1.6; }

.testimonio {
  margin: 0;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-left: 3px solid var(--magenta);
  border-radius: var(--radio);
  padding: 1.6rem;
}
.testimonio p { color: var(--texto-suave); margin-top: 0; }

cite { display: block; margin-top: 1rem; font-style: normal; font-weight: 600; color: var(--texto); }

/* ---------- Proyectos ---------- */

.proyectos {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .5rem 1.4rem;
  grid-template-columns: repeat(3, 1fr);
}
.proyectos a { color: var(--texto-suave); }
.proyectos a:hover { color: var(--azul); }
.proyectos-mas { color: var(--texto-suave); margin-top: 2rem; max-width: 50em; }

/* ---------- CTA ---------- */

.cta { text-align: center; }

/* ---------- Contacto ---------- */

.contacto-grid { display: grid; gap: 3rem; grid-template-columns: 1fr 1.4fr; align-items: start; }

.campo { margin-bottom: 1.2rem; }
.campo label { display: block; font-weight: 500; margin-bottom: .35rem; }

.campo input[type="text"],
.campo input[type="email"],
.campo input[type="tel"],
.campo textarea {
  width: 100%;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  color: var(--texto);
  font: inherit;
  padding: .75rem .9rem;
}
.campo input:focus, .campo textarea:focus { outline: 2px solid var(--azul); outline-offset: 1px; }

.campo-check label { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; color: var(--texto-suave); }
.campo-check input { margin-top: .3rem; }

.campo-error input, .campo-error textarea { border-color: var(--naranja); }
.campo-msg { color: var(--naranja); font-size: .9rem; margin: .35rem 0 0; }

.alerta { border-radius: var(--radio); padding: 1.5rem; margin-bottom: 1.4rem; }
.alerta-ok { background: rgba(143, 184, 255, .08); border: 1px solid var(--azul); }
.alerta-ok h2 { margin-top: 0; }
.alerta-error { background: rgba(224, 128, 92, .1); border: 1px solid var(--naranja); }

/* Honeypot: fuera de pantalla, no display:none para engañar mejor a los bots */
.hp { position: absolute; left: -9999px; top: -9999px; }

/* ---------- Prosa (páginas legales) ---------- */

.prosa { max-width: 46em; }
.prosa h2 { font-size: 1.3rem; margin-top: 2rem; }
.prosa p { color: var(--texto-suave); }

/* ---------- Pie ---------- */

.site-footer { border-top: 1px solid var(--borde); background: var(--superficie); margin-top: 2rem; }

.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 2fr 1fr;
  padding-top: 3rem; padding-bottom: 2rem;
}

.footer-brand { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; margin: 0 0 .3rem; }
.footer-brand em { font-style: normal; color: var(--azul); }
.footer-tag { color: var(--texto-suave); margin-top: 0; }

.footer-heading { font-weight: 600; margin: 0 0 .6rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.footer-col a { color: var(--texto-suave); }
.footer-col a:hover { color: var(--azul); }

.footer-bottom { padding-bottom: 1.6rem; color: var(--texto-suave); font-size: .9rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-3, .servicios, .proyectos { grid-template-columns: repeat(2, 1fr); }
  .contacto-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .constellation { opacity: .35; right: -20%; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .servicios, .proyectos { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--borde); border-radius: 8px;
    cursor: pointer; position: relative;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; display: block; position: absolute;
    width: 18px; height: 2px; background: var(--texto); border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bar::before { transform: translateY(-6px); }
  .nav-toggle-bar::after  { transform: translateY(6px); }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: rotate(-45deg); }

  .menu {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start;
    background: var(--fondo);
    border-bottom: 1px solid var(--borde);
    padding: 1rem 1.25rem 1.4rem;
    gap: 1rem;
  }
  .menu.abierto { display: flex; }
  .site-nav { position: static; }
  .site-header { position: sticky; }
  .nav-wrap { position: relative; }
}

/* ---------- Tablas en páginas legales ---------- */

.prosa table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: .95rem;
}
.prosa th, .prosa td {
  border: 1px solid var(--borde);
  padding: .55rem .8rem;
  text-align: left;
  vertical-align: top;
}
.prosa th { background: var(--superficie); color: var(--texto); }
.prosa td { color: var(--texto-suave); }
.prosa h3 { font-size: 1.1rem; margin-top: 1.6rem; }
.prosa ul { color: var(--texto-suave); }
