/* Apps Premium 2030 V2 — diseño aprobado por el usuario y por Erik; integrado en el sitio (commit 27868b3).
   Se carga después de apps.css; todo acotado a .apps-page.v2. Encabezado y pie del sitio sin cambios.
   Color por área (no por prioridad comercial): campo = lima corporativo, combustible = ámbar, riego = celeste. */
.apps-page.v2 {
  --deep: oklch(0.185 0.04 155);
  --deep-2: oklch(0.155 0.035 158);
  --c-campo: oklch(0.86 0.13 125);
  --c-combustible: oklch(0.84 0.13 75);
  --c-riego: oklch(0.83 0.1 215);
  --accent: var(--c-campo);
  background:
    radial-gradient(1200px 600px at 100% 0%, oklch(0.42 0.08 150 / 0.35), transparent 70%),
    linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%);
}
.apps-page.v2::before {
  height: 100%;
  background:
    radial-gradient(40% 520px at 80% 120px, oklch(0.86 0.13 125 / 0.12), transparent 70%),
    linear-gradient(oklch(1 0 0 / 0.035) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, oklch(1 0 0 / 0.035) 1px, transparent 1px) 0 0 / 64px 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 760px);
          mask-image: linear-gradient(180deg, #000 0, transparent 760px);
}
.apps-page.v2 [data-cat="campo"] { --accent: var(--c-campo); }
.apps-page.v2 [data-cat="combustible"] { --accent: var(--c-combustible); }
.apps-page.v2 [data-cat="riego"] { --accent: var(--c-riego); }
.v2-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent); flex: none; }

/* ── Hero ── */
.v2-hero .apps-hero-inner { padding-bottom: clamp(32px, 4vw, 56px); }
.v2-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px clamp(32px, 5vw, 80px); align-items: center; }
.v2-hero-text { display: flex; flex-direction: column; gap: 20px; }
.v2-hero-text .eyebrow { margin: 0; }
.apps-page.v2 .v2-hero-title { font-size: clamp(42px, 6vw, 88px); line-height: .98; letter-spacing: -0.045em; text-wrap: balance; }
.v2-hero-title span { background: linear-gradient(90deg, var(--c-campo), oklch(0.9 0.1 160) 55%, var(--c-riego)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.apps-page.v2 .v2-intro { max-width: 46ch; font-size: clamp(16px, 1.3vw, 18px); }
.v2-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.v2-legend li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border-radius: 999px; background: oklch(1 0 0 / 0.05); border: 1px solid oklch(1 0 0 / 0.12); font-size: 14px; color: var(--on-deep); }
.v2-legend b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--accent); }

/* Abanico de tres capturas reales (una por área) */
.v2-fan { position: relative; height: clamp(300px, 34vw, 440px); }
.v2-fan-glow { position: absolute; inset: 15% 10%; border-radius: 50%; background: radial-gradient(closest-side, oklch(0.86 0.13 125 / 0.35), oklch(0.83 0.1 215 / 0.12) 60%, transparent); filter: blur(30px); }
.v2-fan-phone { position: absolute; top: 50%; left: 50%; width: clamp(130px, 13vw, 190px); }
.v2-fan-phone--1 { transform: translate(-125%, -46%) rotate(-9deg); z-index: 1; }
.v2-fan-phone--2 { transform: translate(-50%, -54%); z-index: 2; }
.v2-fan-phone--3 { transform: translate(25%, -46%) rotate(9deg); z-index: 1; }

/* Marco de teléfono compartido (abanico y tarjetas) */
.v2-fan-phone, .v2-phone {
  display: block; padding: 5px; border-radius: 26px;
  background: linear-gradient(160deg, oklch(0.36 0.02 150), oklch(0.14 0.02 155));
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.14), 0 24px 48px -20px oklch(0.05 0.03 155 / 0.9);
}
.v2-fan-phone img, .v2-phone img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 17; object-fit: cover; object-position: top; border-radius: 21px; background: #fff; }

/* ── Acceso rápido por ícono ── */
.v2-quick { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.v2-quick ul { list-style: none; margin: 0; padding: 14px 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.v2-quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px; border-radius: 12px; color: var(--on-deep-soft); font-size: 12px; font-weight: 500; line-height: 1.2; text-align: center; transition: background-color .2s, color .2s; }
.v2-quick img { width: 40px; height: 40px; border-radius: 22.5%; box-shadow: 0 0 0 1px oklch(1 0 0 / 0.14), 0 0 0 4px transparent; transition: box-shadow .25s, transform .25s var(--ease); }
.v2-quick a:hover { background: oklch(1 0 0 / 0.05); color: var(--on-deep); }
.v2-quick a:hover img { transform: translateY(-2px); box-shadow: 0 0 0 1px oklch(1 0 0 / 0.14), 0 0 0 4px color-mix(in oklch, var(--accent) 35%, transparent); }
.v2-quick a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ── Tarjetas ── */
.v2-catalog { padding-top: clamp(28px, 3.5vw, 48px); }
.v2-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.v2-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(140px, 12vw, 172px); gap: 24px; align-items: start;
  padding: clamp(20px, 2vw, 28px); border-radius: 18px; overflow: hidden; scroll-margin-top: calc(var(--nav-h) + 16px);
  background: linear-gradient(160deg, oklch(0.28 0.05 155), oklch(0.225 0.045 155));
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.06), 0 1px 2px oklch(0.1 0.03 155 / 0.4);
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s var(--ease);
}
/* Luz de color del área, arriba a la derecha */
.v2-card::before { content: ''; position: absolute; inset: -40% -30% auto auto; width: 70%; height: 80%; pointer-events: none; background: radial-gradient(closest-side, color-mix(in oklch, var(--accent) 22%, transparent), transparent); opacity: .7; transition: opacity .3s; }
.v2-card::after { content: ''; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); opacity: .85; }
.v2-card:hover { border-color: color-mix(in oklch, var(--accent) 45%, transparent); transform: translateY(-3px); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 24px 48px -28px oklch(0.06 0.03 155 / 0.95); }
.v2-card:hover::before { opacity: 1; }
.v2-card-main { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.v2-card-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.v2-icon { width: 64px; height: 64px; border-radius: 22.5%; display: block; box-shadow: 0 0 0 1px oklch(1 0 0 / 0.14), 0 10px 22px -10px oklch(0.06 0.03 155 / 0.9); }
.v2-titles { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.v2-label { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.v2-name { margin: 0; font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; color: var(--on-deep); }
.v2-index { align-self: start; font-family: var(--mono); font-size: 12px; color: var(--on-deep-muted); }
.v2-tagline { margin: 4px 0 0; font-size: clamp(17px, 1.35vw, 19px); font-weight: 500; line-height: 1.3; letter-spacing: -0.012em; color: var(--on-deep); text-wrap: balance; }
.v2-desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--on-deep-soft); text-wrap: pretty; }
.v2-features { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.v2-features li { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.4; color: var(--on-deep-soft); }
.v2-features li::before { content: ''; position: absolute; left: 0; top: .2em; width: 15px; height: 15px; border-radius: 50%; background: color-mix(in oklch, var(--accent) 20%, transparent);
  -webkit-mask: none; box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--accent) 55%, transparent); }
.v2-features li::after { content: ''; position: absolute; left: 5px; top: calc(.2em + 3.5px); width: 4px; height: 7px; border: solid var(--accent); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.v2-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--on-deep-muted); }
.apps-page.v2 .v2-stores { flex-direction: row; margin-top: 6px; }
.apps-page.v2 .v2-store { flex: 0 1 auto; gap: 8px; padding: 0 16px; min-height: 40px; }
.v2-store svg { width: 15px; height: 15px; flex: none; }

/* Captura: botón que abre la galería */
.v2-shot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: zoom-in; }
.v2-shot .v2-phone { width: 100%; transition: transform .35s var(--ease), box-shadow .35s; }
.v2-card:hover .v2-phone { transform: translateY(-4px) rotate(-1.5deg); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.18), 0 30px 50px -22px oklch(0.05 0.03 155 / 0.95), 0 0 0 6px color-mix(in oklch, var(--accent) 14%, transparent); }
.v2-shot-cta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-deep-muted); transition: color .2s; }
.v2-shot:hover .v2-shot-cta { color: var(--accent); }
.v2-shot:focus-visible { outline: none; }
.v2-shot:focus-visible .v2-phone { outline: 2px solid var(--lime); outline-offset: 4px; }

.v2-sources { margin: clamp(28px, 3vw, 40px) 0 0; font-size: 13px; line-height: 1.5; color: var(--on-deep-muted); max-width: 80ch; }

/* ── Galería ── */
.v2-gallery { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid oklch(1 0 0 / 0.14); border-radius: 20px; background: oklch(0.2 0.04 155); color: var(--on-deep); box-shadow: 0 40px 80px -20px oklch(0.02 0.02 155 / 0.9); }
.v2-gallery::backdrop { background: oklch(0.1 0.03 155 / 0.72); backdrop-filter: blur(6px); }
.v2-gallery-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid oklch(1 0 0 / 0.1); }
.v2-gallery-icon { width: 44px; height: 44px; border-radius: 22.5%; }
.v2-gallery .v2-label { color: var(--lime); }
.v2-gallery-title { margin: 2px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.v2-gallery-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid oklch(1 0 0 / 0.2); background: oklch(1 0 0 / 0.05); color: var(--on-deep); font-size: 16px; cursor: pointer; }
.v2-gallery-close:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.v2-gallery-close:focus-visible, .v2-gallery-strip:focus-visible, .v2-gallery-link:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.v2-gallery-strip { display: flex; gap: 16px; padding: 20px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-color: oklch(1 0 0 / 0.3) transparent; scrollbar-width: thin; }
.v2-gallery-strip figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; }
.v2-gallery-strip img { display: block; height: min(560px, calc(100dvh - 220px)); width: auto; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px oklch(1 0 0 / 0.14); }
.v2-gallery-link { display: inline-block; margin: 0 20px 20px; font-size: 14px; color: var(--lime); border-bottom: 1px solid currentColor; }

/* ── Responsive ── */
@media (max-width: 1099.98px) {
  .v2-list { grid-template-columns: minmax(0, 1fr); }
  .v2-card { grid-template-columns: minmax(0, 1fr) 176px; gap: 28px; }
  .v2-quick ul { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 899.98px) {
  .v2-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .v2-fan { height: 300px; order: -1; margin: -8px 0 4px; }
  .v2-fan-phone { width: 128px; }
}
/* Celular: captura chica junto a la frase y la descripción; funciones debajo. Tarjeta compacta. */
@media (max-width: 640px) {
  .v2-fan { height: 236px; }
  .v2-fan-phone { width: 104px; padding: 4px; border-radius: 20px; }
  .v2-fan-phone img { border-radius: 16px; }
  .v2-legend li { font-size: 13px; padding: 7px 12px 7px 10px; }
  .v2-quick { padding: 0; }
  .v2-quick ul { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding: 12px var(--gutter); gap: 4px; scrollbar-width: none; }
  .v2-quick ul::-webkit-scrollbar { display: none; }
  .v2-quick li { flex: 0 0 76px; scroll-snap-align: start; }
  .v2-quick a { padding: 8px 2px; font-size: 11.5px; }
  .v2-card {
    grid-template-columns: minmax(0, 1fr) 88px; grid-template-areas: "head head" "tag shot" "desc shot" "feat feat" "note note" "stores stores";
    gap: 10px 14px; padding: 18px 16px 16px 18px; border-radius: 16px;
  }
  .v2-card-main { display: contents; }
  .v2-card-head { grid-area: head; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; margin-bottom: 2px; }
  .v2-icon { width: 52px; height: 52px; }
  .v2-name { font-size: 18px; }
  .v2-tagline { grid-area: tag; margin: 0; font-size: 16px; align-self: end; }
  .v2-desc { grid-area: desc; font-size: 14px; line-height: 1.5; align-self: start; }
  .v2-features { grid-area: feat; gap: 5px; margin-top: 2px; }
  .v2-features li { font-size: 13.5px; }
  .v2-note { grid-area: note; font-size: 12.5px; }
  .v2-stores { grid-area: stores; }
  .apps-page.v2 .v2-store { flex: 1 1 0; min-height: 44px; padding: 0 10px; }
  .v2-shot { grid-area: shot; align-self: start; gap: 6px; }
  .v2-phone { padding: 3px; border-radius: 16px; }
  .v2-phone img { border-radius: 13px; aspect-ratio: 9 / 16; }
  .v2-shot-cta { font-size: 10px; letter-spacing: 0.04em; }
  .v2-card::after { top: 18px; bottom: 18px; }
  .v2-gallery-strip { padding: 16px; gap: 12px; }
  .v2-gallery-strip img { height: min(520px, calc(100dvh - 200px)); }
}
@media (prefers-reduced-motion: reduce) {
  .v2-card, .v2-card::before, .v2-shot .v2-phone, .v2-quick img, .v2-quick a { transition: none; }
  .v2-card:hover, .v2-card:hover .v2-phone, .v2-quick a:hover img { transform: none; }
}
