/* Steve Tech: hoja de estilos única.
   Paleta tomada del logo: los tres peldaños (naranja a rojo, coral a violeta, violeta a cian).
   Los degradados viven solo en los cuadrados; el resto es papel y tinta. */

:root {
  --paper: #ffffff;
  --paper-2: #f5f5f7;
  --ink: #16141a;
  --ink-2: #4b4754;
  --muted: #6b6776;
  --line: #e4e2e9;
  --dot: #d3d1da;
  --line-strong: #8f8b99;
  --error: #c4271c;

  --red: #ff3131;
  --orange: #ff914d;
  --coral: #ff5757;
  --violet: #8c52ff;
  --cyan: #5ce1e6;

  --step-1: linear-gradient(90deg, var(--orange), var(--red));
  --step-2: linear-gradient(90deg, var(--coral), var(--violet));
  --step-3: linear-gradient(90deg, var(--violet), var(--cyan));

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 64px;

  color-scheme: light;
}


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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Los anclajes y el foco con teclado no quedan bajo el encabezado fijo. */
  scroll-padding-top: calc(var(--header-h) + 8px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(140 82 255 / 0.15);
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: rgb(140 82 255 / 0.2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 56px);
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.top-sentinel {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
}

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.75;
}

.brand picture {
  display: block;
}

.brand-logo {
  display: block;
  width: auto;
  height: 34px;
}

main {
  flex: 1;
}

.nav ul {
  display: flex;
  gap: clamp(22px, 3.2vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  position: relative;
  display: inline-block;
  padding-block: 8px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  background: var(--step);
  transform: scale(0);
  transition: transform 0.3s var(--ease-out);
}

.nav a:hover,
.nav a[aria-current] {
  color: var(--ink);
}

.nav a[aria-current]::before {
  transform: scale(1);
}

[data-step="1"] {
  --step: var(--step-1);
}

[data-step="2"] {
  --step: var(--step-2);
}

[data-step="3"] {
  --step: var(--step-3);
}

/* ---------- Portada ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title stairs"
    "copy  stairs";
  align-content: center;
  column-gap: clamp(32px, 5vw, 64px);
  min-height: min(calc(100dvh - var(--header-h)), 780px);
  padding-block: clamp(48px, 9vh, 96px);
}

.hero-title {
  grid-area: title;
  align-self: end;
  margin: 0;
  font-size: clamp(2.75rem, 6.6vw, 5.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-copy {
  grid-area: copy;
  max-width: 34rem;
  margin-top: clamp(24px, 3.5vw, 40px);
}

.lede {
  margin: 0 0 32px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* La escalera del logo sobre una matriz de píxeles. main.js la dibuja en el canvas;
   sin JavaScript se ven los tres cuadrados en CSS. */
.board {
  grid-area: stairs;
  align-self: end;
  position: relative;
  width: clamp(200px, 27vw, 360px);
  aspect-ratio: 1;
}

.board canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y pinch-zoom;
}

.stairs {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.js .board .stairs {
  display: none;
}

.step {
  background: var(--step);
}

.stairs .step:nth-child(1) {
  grid-area: 3 / 1;
}

.stairs .step:nth-child(2) {
  grid-area: 2 / 2;
}

.stairs .step:nth-child(3) {
  grid-area: 1 / 3;
}

@media (prefers-reduced-motion: no-preference) {
  .stairs .step {
    animation: step-in 0.8s var(--ease-out) both;
  }

  .stairs .step:nth-child(1) {
    animation-delay: 0.15s;
  }

  .stairs .step:nth-child(2) {
    animation-delay: 0.32s;
  }

  .stairs .step:nth-child(3) {
    animation-delay: 0.49s;
  }

  @keyframes step-in {
    from {
      opacity: 0;
      transform: translate(-34%, 34%);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

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

.btn-quiet:hover {
  border-color: var(--ink);
}

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

.section {
  padding-block: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--line);
}

/* Equipo y Contacto: páginas propias, la sección es la página. */
.page {
  border-top: 0;
  padding-top: clamp(48px, 7vw, 96px);
}

.page .section-title {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  letter-spacing: -0.045em;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.42em;
  margin: 0 0 12px;
  font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-title .step {
  flex: none;
  width: 0.5em;
  height: 0.5em;
}

.section-head p {
  margin: 0;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------- Portafolio ---------- */

.ventures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Una tarjeta por empresa. Toda la tarjeta es clicable, pero el nombre accesible del enlace sigue siendo el dominio. */
.venture {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.2s ease, transform 0.25s var(--ease-out);
}

.venture:has(.venture-link:hover) {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.venture-logo {
  display: grid;
  place-items: center;
  height: 112px;
  margin-bottom: 20px;
}

.venture-logo img {
  width: auto;
  max-width: 88%;
  height: var(--logo-h, 36px);
  object-fit: contain;
}

.venture-name {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.venture-desc {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.venture-link,
.venture-status {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.875rem;
}

.venture-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s ease;
}

.venture-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.venture-link:hover {
  text-decoration-color: currentColor;
}

.venture-link:focus-visible {
  outline: none;
}

.venture-link:focus-visible::after {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.venture-status {
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .venture:has(.venture-link:hover) {
    transform: none;
  }
}

/* ---------- Equipo ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(20px, 3vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* La foto siempre llena la caja 4:5, venga en la proporción que venga. */
.member-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 18px;
  background: var(--paper-2);
}

.member-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.member-name {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.member-role {
  margin: 2px 0 0;
  color: var(--muted);
}

.member-link {
  display: inline-flex;
  margin: 6px 0 0 -8px;
  padding: 8px;
  color: var(--ink);
  transition: color 0.2s ease;
}

.member-link svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.member-link:hover {
  color: #0a66c2; /* azul de LinkedIn */
}

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

.contact-form {
  display: grid;
  gap: 24px;
  max-width: 44rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.field textarea {
  min-height: 168px;
  resize: vertical;
}

.field input::placeholder {
  color: var(--muted);
}

.field input:hover,
.field textarea:hover,
.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--ink);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline-offset: 2px;
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  margin: 0;
  color: var(--error);
  font-size: 0.875rem;
}

/* Trampa para bots: fuera de la vista, del teclado y del lector de pantalla. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.6;
  transform: none;
}

.form-status {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.form-status.is-error {
  color: var(--error);
}

/* Confirmación: la muestra main.js; sin JavaScript aparece al volver a contacto.html#enviado. */
.form-done {
  display: none;
  max-width: 44rem;
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.form-done:target,
.form-done.is-visible {
  display: block;
}

.form-done h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.form-done p {
  margin: 0;
  color: var(--ink-2);
}

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

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 32px;
  padding-block: 64px 72px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 28px;
  transition: opacity 0.2s ease;
}

.footer-logo:hover {
  opacity: 0.75;
}

.footer-logo img {
  display: block;
  width: 40px;
  height: 40px;
}

.footer-name {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.footer-brand address {
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-style: normal;
}

.footer-title {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.footer-col ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.footer-col a,
.footer-col span {
  color: var(--ink-2);
}

.footer-col a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Pantallas medianas y móviles ---------- */

@media (max-width: 1180px) {
  .ventures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "stairs"
      "title"
      "copy";
    align-content: start;
    min-height: 0;
    padding-block: 40px 72px;
  }

  .hero-title {
    font-size: min(11.2vw, 3.5rem);
  }

  .board {
    width: min(56vw, 280px);
    justify-self: end;
    margin-bottom: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 56px;
  }

  .site-header .brand-logo {
    height: 28px;
  }

  .nav ul {
    gap: 22px;
  }

  .nav a {
    font-size: 0.875rem;
  }

  .ventures {
    grid-template-columns: minmax(0, 1fr);
  }

  .venture-logo {
    height: 96px;
  }

  .team {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .member {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    column-gap: 18px;
  }

  .member-photo {
    margin: 0;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-block: 48px 56px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}
