/* Noiphos — catálogo de apps */
:root {
  --surface-1: #0c1230;
  --surface-2: #121a3c;
  --line-strong: #232c55;
  --ink-soft: #b9c0d9;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  --accent: #f5b83d;
  --accent-rgb: 245, 184, 61;
}
.accent-gold  { --accent: #f5b83d; --accent-rgb: 245, 184, 61; }
.accent-sky   { --accent: #5aa9ff; --accent-rgb: 90, 169, 255; }
.accent-mint  { --accent: #4fd1a5; --accent-rgb: 79, 209, 165; }
.accent-coral { --accent: #ff7a66; --accent-rgb: 255, 122, 102; }
.accent-lilac { --accent: #a68cff; --accent-rgb: 166, 140, 255; }

svg { width: 16px; height: 16px; flex: none; }

.cat { max-width: 1120px; margin: 0 auto; padding: 48px 32px 96px; animation: in .8s ease both; }
.cat .doc__head { margin-bottom: 20px; }
.cat__intro { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 62ch; margin-bottom: 48px; }
.cat__intro a { color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: color .2s; }
.cat__intro a:hover { color: var(--gold); }
.cat__intro svg { width: 14px; height: 14px; }

.eyebrow { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

/* Iconos de app */
.icon {
  width: 64px; height: 64px; flex: none; border-radius: var(--r-md);
  object-fit: cover; background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 8px 24px -10px rgba(var(--accent-rgb), .55);
}
.icon--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 700; font-size: 26px;
  background: linear-gradient(160deg, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), .06)), var(--surface-2);
}
.icon--xl { width: 104px; height: 104px; border-radius: var(--r-lg); font-size: 42px; }

/* Insignias de privacidad */
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px; border-radius: 999px;
  font-size: 12.5px; color: var(--ink-soft);
  background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.badges svg { width: 13px; height: 13px; color: var(--accent); }

/* Tarjetas del catálogo */
.cards { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--accent-rgb), .16), transparent 55%),
    var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .45), 0 28px 50px -28px rgba(var(--accent-rgb), .45); }
.card__link { display: grid; grid-template-columns: 1fr auto; gap: 8px; min-height: 280px; }
.card__body { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.card__id { display: flex; align-items: center; gap: 16px; }
.card h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; }
.card__tag { color: var(--muted); font-size: 15px; line-height: 1.55; }
.card__more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--accent);
}
.card__more svg { transition: transform .2s; }
.card:hover .card__more svg { transform: translateX(3px); }
.card__shot { width: 150px; position: relative; padding-top: 28px; padding-right: 24px; }
.card__shot img {
  display: block; width: 126px; border-radius: 16px 16px 0 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 -10px 30px -12px rgba(0,0,0,.6);
  transform: translateY(14px) rotate(2deg); transform-origin: bottom left;
  transition: transform .35s ease;
}
.card:hover .card__shot img { transform: translateY(6px) rotate(0); }
.card__shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 70px; background: linear-gradient(transparent, var(--surface-1)); }

/* Ficha: cabecera */
.hero {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end;
  padding: 40px; margin-bottom: 56px; border-radius: var(--r-lg);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(var(--accent-rgb), .20), transparent 60%),
    radial-gradient(60% 100% at 100% 100%, rgba(var(--accent-rgb), .08), transparent 60%),
    var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow);
}
.hero__id { display: flex; align-items: center; gap: 28px; }
.hero__name { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.hero__tag { color: var(--ink-soft); font-size: 17px; line-height: 1.5; margin-top: 8px; max-width: 46ch; }
.hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.hero__meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.hero__meta span:not(:last-child)::after { content: "·"; margin-left: 14px; color: var(--faint); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: var(--r-sm);
  background: var(--accent); color: #070b22; font-size: 15px; font-weight: 600;
  box-shadow: 0 10px 24px -12px rgba(var(--accent-rgb), .8);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(var(--accent-rgb), .9); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .6); color: var(--accent); }
.btn:focus-visible, .shot:focus-visible, .card__link:focus-visible, .gallery:focus-visible, .viewer__btn:focus-visible, .hash__copy:focus-visible, .mini a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* Bloques */
.block { margin-bottom: 56px; }
.block__title { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }

/* Galería */
.gallery {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 18px; margin: 0 -4px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.gallery figure { flex: none; scroll-snap-align: start; width: 220px; }
.shot { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--r-md); }
.shot img {
  display: block; width: 220px; height: auto; aspect-ratio: 9 / 19.5; object-fit: cover; border-radius: var(--r-md);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 36px -20px rgba(0,0,0,.8);
  transition: transform .25s;
}
.shot:hover img { transform: translateY(-3px); }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.45; }

/* Vídeo */
.video { display: block; width: 100%; max-width: 860px; aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Cuerpo en dos columnas */
.layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.prose p { color: var(--ink-soft); font-size: 16px; line-height: 1.7; margin-bottom: 16px; max-width: 64ch; }
.features { list-style: none; display: grid; gap: 14px; }
.features li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line); }
.features svg { color: var(--accent); margin-top: 3px; }
.features strong { display: block; font-weight: 600; font-size: 15.5px; }
.features span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-top: 2px; }
.changelog { list-style: none; border-left: 1px solid var(--line-strong); padding-left: 22px; display: grid; gap: 22px; }
.changelog > li { position: relative; }
.changelog > li::before { content: ""; position: absolute; left: -27px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px var(--accent); }
.changelog > li:not(:first-child)::before { box-shadow: 0 0 0 2px var(--line-strong); }
.changelog h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.changelog ul { list-style: none; display: grid; gap: 4px; }
.changelog ul li { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.changelog ul li::before { content: "– "; color: var(--faint); }

/* Paneles laterales */
.layout__side { display: grid; gap: 20px; position: sticky; top: 24px; }
.panel { padding: 24px; border-radius: var(--r-lg); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line-strong); }
.panel__title { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.panel__sub { font-size: 13px; font-weight: 600; margin: 20px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.panel__none { color: var(--muted); font-size: 14px; }
.privacy { list-style: none; display: grid; gap: 14px; }
.privacy li { display: flex; gap: 12px; align-items: flex-start; }
.privacy svg {
  width: 22px; height: 22px; padding: 4px; border-radius: 50%;
  color: var(--accent); background: rgba(var(--accent-rgb), .12);
}
.privacy strong { display: block; font-size: 14.5px; font-weight: 600; }
.privacy span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 1px; }
.perms div { padding: 8px 0; }
.perms dt { font-size: 14px; font-weight: 600; }
.perms dd { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.info div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.info div:last-child { border-bottom: 0; }
.info dt { color: var(--muted); }
.info dd { text-align: right; }
.hash { margin-top: 18px; padding: 14px; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.hash__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.hash__copy { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--ink-soft); font: inherit; font-size: 12px; cursor: pointer; }
.hash__copy:hover { color: var(--accent); }
.hash__copy svg { width: 13px; height: 13px; }
.hash code { display: block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.6; word-break: break-all; color: var(--ink-soft); }
.hash p { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.hash code.inline { display: inline; font-size: 11.5px; color: var(--ink-soft); }

/* Más apps */
.more { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.mini { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini a { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.mini a:hover { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .5); }
.mini .icon { width: 44px; height: 44px; font-size: 18px; border-radius: 11px; }
.mini strong { display: block; font-size: 15px; }
.mini span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Visor de capturas */
.viewer { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100vh; }
.viewer[open] { display: flex; align-items: center; justify-content: center; gap: 24px; }
.viewer::backdrop { background: rgba(4, 6, 20, .9); backdrop-filter: blur(6px); }
.viewer__fig { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer__fig img { max-height: 82vh; max-width: 80vw; border-radius: var(--r-lg); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 30px 60px -20px rgba(0,0,0,.9); }
.viewer__fig figcaption { color: var(--ink-soft); font-size: 14px; }
.viewer__btn {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--text); cursor: pointer;
  transition: background .2s;
}
.viewer__btn:hover { background: rgba(255,255,255,.14); }
.viewer__close { position: fixed; top: 20px; right: 20px; }
.viewer__count { position: fixed; top: 32px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .layout__side { position: static; margin-bottom: 56px; order: -1; }
  .mini { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 28px; align-items: start; }
  .hero__side { align-items: flex-start; }
  .hero__meta { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .cat { padding: 32px 20px 72px; }
  .card__link { grid-template-columns: 1fr; min-height: 0; }
  .card__shot { display: none; }
  .hero__id { flex-direction: column; align-items: flex-start; gap: 18px; }
  .icon--xl { width: 84px; height: 84px; }
  .gallery figure, .shot img { width: 180px; }
  .viewer[open] { gap: 8px; }
  .viewer__prev, .viewer__next { position: fixed; bottom: 24px; }
  .viewer__prev { left: calc(50% - 56px); } .viewer__next { right: calc(50% - 56px); }
  .viewer__fig img { max-width: 92vw; max-height: 74vh; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* --- Catálogo conectado a la Store --- */
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.group { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 40px 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.chips a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line-strong); transition: color .2s, box-shadow .2s, background .2s; }
.chips a:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--muted); }
.chips a[aria-current] { background: var(--gold); color: #070b22; box-shadow: none; font-weight: 600; }

.storebar {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 28px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .14), rgba(var(--accent-rgb), .02) 60%), var(--surface-1);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .35);
  transition: box-shadow .2s;
}
.storebar:hover { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .7); }
.storebar .icon { width: 52px; height: 52px; border-radius: 13px; font-size: 22px; }
.storebar__txt { flex: 1; min-width: 0; }
.storebar__txt strong { display: block; font-size: 16px; }
.storebar__txt span { display: block; font-size: 14px; color: var(--muted); }
.storebar__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }

.featured {
  position: relative; display: block; overflow: hidden; margin-bottom: 32px; border-radius: var(--r-lg);
  aspect-ratio: 1024 / 400; max-height: 420px; width: 100%;
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow);
}
.featured__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.featured:hover .featured__img { transform: scale(1.02); }
.featured::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,11,34,.92) 0%, rgba(7,11,34,.55) 45%, rgba(7,11,34,0) 75%); }
.featured__txt { position: absolute; z-index: 1; left: 36px; bottom: 32px; max-width: 46%; }
.featured__txt h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.featured__txt p { color: var(--ink-soft); font-size: 16px; margin-top: 8px; }

.avail { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.avail__price { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.avail__note { font-size: 14px; color: var(--muted); }

.coupon { display: grid; gap: 8px; width: min(440px, 100%); }
.coupon label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.coupon__row { display: flex; gap: 8px; }
.coupon input {
  flex: 1; min-width: 0; padding: 12px 14px; border: 0; border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 500 14px ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase;
}
.coupon input::placeholder { color: var(--faint); }
.coupon input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.coupon input[aria-invalid] { box-shadow: inset 0 0 0 2px #ff7a66; }
.coupon__help { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.coupon__error { font-size: 13px; color: #ff9d8f; }

.videos { display: grid; gap: 24px; }
.videos figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.features .price { font-style: normal; font-weight: 500; font-size: 13px; color: var(--accent); margin-left: 6px; }

@media (max-width: 820px) {
  .avail, .hero__side { justify-content: flex-start; align-items: flex-start; }
  .featured { aspect-ratio: 16 / 10; }
  .featured__txt { max-width: none; left: 22px; right: 22px; bottom: 22px; }
  .featured::after { background: linear-gradient(0deg, rgba(7,11,34,.95) 0%, rgba(7,11,34,.4) 60%, rgba(7,11,34,0) 100%); }
}
@media (max-width: 560px) {
  .storebar { flex-wrap: wrap; }
  .storebar__cta { width: 100%; }
  .coupon__row { flex-direction: column; }
}

.perms-list { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; }
.perms-list .mono { font-size: 11.5px; color: var(--ink-soft); }
