/* Secciones de la home */

.section {
  padding-block: var(--s-48);
}

.section-alt {
  border-block: 1px solid var(--border-subtle);
  background: var(--bg-surface-1);
}

.split {
  display: grid;
  gap: var(--s-48);
  align-items: start;
}

.section-head > p {
  max-width: 560px;
  margin-top: var(--s-16);
  color: var(--text-secondary);
  font-size: var(--t-lead);
}

.section-head > p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.section-head-wide {
  margin-bottom: var(--s-40);
}

.section-head-wide h2 {
  max-width: 22ch;
}

@media (min-width: 900px) {
  .section {
    padding-block: var(--s-64);
  }

  .split {
    grid-template-columns: 5fr 6fr;
    gap: var(--s-64);
  }

  .section-head-wide {
    margin-bottom: var(--s-48);
  }
}

/* HERO */
.hero {
  padding-top: calc(var(--header-h) + var(--s-48));
  padding-bottom: var(--s-48);
}

.hero-grid {
  display: grid;
  gap: var(--s-48);
  align-items: center;
}

.hero .pill-brand {
  margin-bottom: var(--s-24);
  max-width: 100%;
  text-align: left;
}

.hero-sub {
  max-width: 520px;
  margin-top: var(--s-24);
  color: var(--text-secondary);
  font-size: var(--t-lead);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-8) var(--s-24);
  margin-top: var(--s-32);
}

.response-promise {
  margin-top: var(--s-24);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.6;
}

.response-promise strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Hardware con resplandor ambiental */
.hero-visual {
  position: relative;
  isolation: isolate;
}

.hero-visual::before,
.gallery::before {
  content: "";
  position: absolute;
  inset: -64px 0 -32px;
  z-index: -1;
  background: radial-gradient(closest-side at 50% 40%, rgba(255, 107, 0, 0.12), transparent);
  pointer-events: none;
}

.device-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-bezel);
}

.device-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.device-screen img.is-active {
  opacity: 1;
}

.device-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8) var(--s-24);
  margin-top: var(--s-12);
}

.device-tabs {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-1);
}

.device-tab {
  min-height: 40px;
  padding: var(--s-4) var(--s-16);
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  font-size: var(--t-ui);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--fast) ease-out, background-color var(--fast) ease-out;
}

.device-tab:hover {
  color: var(--text-primary);
}

.device-tab[aria-pressed="true"] {
  background: var(--bg-surface-3);
  color: var(--text-primary);
}

.device-status {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-20);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.5;
}

.device-status li {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.dot-green {
  background: var(--status-success);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: var(--s-48);
  border-top: 1px solid var(--border-subtle);
}

.stat {
  padding: var(--s-20) var(--s-16) var(--s-20) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.stat dd {
  display: grid;
  gap: var(--s-4);
}

.stat strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (min-width: 900px) {
  .hero {
    padding-top: calc(var(--header-h) + var(--s-80));
  }

  .hero-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: var(--s-64);
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--border-subtle);
  }

  .stat {
    padding-left: var(--s-24);
    border-bottom: 0;
    border-left: 1px solid var(--border-subtle);
  }

  .stat:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

/* SERVICIOS · bento asimétrico */
.services {
  display: grid;
  gap: var(--s-16);
}

.service {
  display: flex;
  flex-direction: column;
  padding: var(--s-24);
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-24);
}

.service-n,
.step-n {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.service p,
.step p {
  max-width: 520px;
  margin-top: var(--s-8);
  color: var(--text-secondary);
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-4);
  margin-top: auto;
  padding-top: var(--s-24);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
}

.flow b {
  padding: var(--s-4) var(--s-8);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-1);
  color: var(--text-primary);
  font-weight: 500;
}

@media (min-width: 900px) {
  .services {
    grid-template-columns: repeat(6, 1fr);
    gap: var(--s-24);
  }

  .service {
    padding: var(--s-32);
    grid-column: span 2;
  }

  .service.span-4 {
    grid-column: span 4;
  }

  .service.span-6 {
    grid-column: span 6;
    flex-direction: row;
    align-items: center;
    gap: var(--s-32);
  }

  .service.span-6 .service-top {
    gap: var(--s-16);
    margin: 0;
  }
}

/* PROYECTOS */
.project {
  display: grid;
  gap: var(--s-32);
  padding: var(--s-24);
}

.project + .project {
  margin-top: var(--s-24);
}

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-bottom: var(--s-24);
}

.project-body > p {
  max-width: 560px;
  margin-top: var(--s-12);
}

.progress {
  max-width: 560px;
  margin-block: var(--s-24);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--s-8);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-3);
  overflow: hidden;
}

.progress-bar i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  transform: scaleX(var(--p));
  transform-origin: left;
  transition: transform 1s var(--ease) 0.2s;
}

.js .reveal:not(.is-visible) .progress-bar i {
  transform: scaleX(0);
}

.gallery {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: var(--s-16);
}

.shot {
  display: block;
  width: 100%;
  cursor: zoom-in;
  transition: border-color var(--fast) ease-out;
}

.shot:hover {
  border-color: var(--border-hover);
}

.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.kiosk-window .code {
  white-space: pre;
}

@media (min-width: 900px) {
  .project {
    padding: var(--s-40);
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .project-side {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: var(--s-64);
  }
}

/* PROCESO */
.steps {
  display: grid;
  gap: var(--s-24);
}

.step {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--s-12);
  padding-top: var(--s-24);
  border-top: 1px solid var(--border-strong);
}

.step::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-primary);
}

.step p {
  margin-top: 0;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-32);
  }
}

/* SOBRE MÍ */
.founder-name {
  margin-top: var(--s-32);
}

.section-head > .founder-role {
  margin-top: var(--s-4);
  color: var(--brand-tint-text);
  font-family: var(--font-mono);
  font-size: var(--t-ui);
  font-weight: 500;
}

.section-head > .founder-role + p {
  margin-top: var(--s-16);
  font-size: var(--t-body);
}

.founder-window .code {
  font-size: var(--t-ui);
}

/* DEMO */
.demo {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: var(--s-32);
  align-items: center;
  padding: var(--s-32) var(--s-24);
  overflow: hidden;
}

.demo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 100% 0%, rgba(255, 107, 0, 0.1), transparent 60%);
  pointer-events: none;
}

.demo h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.demo p {
  max-width: 520px;
  margin-top: var(--s-16);
  font-size: var(--t-lead);
}

.demo p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.demo-actions {
  margin-top: var(--s-32);
}

.demo-steps {
  display: grid;
  gap: var(--s-16);
  margin: 0;
  font-size: var(--t-ui);
}

.demo-steps li {
  padding-left: var(--s-32);
}

.demo-steps .k {
  display: inline-block;
  width: var(--s-32);
  margin-left: calc(-1 * var(--s-32));
}

@media (min-width: 900px) {
  .demo {
    grid-template-columns: 7fr 5fr;
    gap: var(--s-64);
    padding: var(--s-64);
  }
}

/* CONTACTO */
.contact-list {
  margin-top: var(--s-32);
  border-bottom: 1px solid var(--border-subtle);
}

.contact-item {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-16) 0;
  border-top: 1px solid var(--border-subtle);
  overflow-wrap: anywhere;
}

.contact-item small {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-item a,
.contact-item span {
  color: var(--text-primary);
}

.mono-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--font-mono);
  font-size: var(--t-ui);
  font-variant-numeric: tabular-nums;
}

.mono-link:hover {
  color: var(--brand-primary-hover);
}

@media (min-width: 640px) {
  .contact-item {
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: var(--s-16);
  }
}

.form-body {
  display: grid;
  gap: var(--s-20);
  padding: var(--s-24);
}

.form-body .btn {
  justify-self: start;
}

@media (min-width: 900px) {
  .form-body {
    padding: var(--s-32);
  }
}
