/* ==========================================================================
   Prorytech — Opción 1b "Marino"
   Fondo azul marino, retícula técnica, IBM Plex Sans + IBM Plex Mono.
   ========================================================================== */

:root {
  --navy: #0D2240;
  --navy-deep: #091A33;
  --navy-card: #132C4F;
  --lime: #A3CF44;
  --white: #FFFFFF;
  --mist: #AFC0D6;      /* texto secundario */
  --steel: #8FA3BF;     /* texto terciario / mono */
  --label: #C7D3E2;
  --line: rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.2);
  --grid: rgba(255,255,255,.055);

  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1280px;
  --gutter: clamp(20px, 6vw, 80px);
  --radius: 4px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; }
::selection { background: var(--lime); color: var(--navy); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); letter-spacing: .06em; }
.muted { color: var(--mist); }
.accent { color: var(--lime); }
.fine { font-size: 12px; color: var(--steel); letter-spacing: .04em; }
.eyebrow { font-size: 13px; color: var(--lime); text-transform: lowercase; }
.section-head .eyebrow, .about .eyebrow, .faq .eyebrow, .contact .eyebrow, .process .eyebrow { text-transform: none; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--lime); color: var(--navy); padding: 10px 14px; border-radius: var(--radius); font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 12px; }

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

/* --------------------------------------------------------------------------
   Tipografía de sección
   -------------------------------------------------------------------------- */
h1 {
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: pretty;
}
h2 {
  font-weight: 600;
  font-size: clamp(30px, 3.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: pretty;
}
h2.xl { font-size: clamp(34px, 3.8vw, 48px); line-height: 1.06; letter-spacing: -.025em; }
.lead { font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6; color: var(--mist); max-width: 520px; text-wrap: pretty; }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--lime); color: var(--navy); }
.btn-accent:hover { background: var(--white); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: var(--white); font-weight: 500; }
.btn-ghost:hover { border-color: var(--white); }
.btn-outline-accent {
  border-color: var(--lime); color: var(--lime);
  padding: 11px 20px; font-family: var(--mono); font-size: 13px; font-weight: 400;
  letter-spacing: .06em; text-transform: uppercase;
}
.btn-outline-accent:hover { background: var(--lime); color: var(--navy); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; isolation: isolate;
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  /* El desenfoque va en un pseudo-elemento: un backdrop-filter en la cabecera
     haría que el menú móvil (position: fixed) se posicionara respecto a ella. */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--navy) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header-h);
}
.brand img { height: 38px; width: auto; }
.nav { display: flex; gap: 32px; }
.nav a {
  font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mist); padding: 6px 0; position: relative;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--lime);
  transition: right .25s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--lime); }
.nav a:hover::after, .nav a.active::after { right: 0; }
.nav .nav-contact { display: none; }
.header-actions { display: flex; align-items: center; gap: 18px; }

.lang-switch {
  display: inline-flex; border: 1.5px solid var(--lime); border-radius: var(--radius); overflow: hidden;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1;
}
.lang-switch button {
  padding: 7px 10px; color: var(--lime); transition: background .2s, color .2s;
}
.lang-switch button:hover { background: rgba(163,207,68,.15); }
.lang-switch button[aria-pressed="true"] { background: var(--lime); color: var(--navy); }

.menu-toggle {
  display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.menu-toggle span { display: block; width: 20px; height: 1.5px; background: var(--white); transition: transform .25s var(--ease), opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  padding-top: clamp(56px, 7vw, 96px);
}
.hero::before {
  /* viñeta suave para que la retícula no compita con el texto */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 500px at 20% 30%, rgba(13,34,64,.0), rgba(13,34,64,.55) 70%);
}
.hero > .wrap { position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center;
  padding-bottom: clamp(48px, 5vw, 72px);
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-photo { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.hero-photo .frame {
  position: relative; border: 1px solid var(--line-strong); padding: 10px; background: var(--navy);
}
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-photo .corner {
  position: absolute; width: 14px; height: 14px; border-color: var(--lime); border-style: solid; border-width: 0;
}
.corner.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.hero-photo figcaption {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; letter-spacing: .04em; color: var(--mist);
}

.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts li {
  padding: 22px 24px 22px 0; font-size: 15px; color: var(--mist);
  display: flex; gap: 12px; align-items: center;
}
.facts li::before { content: "—"; color: var(--lime); font-family: var(--mono); }

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(64px, 7.5vw, 96px); scroll-margin-top: var(--header-h); }
.band { background: var(--navy-deep); }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 40px;
}
.section-head > div:not(.eyebrow) { display: flex; flex-direction: column; gap: 16px; }
.section-head p { max-width: 420px; font-size: 16px; }
.section-head.stack { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 48px; }
.section-head.stack h2 { max-width: 760px; }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  background: var(--navy-card); border: 1px solid rgba(255,255,255,.1); border-radius: 6px;
  padding: 32px; display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.card::after {
  /* brillo técnico en la esquina al pasar el ratón */
  content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(163,207,68,.18), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: var(--lime); transform: translateY(-2px); }
.card:hover::after { opacity: 1; }
.card .num { font-size: 13px; color: var(--lime); }
.card-title { font-weight: 600; font-size: 22px; line-height: 1.2; }
.card-title.lg { font-size: 26px; }
.card p { font-size: 15px; flex: 1; }
.card .tags { font-size: 12px; letter-spacing: .04em; color: var(--steel); text-transform: uppercase; }
.span-2 { grid-column: span 2; min-height: 260px; }
.span-2 p { max-width: 440px; }
.span-3 { grid-column: span 3; }
.card-accent {
  background: var(--lime); color: var(--navy); border-color: var(--lime);
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end;
}
.card-accent::after { background: radial-gradient(circle, rgba(13,34,64,.18), transparent 70%); }
.card-accent:hover { border-color: var(--navy); }
.card-accent > div:first-child { display: flex; flex-direction: column; gap: 14px; }
.card-accent .num, .card-accent .tags { color: var(--navy); }
.card-accent .tags.right { text-align: right; line-height: 2; }

/* Nosotros */
.about { padding-top: 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.about-grid > div:first-child { display: flex; flex-direction: column; gap: 18px; }
.about-text { font-size: 17px; line-height: 1.65; text-wrap: pretty; }
.mv { border-top: 1px solid var(--line); }
.mv-row {
  padding: 30px 0; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 120px 1fr; gap: 24px;
}
.mv dt { font-size: 13px; color: var(--lime); padding-top: 4px; }
.mv dd { font-size: 19px; line-height: 1.5; text-wrap: pretty; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.step {
  border-top: 1px solid var(--line-strong); padding-top: 24px; position: relative;
  display: flex; flex-direction: column; gap: 14px;
}
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 1px; background: var(--lime);
  transition: width .4s var(--ease);
}
.step:hover::before { width: 100%; }
.step .n { font-family: var(--mono); font-size: 40px; color: var(--lime); line-height: 1; }
.step h3 { font-weight: 600; font-size: 21px; line-height: 1.2; }
.step p { font-size: 15px; color: var(--mist); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
.faq-grid > div:first-child { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 24px); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; text-align: left; font-weight: 500; font-size: 19px; line-height: 1.3;
  transition: color .2s;
}
.faq-q:hover { color: var(--lime); }
.faq-q .sym {
  font-family: var(--mono); font-size: 20px; color: var(--lime); flex: none; width: 20px; text-align: center;
  transition: transform .3s var(--ease);
}
.faq-item[data-open="true"] .faq-q .sym { transform: rotate(45deg); }
.faq-a {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease);
}
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 48px 24px 0; font-size: 16px; line-height: 1.65; color: var(--mist); }
.faq-item[data-open="true"] .faq-a { grid-template-rows: 1fr; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-grid > div:first-child { display: flex; flex-direction: column; gap: 22px; }
.contact-grid > div:first-child > .muted { font-size: 17px; max-width: 440px; }
.contact-info { display: grid; gap: 18px; margin-top: 24px; font-size: 14px; line-height: 1.7; }
.contact-info > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.contact-info dt { color: var(--steel); }
.contact-info dd a { border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.contact-info dd a:hover { color: var(--lime); border-color: var(--lime); }

.form { display: flex; flex-direction: column; gap: 26px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field > span { font-size: 12px; text-transform: uppercase; color: var(--label); }
.field input, .field textarea {
  width: 100%; background: var(--navy-card); border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius);
  padding: 14px 16px; font-family: var(--sans); font-size: 16px; color: var(--white); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--mist); opacity: .55; }
.field input:focus, .field textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(163,207,68,.15); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #F08A7A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 6px; flex-wrap: wrap; }
.form-foot .btn { padding-inline: 30px; }
.form-foot .btn[disabled] { opacity: .6; cursor: progress; }
.form-status { font-size: 13px; letter-spacing: .02em; min-height: 1.4em; color: var(--mist); }
.form-status.ok { color: var(--lime); }
.form-status.err { color: #F08A7A; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-block: 32px; flex-wrap: wrap; }
.footer-inner .brand img { height: 28px; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; font-size: 12px; color: var(--mist); }
.footer-nav a { text-transform: uppercase; transition: color .2s; }
.footer-nav a:hover { color: var(--lime); }

/* --------------------------------------------------------------------------
   Animaciones de entrada
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .faq-a, .card, .step::before, .btn { transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav { gap: 22px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; min-height: 0; }
  .span-3 { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .about-grid, .faq-grid, .contact-grid { gap: 48px; }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .brand img { height: 32px; }
  .header-actions .btn-outline-accent { display: none; }
  .menu-toggle { display: flex; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 40;
    flex-direction: column; gap: 0; padding: 12px var(--gutter) 40px;
    background: var(--navy-deep);
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 64px 64px;
    border-top: 1px solid var(--line);
    transform: translateX(100%); transition: transform .3s var(--ease);
    overflow-y: auto;
  }
  .nav.open { transform: none; }
  .nav a { font-size: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .nav-contact { display: block; color: var(--lime); }
  body.menu-open { overflow: hidden; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 560px; }
  .facts { grid-template-columns: 1fr; }
  .facts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .facts li:last-child { border-bottom: 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .about-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .faq-grid > div:first-child { position: static; }
  .card-accent { grid-template-columns: 1fr; }
  .card-accent .tags.right { text-align: left; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .card { padding: 26px; }
  .mv-row { grid-template-columns: 1fr; gap: 10px; }
  .row-2 { grid-template-columns: 1fr; }
  .contact-info > div { grid-template-columns: 90px 1fr; }
  .faq-a p { padding-right: 0; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .lang-switch button { padding: 8px 11px; }
}

/* Enlace de correo dentro del estado del formulario */
.form-status a { color: var(--lime); border-bottom: 1px solid currentColor; }
