/* ============================================================
   PHX Solutions — tokens
   Paleta deliberadamente alejada del default "crema + terracota +
   itálica" (ver notas de diseño): papel frío, tinta carbón, dos
   acentos con función real — ámbar para infraestructura/soporte
   (herencia de la marca), azul-circuito para desarrollo/software.
   ============================================================ */
:root {
  --paper: #F5F6F3;
  --paper-raised: #FFFFFF;
  --ink: #15181B;
  --ink-soft: #4B5156;
  --ink-faint: #868C90;
  --line: #DCDFDB;
  --line-strong: #B8BCB7;

  --signal: #D9720E;
  --signal-ink: #8A4607;
  --signal-tint: #FBE8D4;

  --circuit: #2E5EAA;
  --circuit-ink: #1E3F75;
  --circuit-tint: #DEE7F5;

  --whatsapp: #22A559;

  /* Faint dot-grid texture — ties back to the hero's signal field so the
     page reads as one system instead of flat text-on-color blocks all the
     way down. Two variants (texture color flips for light vs dark
     sections); both are quiet enough to read as paper grain, not pattern. */
  --dot-grid-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='2' cy='2' r='1' fill='%2315181B' fill-opacity='0.055'/%3E%3C/svg%3E") repeat;
  --dot-grid-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23F5F6F3' fill-opacity='0.14'/%3E%3C/svg%3E") repeat;

  --radius-s: 4px;
  --radius-m: 10px;
  --shell-width: 1180px;

  --font-head: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
}

/* ============================================================
   Reset / base
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper) var(--dot-grid-light);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; color: var(--ink-soft); max-width: 62ch; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

svg { display: block; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 200;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.shell {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  min-height: 44px;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2e32; }
.btn-primary svg { transition: transform 180ms ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2e32; }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); }

.btn-outline-light { color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-outline-light:hover { border-color: #fff; }

.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #1c8c49; }

.btn-small { padding: 9px 18px; min-height: 38px; font-size: 0.88rem; }

/* ============================================================
   Logo
   ============================================================ */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  border-radius: 8px;
}
.logo-mark-accent { color: var(--signal); }
.logo-word { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 246, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.main-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; margin-right: 24px; }
.main-nav a { font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); transition: color 150ms ease; }
.main-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span { width: 18px; height: 1.6px; background: var(--ink); margin: 0 auto; }

.main-nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 24px 20px;
  border-bottom: 1px solid var(--line);
}
.main-nav-mobile[hidden] { display: none; }
.main-nav-mobile a { padding: 12px 0; font-weight: 500; border-bottom: 1px solid var(--line); }
.main-nav-mobile .btn { margin-top: 14px; justify-content: center; }

/* ============================================================
   Hero — full-bleed, dark, cinematic. --hero-bg is --ink pushed to its
   darkest (not a bolted-on generic "dark mode gray") so it still reads as
   the same brand, just turned all the way down.
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0A0C0E;
  color: #F5F6F3;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(10, 12, 14, 0) 0%, rgba(10, 12, 14, 0.55) 100%),
    linear-gradient(180deg, rgba(10,12,14,0.25) 0%, rgba(10,12,14,0) 30%, rgba(10,12,14,0.65) 100%);
}

.hero-inner { position: relative; z-index: 2; padding: 48px 24px; }

.hero-kicker {
  font-size: 0.92rem;
  color: rgba(245, 246, 243, 0.6);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 1.01;
  letter-spacing: -0.02em;
  max-width: 16ch;
  color: #fff;
}
.hero-lead {
  margin-top: 28px;
  font-size: 1.2rem;
  max-width: 44ch;
  color: rgba(245, 246, 243, 0.72);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.btn-signal { background: var(--signal); color: #1A0D02; }
.btn-signal:hover { background: #c6680c; }
.btn-signal svg { transition: transform 180ms ease; }
.btn-signal:hover svg { transform: translateX(3px); }

.hero-facts {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(245, 246, 243, 0.16);
}
.hero-facts dt {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}
.hero-facts dd { margin: 4px 0 0; font-size: 0.85rem; color: rgba(245, 246, 243, 0.5); }

.hero-scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(245, 246, 243, 0.35);
  border-radius: 20px;
}
.hero-scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: rgba(245, 246, 243, 0.7);
  animation: scroll-cue 1.8s ease-in-out infinite;
}
@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue span { animation: none; }
}

@media (max-width: 760px) {
  .hero-inner { padding: 40px 24px; }
  .hero-facts { flex-wrap: wrap; row-gap: 18px; }
  .hero-scroll-cue { display: none; }
}

/* ============================================================
   Clients band
   ============================================================ */
.clients-band { border-bottom: 1px solid var(--line); }
.clients-inner { padding-top: 26px; padding-bottom: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.clients-caption { font-size: 0.85rem; color: var(--ink-faint); white-space: nowrap; }
.clients-list { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.clients-list li { font-family: var(--font-head); font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); }

/* ============================================================
   Section scaffolding
   ============================================================ */
.section { padding-top: 64px; padding-bottom: 64px; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 14px; }
.section-head p { font-size: 1.02rem; }

/* ============================================================
   Service ledger (infraestructura)
   ============================================================ */
.service-ledger { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.service-row--featured {
  background: var(--ink);
  border-radius: var(--radius-m);
  border-bottom: none;
  padding: 32px 28px;
  margin: 24px 0;
  color: #fff;
}
.service-row--featured h3 { color: #fff; }
.service-row--featured p { color: rgba(255,255,255,0.72); max-width: 56ch; }
.service-row--featured .service-tag { background: var(--signal); color: #1a0d02; }

.service-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.74rem;
  border-radius: 5px;
  align-self: start;
}
.tag-inf { background: var(--signal-tint); color: var(--signal-ink); }
.tag-dev { background: var(--circuit-tint); color: var(--circuit-ink); }

.service-row-body h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 8px; }
.service-row-body p { font-size: 0.97rem; }

.service-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 32px;
  margin-top: 20px;
  max-width: 520px;
}
.service-features li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  padding-left: 16px;
  position: relative;
}
.service-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 1.5px;
  background: var(--signal);
}

@media (max-width: 640px) {
  .service-row { grid-template-columns: 1fr; gap: 10px; }
  .service-features { grid-template-columns: 1fr; }
}

/* ============================================================
   Dark alternating sections (Desarrollo, Casos) — real visual weight
   instead of another near-white band. Same --ink as the footer/final-cta
   dark blocks (one dark tone site-wide, not a bolted-on second dark),
   plus a faint dot-grid texture tying back to the hero's signal field so
   the page doesn't read as flat text-on-color the whole way down.
   ============================================================ */
.section-dark-alt {
  position: relative;
  background: var(--ink) var(--dot-grid-dark);
  color: #fff;
  padding: 72px 0;
  overflow: hidden;
}
.section-head--light h2 { color: #fff; }
.section-head--light p { color: rgba(245, 246, 243, 0.62); }

.dev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; position: relative; z-index: 1; }
.dev-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-top: 3px solid var(--circuit);
  border-radius: var(--radius-s);
  padding: 26px 24px;
  background: rgba(255,255,255,0.04);
}
.dev-card h3 { font-size: 1.05rem; font-weight: 600; margin: 16px 0 10px; color: #fff; }
.dev-card p { font-size: 0.93rem; color: rgba(245,246,243,0.65); }
.dev-card .service-tag { margin-bottom: 4px; }

@media (max-width: 880px) {
  .dev-grid { grid-template-columns: 1fr; }
}

.dev-explainer {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding: 26px 28px;
  border-left: 3px solid var(--circuit);
  background: rgba(255,255,255,0.04);
}
.dev-explainer h3 { font-size: 1rem; font-weight: 600; margin-bottom: 10px; color: #fff; }
.dev-explainer p { font-size: 0.95rem; max-width: 68ch; color: rgba(245,246,243,0.65); }

/* ============================================================
   Casos de confianza — one big pull-quote (the proof moment gets to be
   large and confident instead of squeezed into a 3rd grid column), then
   two evenly matched case cards. Two columns of comparable content beat
   three mismatched ones — the old 3-up grid always left the short cards
   stranded with empty space below them.
   ============================================================ */
.pull-quote {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 0 48px;
  color: var(--signal);
}
.pull-quote-mark { color: var(--signal); opacity: 0.85; margin-bottom: 18px; }
.pull-quote p {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.35;
  color: #fff;
  max-width: 28ch;
}
.pull-quote footer { margin-top: 22px; display: flex; align-items: baseline; gap: 10px; }
.pull-quote footer strong { font-family: var(--font-head); font-size: 0.95rem; color: #fff; }
.pull-quote footer span { font-size: 0.85rem; color: rgba(245,246,243,0.55); }

.cases-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.case-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-s);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.045);
}
.case-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--signal-tint);
  color: var(--signal-ink);
  margin-bottom: 18px;
}
.case-icon--dev { background: var(--circuit-tint); color: var(--circuit-ink); }

.case-card h3 { font-size: 1.1rem; margin-bottom: 4px; color: #fff; }
.case-sub { font-size: 0.82rem; color: rgba(245,246,243,0.5); margin-bottom: 14px; }
.case-card p { font-size: 0.93rem; color: rgba(245,246,243,0.72); }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.case-tags li { font-size: 0.78rem; font-weight: 500; padding: 5px 10px; border-radius: 5px; background: rgba(217,114,14,0.18); color: #F0A862; }

.case-card--sigdif { border-top: 3px solid var(--circuit); }
.case-note { margin-top: 14px; font-size: 0.85rem; color: #8FB3E8; }

.sigdif-mock {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-s);
  padding: 14px;
  margin: 14px 0 4px;
}
.sigdif-mock-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  color: rgba(245,246,243,0.75);
  padding: 5px 0;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-orange { background: var(--signal); }
.dot-yellow { background: #E3B341; }
.dot-green { background: #3FA86B; }
.dot-red { background: #D14F4F; }

@media (max-width: 760px) {
  .cases-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Proceso
   ============================================================ */
.process-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  position: relative;
}
.process-path::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--line-strong);
}
.process-path li { position: relative; padding-right: 20px; padding-top: 50px; }
.process-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1.5px solid var(--circuit);
  color: var(--circuit-ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50%;
  z-index: 1;
}
.process-path h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.process-path p { font-size: 0.9rem; }

@media (max-width: 760px) {
  .process-path { grid-template-columns: 1fr; gap: 28px; }
  .process-path::before { top: 0; bottom: 0; left: 17px; right: auto; width: 1.5px; height: auto; }
  .process-path li { padding-left: 54px; padding-top: 4px; padding-right: 0; }
  .process-step { top: -4px; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-layout { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.faq-intro h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 14px; }
.faq-intro p { margin-bottom: 22px; font-size: 0.98rem; }

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink-faint);
  flex-shrink: 0;
  transition: transform 180ms ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: 14px; font-size: 0.93rem; max-width: 60ch; }

@media (max-width: 880px) {
  .faq-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   CTA final
   ============================================================ */
.final-cta { background: var(--ink); color: #fff; padding: 64px 0; }
.final-cta-inner { text-align: center; max-width: 640px; }
.final-cta h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 auto 14px; }
.final-cta p { color: rgba(255,255,255,0.7); margin: 0 auto 32px; }
.final-cta .hero-actions { justify-content: center; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--paper-raised); border-top: 1px solid var(--line); padding-top: 64px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 48px;
}
.footer-brand p { margin-top: 16px; font-size: 0.88rem; max-width: 32ch; }
.footer-col h3 { font-family: var(--font-head); font-size: 0.82rem; font-weight: 600; color: var(--ink-faint); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col li, .footer-col a { font-size: 0.9rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--ink-faint); margin: 0; }
.footer-fineprint { max-width: 46ch; text-align: right; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-fineprint { text-align: left; }
}

/* ============================================================
   WhatsApp FAB
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  z-index: 90;
  transition: transform 180ms ease;
}
.whatsapp-fab:hover { transform: scale(1.06); }

/* ============================================================
   Mobile nav breakpoint
   ============================================================ */
@media (max-width: 760px) {
  .main-nav { display: none; }
  .header-inner .btn-small { display: none; }
  .nav-toggle { display: flex; }
}
