/* ==========================================================================
   BIOS Technology Solutions — styles.css
   1. Tokens  2. Base  3. Utilidades  4. Cabecera  5. Hero
   6. Paneles IA / Ciber  7. Partners  8. Contacto  9. Pie  10. Responsive
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  /* Verdes de marca (de oscuro a claro) */
  --green-950: #14200A;
  --green-900: #1E2E12;
  --green-850: #2E451D;
  --green-800: #3F5E17;
  --green-700: #44652A;
  --green-600: #5F8020;
  --green-500: #6E8F22;
  --lime-500:  #9DB61A;
  --lime-400:  #AFC500;
  --lime-300:  #C8D400;
  --lime-200:  #D3DD5C;
  --lime-100:  #DDE8A0;
  --tint:      #F5F7EC;
  --tint-2:    #EEF3DC;
  --line:      #DCE3C5;

  /* core24AI */
  --magenta:   #E6007E;
  --purple:    #9B2AA8;

  /* Texto */
  --ink:       #1B2412;
  --ink-soft:  #46503A;
  --on-dark-soft: #C9D3B6;

  /* Tipografía */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: 24px;
  --section-y: clamp(64px, 9vw, 104px);
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--green-800); text-decoration: none; }
a:hover { color: var(--green-950); }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

.icon {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--green-800); color: #fff; padding: 12px 16px;
}
.skip-link:focus { top: 16px; color: #fff; }

/* 3. Utilidades ----------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); }
.section--tint { background: var(--tint); }

.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.section-head--center { align-items: center; text-align: center; }
.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -0.025em;
}

.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.24em;
  text-transform: uppercase; color: #4F6F1D;
}
.eyebrow--light { color: var(--lime-300); }
.eyebrow--pale  { color: var(--lime-100); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 24px;
  font: 600 1rem/1.2 var(--font-body);
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--green-800); color: #fff; }
.btn--primary:hover { background: var(--green-950); color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* 4. Cabecera ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid #E6EAD8;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: 16px;
}

.brand { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.brand__mark { width: 128px; height: auto; }
.brand__tagline { font-weight: 300; font-size: 0.95rem; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav__link { color: var(--ink); font-weight: 500; }
.site-nav__link:hover { color: #4F6F1D; }
.site-nav__cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 48px; height: 48px; padding: 12px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle__bar { display: block; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* 5. Hero ----------------------------------------------------------------- */
.section--hero { padding-top: clamp(24px, 3.5vw, 44px); }

.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center;
  margin-bottom: 56px;
}
.hero__copy { display: flex; flex-direction: column; gap: 26px; }
.hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 4.3rem); line-height: 1.02; letter-spacing: -0.03em;
}
.hero__title-accent { color: #4F6F1D; }
.hero__lead { font-size: 1.15rem; line-height: 1.65; color: var(--ink-soft); max-width: 34rem; }
.hero__visual { display: flex; justify-content: center; }
.pixel-rain { display: block; width: 100%; max-width: 440px; aspect-ratio: 1; }

/* 6. Paneles IA / Ciberseguridad ----------------------------------------- */
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.panel { padding: 44px 40px; display: flex; flex-direction: column; gap: 28px; }
.panel__head { display: flex; flex-direction: column; gap: 10px; }
.panel__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.02em;
}

.panel--ia { background: var(--tint); }
.panel--ciber { background: var(--green-900); color: #fff; }

.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.service-list__item {
  display: flex; align-items: center; gap: 14px;
  padding-block: 12px; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 0.97rem; line-height: 1.3;
}

.badge {
  width: 40px; height: 40px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font: 800 0.9rem/1 var(--font-display);
}
/* Escala del folleto: oscuro → lima. Texto blanco en 1–5, oscuro en 6–10 (contraste AA) */
.badge--1  { background: #3F5E17; color: #fff; }
.badge--2  { background: #4A6B1C; color: #fff; }
.badge--3  { background: #557720; color: #fff; }
.badge--4  { background: #5F8020; color: #fff; }
.badge--5  { background: #6E8F22; color: #fff; }
.badge--6  { background: #8FA81C; color: var(--green-950); }
.badge--7  { background: #9DB61A; color: var(--green-950); }
.badge--8  { background: #AFC500; color: var(--green-950); }
.badge--9  { background: #BCCD12; color: var(--green-950); }
.badge--10 { background: #C8D400; color: var(--green-950); }

.feature-list { display: flex; flex-direction: column; gap: 22px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature__icon {
  width: 48px; height: 48px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-850); color: var(--lime-300); font-size: 1.4rem;
}
.feature__title { font: 700 1.1rem/1.3 var(--font-display); margin-bottom: 4px; }
.feature__text { font-size: 0.93rem; line-height: 1.55; color: var(--on-dark-soft); }

.certs { border-top: 1px solid #3A5226; padding-top: 14px; }
.certs__label { font-size: 0.82rem; font-weight: 600; color: var(--on-dark-soft); margin-bottom: 10px; }
.certs__list { display: flex; flex-wrap: wrap; gap: 8px; }
.cert {
  border: 1.5px solid var(--lime-300); color: #E9EFC0;
  font-weight: 600; font-size: 0.82rem; padding: 7px 12px;
}

/* 7. Partners ------------------------------------------------------------- */
.partner-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.partner {
  flex: 0 1 calc((100% - 36px) / 4); min-width: 170px;
  height: 124px; padding-inline: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 700 1.15rem/1.2 var(--font-display); color: var(--ink-soft);
}
.partner img { max-width: 100%; height: auto; opacity: .85; transition: opacity .2s; }
.partner:hover img { opacity: 1; }
.partner--badge { flex-direction: column; gap: 6px; }
.partner--badge span { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }

/* 8. Contacto ------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.contact__info {
  position: relative; background: var(--green-700); color: #fff;
  padding: 52px 44px; display: flex; flex-direction: column; gap: 14px;
}
.contact__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.02; letter-spacing: -0.03em;
}
.contact__lead { font-size: 1.05rem; line-height: 1.6; color: #E4EBD3; margin-bottom: 14px; }

.contact-list { display: flex; flex-direction: column; gap: 16px; }
.contact-list a, .contact-list span { display: flex; gap: 12px; align-items: flex-start; color: #fff; }
.contact-list .icon { color: var(--lime-300); font-size: 1.2rem; margin-top: 1px; }
.contact-list a:hover { color: var(--lime-300); }
.contact__support { color: var(--lime-300); font-weight: 600; padding-top: 10px; }
.contact__support:hover { color: var(--lime-100); }

.pixels {
  position: absolute; top: -22px; right: 44px;
  display: grid; grid-template-columns: repeat(4, 22px); gap: 6px;
}
.px { height: 22px; }
.px--2 { background: var(--green-500); }
.px--3 { background: var(--lime-400); }
.px--4 { background: var(--lime-200); }

.contact-form { background: var(--tint); padding: 52px 44px; display: flex; flex-direction: column; gap: 18px; }
.contact-form__title { font: 800 1.6rem/1.2 var(--font-display); margin-bottom: 6px; }
.contact-form__submit { align-self: flex-start; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field input:not([type="checkbox"]), .field select, .field textarea {
  font: 400 1rem/1.4 var(--font-body); color: var(--ink);
  padding: 13px 14px; min-height: 48px;
  border: 1.5px solid #C9D2B0; background: #fff; border-radius: 0;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-800); }
.field [aria-invalid="true"] { border-color: #B3261E; }

.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green-800); flex: none; }
.field--check label { font-weight: 400; font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); }
.field--check a { text-decoration: underline; }

.field__error { font-size: 0.84rem; color: #B3261E; font-weight: 500; }
.form-status { font-size: 0.95rem; font-weight: 600; color: var(--green-800); }
.form-status:empty { display: none; }

/* 9. Pie ------------------------------------------------------------------ */
.site-footer { background: var(--green-950); color: #B5C0A0; font-size: 0.82rem; line-height: 1.6; }
.site-footer__inner { padding-block: 36px; display: flex; flex-direction: column; gap: 14px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--lime-300); }
.site-footer a:hover { color: var(--lime-100); }

/* 10. Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero, .panels, .contact { grid-template-columns: 1fr; }
  .pixel-rain { max-width: 340px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid #E6EAD8;
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 14px 0; border-bottom: 1px solid #EEF1E4; }
  .site-nav__cta { margin: 16px 0 0; }
}

@media (max-width: 600px) {
  .panel, .contact__info, .contact-form { padding: 36px 22px; }
  .service-list, .form-grid { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .pixels { right: 22px; }
}

/* 11. Animación al hacer scroll -------------------------------------------
   Solo se activa si JS añade .reveal-on (sin JS o con prefers-reduced-motion
   el contenido se ve siempre). */
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease-out, transform .6s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-on .reveal.is-visible { opacity: 1; transform: none; }
