@import url('/assets/fonts/fonts.css');

/* ============================================================
   FireLock  ·  sistema visual
   Tema: dark lock (una sola modalidad, definida por marca).
   Acento único: ámbar. Radio único: 6px.
   ============================================================ */

:root {
  /* superficies */
  --bg:          #0a0a0c;
  --bg-raised:   #101013;
  --bg-sunken:   #08080a;
  --line:        #1e1e23;
  --line-strong: #2c2c33;

  /* texto */
  --fg:          #f2f2f0;
  --fg-muted:    #a1a1a8;
  --fg-faint:    #6e6e77;

  /* acento */
  --accent:      #f5a524;
  --accent-dim:  #b87a15;
  --accent-wash: rgba(245, 165, 36, 0.10);

  --radius: 6px;
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.5s;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #17130a;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- tipografía ---------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.08;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(1.95rem, 3.85vw, 3rem);
  line-height: 1.06;
}
.h-section {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.1;
}
.h-card {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lede {
  font-size: clamp(1.03rem, 1.35vw, 1.18rem);
  color: var(--fg-muted);
  max-width: 46ch;
  margin: 0;
  text-wrap: pretty;
}

p { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
  font-weight: 500;
}

/* ---------- botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  padding: 0.78rem 1.35rem;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease),
              color 0.22s var(--ease), transform 0.12s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #17130a;              /* contraste 9.4:1 sobre ámbar */
  border-color: var(--accent);
}
.btn-primary:hover { background: #ffb843; border-color: #ffb843; }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--fg-faint); background: #131317; }
.btn-ghost:active { transform: translateY(1px); }

/* ---------- barra de navegación ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand svg { width: 22px; height: 22px; display: block; }
.brand-name {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.brand-name b { font-weight: 600; color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--fg-muted);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--fg); }

.nav-cta { padding: 0.58rem 1.05rem; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--fg);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle svg { width: 18px; height: 18px; }

.nav-mobile { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav .nav-cta { display: none; }
  .nav-toggle { display: block; }

  .nav-mobile {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.6rem;
    display: none;
    z-index: 49;
  }
  .nav-mobile[data-open='true'] { display: block; }
  .nav-mobile ul {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    display: grid;
    gap: 0.15rem;
  }
  .nav-mobile a {
    display: block;
    padding: 0.72rem 0;
    text-decoration: none;
    color: var(--fg);
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .nav-mobile .btn { width: 100%; margin-top: 0.4rem; }
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -30% 40% 40% -10%;
  background: radial-gradient(ellipse at 30% 40%, var(--accent-wash), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy > * + * { margin-top: 1.6rem; }
.hero-copy .lede { max-width: 42ch; }

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 79 / 99;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 45%, rgba(10, 10, 12, 0.72) 100%);
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-media { aspect-ratio: 16 / 11; order: -1; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- banda de marcos ---------- */

.frameworks {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
  padding-block: 1.6rem;
}
.frameworks-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.8rem 2.4rem;
}
.frameworks-label {
  font-size: 0.84rem;
  color: var(--fg-faint);
  margin-right: 0.4rem;
}
.frameworks ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.frameworks li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
}

/* ---------- secciones ---------- */

section { scroll-margin-top: 84px; }

.band {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}
.band-head {
  max-width: 40ch;
  margin-bottom: clamp(2.5rem, 5vw, 3.6rem);
}
.band-head .lede { margin-top: 1.1rem; }

/* ---------- servicios: bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.cell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.cell:hover { border-color: var(--line-strong); }

.cell-a { grid-column: span 4; min-height: 300px; }
.cell-b { grid-column: span 2; min-height: 300px; }
.cell-c { grid-column: span 2; min-height: 270px; }
.cell-d { grid-column: span 4; min-height: 270px; }

.cell p { color: var(--fg-muted); font-size: 0.96rem; max-width: 48ch; }

.cell-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.cell-icon svg { width: 100%; height: 100%; display: block; }

.cell-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.cell-list li {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--fg-muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.24rem 0.55rem;
}

/* celdas con fotografía */
.cell-photo { padding: 0; justify-content: flex-end; min-height: 300px; }
.cell-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.7s var(--ease), opacity 0.4s var(--ease);
}
.cell-photo:hover img { transform: scale(1.04); opacity: 0.72; }
.cell-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.25) 0%, rgba(10, 10, 12, 0.94) 78%);
}
.cell-photo .cell-body {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .cell-a, .cell-b, .cell-c, .cell-d { grid-column: 1 / -1; min-height: 0; }
  .cell-photo { min-height: 320px; }
}

/* ---------- operación: cuadrantes ---------- */

.quadrants {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.quadrant {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.8rem, 3.4vw, 2.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background-color 0.3s var(--ease);
}
.quadrant:hover { background: var(--bg-raised); }
.quadrant h3 { font-size: 1.42rem; }
.quadrant p { color: var(--fg-muted); font-size: 0.96rem; }
.quadrant-note {
  margin-top: auto;
  padding-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fg-faint);
  letter-spacing: 0.02em;
}
@media (max-width: 760px) {
  .quadrants { grid-template-columns: 1fr; }
}

/* ---------- franja fotográfica ---------- */

.statement {
  position: relative;
  padding-block: clamp(5rem, 11vw, 9rem);
  border-block: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.statement img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.statement::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(95deg, rgba(8, 8, 10, 0.96) 30%, rgba(8, 8, 10, 0.62) 100%);
}
.statement-copy { max-width: 46ch; }
.statement blockquote {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.026em;
  line-height: 1.18;
  text-wrap: balance;
}
.statement blockquote strong { color: var(--accent); font-weight: 600; }
.statement figcaption {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-faint);
  line-height: 1.6;
  max-width: 40ch;
}

/* ---------- preguntas ---------- */

.faq { display: grid; gap: 0; max-width: 62rem; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 2.6rem 1.35rem 0;
  position: relative;
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: '';
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 1.5px solid var(--fg-faint);
  border-bottom: 1.5px solid var(--fg-faint);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.3s var(--ease), border-color 0.2s var(--ease);
}
.faq details[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
  border-color: var(--accent);
}
.faq-answer {
  padding: 0 3rem 1.6rem 0;
  color: var(--fg-muted);
  max-width: 68ch;
  font-size: 0.98rem;
}

/* ---------- contacto ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2.4rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-aside > * + * { margin-top: 1.5rem; }

.contact-direct {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1.4rem 1.5rem;
}
.contact-direct span {
  display: block;
  font-size: 0.8rem;
  color: var(--fg-faint);
  margin-bottom: 0.4rem;
}
.contact-direct a {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 1px;
  word-break: break-all;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.contact-direct a:hover { color: var(--accent); border-color: var(--accent); }

form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.42rem; }
.field label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--fg);
}
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--fg);
  background: var(--bg-sunken);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.72rem 0.85rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 118px; }
.field input::placeholder,
.field textarea::placeholder { color: #7d7d86; }   /* 4.6:1 sobre --bg-sunken */
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--fg-faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-raised);
}
.field-hint { font-size: 0.8rem; color: var(--fg-muted); }
.field-error {
  font-size: 0.82rem;
  color: #ff9f7a;
  display: none;
}
.field[data-invalid='true'] input,
.field[data-invalid='true'] textarea { border-color: #d9663d; }
.field[data-invalid='true'] .field-error { display: block; }

.form-status {
  display: none;
  border: 1px solid var(--accent-dim);
  background: var(--accent-wash);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--fg);
}
.form-status[data-visible='true'] { display: block; }
.form-status a { color: var(--accent); }

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

/* ---------- pie ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  padding-block: 3rem 2.2rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand { max-width: 32ch; }
.footer-brand p {
  margin-top: 0.9rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}
.footer-cols h4 {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg-faint);
  letter-spacing: 0.02em;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-cols a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--fg-muted);
  transition: color 0.2s var(--ease);
}
.footer-cols a:hover { color: var(--fg); }
.footer-bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--fg-faint);
}

/* ---------- página legal ---------- */

.legal { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem); }
.legal-body { max-width: 68ch; }
.legal-body h2 {
  font-size: 1.32rem;
  margin-top: 2.6rem;
  margin-bottom: 0.8rem;
}
.legal-body p, .legal-body li { color: var(--fg-muted); font-size: 0.98rem; }
.legal-body p + p { margin-top: 0.9rem; }
.legal-body ul { padding-left: 1.15rem; display: grid; gap: 0.45rem; margin: 0.9rem 0 0; }
.legal-body a { color: var(--accent); }
.legal-updated {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-faint);
}

/* ---------- reveal on scroll ---------- */

/* El contenido NUNCA depende del JS para ser visible: .reveal sólo se oculta
   cuando el script confirmó que está vivo marcando <html data-js="on">.
   Si el JS falla, se bloquea o el navegador no lo soporta, la página se ve entera. */
@media (prefers-reduced-motion: no-preference) {
  html[data-js='on'] .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
  }
  html[data-js='on'] .reveal[data-shown='true'] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- utilidades de composición ---------- */

.d1 { --reveal-delay: 0.06s; }
.d2 { --reveal-delay: 0.08s; }
.d3 { --reveal-delay: 0.12s; }
.d4 { --reveal-delay: 0.18s; }

.band-tight { padding-top: 0; }
.link-accent { color: var(--accent); }
.footer-bottom-only { padding-top: 0; border: 0; }
.footer-bottom-only a { text-decoration: none; color: inherit; }
