/* La estructura no contiene colores ni tipografía de marca. Los valores
   visuales se cargan desde web/assets/themes/<tema>.css. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body.page {
  min-height: 100vh;
  background: var(--page-background);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 32px 20px 36px;
}

a {
  color: var(--primary);
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: var(--shadow-brand);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__text strong {
  font-size: 0.92rem;
  letter-spacing: 0.14em;
}

.brand__text span {
  color: var(--muted);
  font-size: 0.7rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:hover {
  background: var(--overlay-hover);
  color: var(--text);
}

.lang {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.lang__select,
.lang__go {
  max-width: 180px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.lang__select:focus-visible,
.lang__go:focus-visible,
.brand:focus-visible,
.nav a:focus-visible,
.app-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- portada */

.hero {
  display: flex;
  min-height: 540px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 84px 0 64px;
  text-align: center;
}

.hero__icon {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero__eyebrow {
  margin: 22px 0 0;
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 900px;
  margin: 10px 0 18px;
  font-size: clamp(2.65rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero__subtitle {
  width: min(690px, 100%);
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  text-wrap: pretty;
}

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

.products,
.approach {
  margin-top: 64px;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr);
  align-items: end;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.section-header__eyebrow {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--primary);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-header__title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-header__rule {
  width: 100%;
  height: 1px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--border), transparent);
}

[dir="rtl"] .section-header__rule {
  background: linear-gradient(270deg, var(--border), transparent);
}

.apps-table-wrap {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: var(--shadow-panel);
}

.apps-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.apps-table th:first-child,
.apps-table td:first-child {
  width: 30%;
}

.apps-table th:nth-child(2),
.apps-table td:nth-child(2) {
  width: 19%;
}

.apps-table thead th {
  padding: 15px 24px;
  border-bottom: 1px solid var(--border-default);
  background: var(--overlay-soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-align: start;
  text-transform: uppercase;
}

.app-row {
  --status-accent: var(--secondary);
  --status-accent-rgb: var(--secondary-rgb);
  background: transparent;
  transition: background-color 0.18s ease;
}

.app-row--live {
  --status-accent: var(--primary);
  --status-accent-rgb: var(--primary-rgb);
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.055), transparent 46%);
}

[dir="rtl"] .app-row--live {
  background:
    linear-gradient(270deg, rgba(var(--primary-rgb), 0.055), transparent 46%);
}

.app-row:hover {
  background-color: var(--overlay-soft);
}

.app-row td {
  padding: 25px 24px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.app-row:last-child td {
  border-bottom: 0;
}

.app-row--live td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}

[dir="rtl"] .app-row--live td:first-child {
  box-shadow: inset -3px 0 0 var(--primary);
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-identity__copy {
  min-width: 0;
}

.app-index {
  flex: none;
  color: rgba(var(--status-accent-rgb), 0.62);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.app-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(var(--status-accent-rgb), 0.24);
  border-radius: 14px;
  background: rgba(var(--status-accent-rgb), 0.08);
  color: var(--status-accent);
  box-shadow: inset 0 1px 0 var(--inset-highlight);
}

.app-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app-icon--official {
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.app-icon--official img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.app-name {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.018em;
}

.app-stores {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 0;
}

.app-stores__label {
  width: 100%;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.store-badge {
  padding: 3px 7px;
  border: 1px solid rgba(var(--status-accent-rgb), 0.18);
  border-radius: 6px;
  background: rgba(var(--status-accent-rgb), 0.055);
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(var(--status-accent-rgb), 0.22);
  border-radius: 999px;
  background: rgba(var(--status-accent-rgb), 0.07);
  color: var(--status-accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.app-row--live .status__dot {
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.app-row__description p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.app-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 0.15s ease;
}

[dir="rtl"] .app-link svg {
  transform: scaleX(-1);
}

.app-link:hover svg {
  transform: translateX(3px);
}

[dir="rtl"] .app-link:hover svg {
  transform: scaleX(-1) translateX(3px);
}

.approach {
  padding-top: 52px;
  border-top: 1px solid var(--border-subtle);
}

.architecture-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 32px;
  padding: 32px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--secondary-rgb), 0.1), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.architecture-card__eyebrow {
  margin: 0 0 10px;
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.architecture-card__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.architecture-card__text {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.technology-groups {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: var(--surface-inset);
}

.technology-group__label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.technology-group__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.technology-chip {
  padding: 5px 9px;
  border: 1px solid rgba(var(--secondary-rgb), 0.18);
  border-radius: 7px;
  background: rgba(var(--secondary-rgb), 0.06);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.store-flow {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
}

.store-flow__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.store-flow__label {
  margin: 0;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.store-flow__note {
  max-width: 710px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.store-flow__steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: store-step;
}

.store-flow__steps li {
  padding: 11px 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.13);
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.045);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  counter-increment: store-step;
}

.store-flow__steps li::before {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  content: counter(store-step, decimal-leading-zero);
  font-size: 0.59rem;
  letter-spacing: 0.1em;
}

.process {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}

.process__intro {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-default);
  background: var(--overlay-soft);
}

.process__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 1px;
  list-style: none;
  background: var(--border-default);
  counter-reset: process-step;
}

.process-step {
  min-height: 220px;
  padding: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--primary-rgb), 0.06), transparent 38%),
    var(--surface);
  counter-increment: process-step;
}

.process-step::before {
  display: block;
  margin-bottom: 44px;
  color: var(--primary);
  content: counter(process-step, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.process-step__title {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.process-step__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.team {
  margin-top: 64px;
  padding-top: 52px;
  border-top: 1px solid var(--border-subtle);
}

.team__intro {
  max-width: 720px;
  margin: -6px 0 26px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.team-card {
  display: flex;
  min-height: 330px;
  align-items: center;
  flex-direction: column;
  padding: 24px 18px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--secondary-rgb), 0.08), transparent 38%),
    var(--surface);
  text-align: center;
}

.team-card__avatar-frame {
  display: block;
  width: 100px;
  height: 100px;
  padding: 4px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--team-avatar-frame);
  box-shadow: var(--shadow-avatar);
}

.team-card__avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: var(--team-avatar-opacity);
  filter: var(--team-avatar-filter);
  object-fit: cover;
}

.team-card:hover .team-card__avatar {
  opacity: var(--team-avatar-opacity-hover);
}

.team-card__role {
  margin: 8px 0 0;
  color: var(--secondary);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.team-card__name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.018em;
}

.team-card__contribution {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 80px;
  padding: 30px 0 0;
  border-top: 1px solid var(--border-soft);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__brand img {
  width: 38px;
  height: 38px;
}

.footer__brand p {
  display: flex;
  flex-direction: column;
  margin: 0;
  line-height: 1.45;
}

.footer__brand strong {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.footer__brand span,
.footer__legal {
  color: var(--muted);
  font-size: 0.76rem;
}

.footer__legal {
  margin: 0;
  text-align: end;
}

@media (max-width: 900px) {
  .hero {
    min-height: 470px;
  }

  .architecture-card {
    grid-template-columns: 1fr;
  }

  .store-flow__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .process-step {
    min-height: 0;
  }

  .process-step::before {
    margin-bottom: 24px;
  }

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

  .team-card {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  .topbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    order: 3;
    justify-content: flex-start;
    padding-top: 4px;
  }

  .nav a {
    padding-inline: 0;
    margin-inline-end: 18px;
  }

  .apps-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .apps-table,
  .apps-table tbody {
    display: block;
  }

  .apps-table th:first-child,
  .apps-table td:first-child,
  .apps-table th:nth-child(2),
  .apps-table td:nth-child(2) {
    width: auto;
  }

  .apps-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .app-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 16px;
    margin-bottom: 12px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--surface);
  }

  .app-row--live {
    border-color: rgba(var(--primary-rgb), 0.22);
    background:
      linear-gradient(120deg, rgba(var(--primary-rgb), 0.075), transparent 55%),
      var(--surface);
  }

  [dir="rtl"] .app-row--live {
    background:
      linear-gradient(240deg, rgba(var(--primary-rgb), 0.075), transparent 55%),
      var(--surface);
  }

  .app-row td {
    display: block;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .app-row__app {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .app-row__status {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .app-row__status::before,
  .app-row__description::before {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .app-row__description {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 20px;
    padding-top: 18px !important;
    border-top: 1px solid var(--border-soft) !important;
  }

  .app-index {
    display: none;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 22px 16px 28px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand__text span {
    display: none;
  }

  .lang {
    width: 100%;
    justify-content: space-between;
  }

  .nav {
    justify-content: space-between;
    gap: 12px;
  }

  .nav a {
    margin: 0;
  }

  .lang__select {
    max-width: 220px;
  }

  .hero {
    min-height: 0;
    align-items: flex-start;
    padding: 70px 0 36px;
    text-align: start;
  }

  .hero__icon {
    width: 86px;
    height: 86px;
    border-radius: 22px;
  }

  .hero__title {
    font-size: clamp(2.4rem, 14vw, 3.7rem);
  }

  .section-header {
    grid-template-columns: 1fr;
  }

  .section-header__rule {
    display: none;
  }

  .products,
  .approach,
  .team {
    margin-top: 58px;
  }

  .architecture-card {
    padding: 22px;
  }

  .technology-groups {
    padding: 18px;
  }

  .store-flow__header {
    display: block;
  }

  .store-flow__note {
    margin-top: 7px;
  }

  .store-flow__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .team-card {
    padding: 26px 22px;
  }

  .app-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }

  .app-row__status {
    grid-column: 1;
    grid-row: 2;
    margin-top: 18px;
  }

  .app-row__description {
    grid-row: 3;
    margin-top: 16px;
  }

  .app-identity {
    align-items: flex-start;
  }

  .app-name {
    padding-top: 4px;
    font-size: 1.02rem;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer__legal {
    text-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
