/* =========================================================
   Altech — capa de animación y hero (se suma a los estilos de index.html)
   Todo lo animado usa transform/opacity (sin blur animado) para que vaya fluido.
   ========================================================= */

/* ---------- barra de progreso ---------- */
.fx-prog { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 70; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--acc), var(--acc2)); }

/* ---------- intro (solo la primera vez por sesión) ---------- */
.fx-intro { position: fixed; inset: 0; z-index: 100; background: #0a0a0a; display: grid; place-items: center; }
.fx-intro .lg { width: min(260px, 60vw); color: #f5f5f5; }
.fx-intro .lg svg { width: 100%; height: auto; display: block; }
.fx-intro .bar { margin: 18px auto 0; width: min(180px, 44vw); height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.fx-intro .bar i { display: block; height: 100%; background: var(--acc); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- header ---------- */
header { transition: box-shadow .4s, background .4s; }
header.fx-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }

/* ---------- hero ---------- */
.hx { padding: 40px 0 10px; overflow: visible; }
body { overflow-x: clip; }
.hx-bg { position: absolute; top: -40px; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none; overflow: hidden; z-index: 0; }
.hx-bg i { position: absolute; border-radius: 50%; will-change: transform; }
.hx-bg .g1 { width: 720px; height: 720px; right: -160px; top: -260px; background: radial-gradient(circle, rgba(224,78,28,.26), rgba(224,78,28,.08) 40%, transparent 70%); animation: hxg1 16s ease-in-out infinite alternate; }
.hx-bg .g2 { width: 520px; height: 520px; left: -200px; bottom: -260px; background: radial-gradient(circle, rgba(224,78,28,.12), rgba(224,78,28,.03) 45%, transparent 70%); animation: hxg2 20s ease-in-out infinite alternate; }
:root[data-theme=light] .hx-bg .g1 { background: radial-gradient(circle, rgba(224,78,28,.16), rgba(224,78,28,.05) 40%, transparent 70%); }
@keyframes hxg1 { to { transform: translate(-90px, 70px) scale(1.12); } }
@keyframes hxg2 { to { transform: translate(110px, -50px) scale(.92); } }
.hx .dots { z-index: 0; right: 4%; top: 10px; }
.hx-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; align-items: center; min-height: min(560px, 72vh); }
.hx-copy { position: relative; }
.hx .kicker { font-size: clamp(26px, 3.2vw, 44px); }
.hx h1 { font-size: clamp(34px, 4.1vw, 62px); letter-spacing: -.045em; line-height: .98; }
@media (max-width: 900px) { .hx h1 { font-size: clamp(36px, 9.6vw, 70px); } }
.hx h1 .q { display: inline-block; }
.hx .lead { font-size: 16px; max-width: 520px; margin-top: 20px; }
.hx .hero-ctas { margin-top: 24px; gap: 10px; }
.hx-cta { padding: 14px 22px; font-size: 15px; position: relative; overflow: hidden; isolation: isolate; }
.hx-cta svg { transition: transform .4s cubic-bezier(.2,.7,.1,1); }
.hx-cta:hover svg { transform: translateX(4px); }
.btn-acc.hx-cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--acc2); transform: translateY(101%); transition: transform .45s cubic-bezier(.2,.7,.1,1); border-radius: inherit; }
.btn-acc.hx-cta:hover::before { transform: none; }
.hx .loc { margin-top: 22px; }

/* ---------- visor del iPhone 18 Pro Max (estilo Apple) ---------- */
.hx-grid { grid-template-columns: .92fr 1.08fr; gap: 28px; }
.hx-stage { position: relative; }
.vw-panel { position: relative; height: min(660px, 80vh); min-height: 500px; color: #f5f5f7; isolation: isolate; }
.vw-canvas { position: absolute; inset: 0; z-index: 0; cursor: grab; touch-action: pan-y; }
.vw-canvas.drag { cursor: grabbing; }
.vw-canvas canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .8s; }
.vw-canvas.listo canvas { opacity: 1; }
.vw-fallback { position: absolute; inset: 0 0 0 30%; display: grid; place-items: center; transition: opacity .6s; }
.vw-fallback { opacity: 0; } /* los dibujos solo se ven si el 3D no anda */
.sin3d .vw-fallback { opacity: 1; }
.vw-canvas:not(.listo)::after { content: ''; position: absolute; left: 50%; top: 45%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--acc); animation: vwspin .9s linear infinite; }
.hx-ph { grid-area: 1 / 1; width: clamp(110px, 9vw, 140px); aspect-ratio: 9 / 18.6; transform-origin: 50% 60%; }
.hx-ph svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hx-ph[data-i="0"] { transform: translateX(-70%) rotate(-12deg) scale(.92); }
.hx-ph[data-i="1"] { transform: translateX(-24%) rotate(-4deg); z-index: 2; }
.hx-ph[data-i="2"] { transform: translateX(24%) rotate(4deg); z-index: 3; }
.hx-ph[data-i="3"] { transform: translateX(70%) rotate(12deg) scale(.92); z-index: 1; }

/* selector de color (abajo, centrado) */
.vw-colors { position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 9px 18px 9px 12px; border-radius: 999px;
  background: rgba(36,36,40,.86); border: 1px solid rgba(255,255,255,.08); color: #f5f5f7; white-space: nowrap; }
.vw-sw { display: flex; gap: 9px; }
.vw-sw button { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); position: relative; transition: transform .25s; }
.vw-sw button:hover { transform: scale(1.1); }
.vw-sw button.on::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #f5f5f7; }
.vw-sw button.cargando::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; border-top-color: #f5f5f7; animation: vwspin .8s linear infinite; }
@keyframes vwspin { to { transform: rotate(360deg); } }
.vw-cname { min-width: 120px; }
.vw-cname small { display: block; font-size: 10.5px; color: #8e8e93; font-weight: 700; letter-spacing: .04em; }
.vw-cname b { display: block; font-size: 15px; font-weight: 800; }
.vw-hint { position: absolute; z-index: 2; left: 50%; top: 4px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: rgba(245,245,247,.5); pointer-events: none; transition: opacity .5s; white-space: nowrap; }
:root[data-theme=light] .vw-hint { color: rgba(28,28,28,.5); }
.vw-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vw-hint.off { opacity: 0; }
.vw-fallback { inset: 40px 0 90px; }
@media (max-width: 900px) { .vw-panel { height: 520px; min-height: 0; } }
@media (max-width: 560px) { .vw-panel { height: 500px; } .vw-colors { gap: 10px; padding: 8px 14px 8px 10px; } .vw-cname { min-width: 96px; } }

/* ---------- "Altech Store" con el iPhone Borgoña adelante (estilo PRO de Apple) ---------- */
.apro { position: relative; margin: 0 -18px; background: #000; color: #f5f5f7; overflow: hidden; }
@media (min-width: 1236px) { .apro { margin-left: calc((100vw - 1200px) / -2 - 18px); margin-right: calc((100vw - 1200px) / -2 - 18px); } }
.apro-pin { position: relative; height: 100vh; min-height: 560px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse 60% 55% at 50% 55%, #2a1007 0%, #0c0402 55%, #000 100%); }
.apro-txt { position: relative; z-index: 1; text-align: center; padding: 0 16px; }
.apro-big { font-size: clamp(64px, 16.5vw, 270px); font-weight: 900; letter-spacing: -.055em; line-height: .86; margin: 0; white-space: nowrap;
  background: linear-gradient(100deg, #7a2410 0%, #E04E1C 22%, #ffb38f 38%, #ff6a3a 52%, #a3330f 70%, #E04E1C 86%, #7a2410 100%);
  background-size: 220% 100%; background-position: 0% 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.apro-sub { position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(150px, 20vh, 200px); margin: 0; text-align: center; font-size: clamp(15px, 1.8vw, 24px); font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: #f3b79d; }
.apro-canvas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.apro-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
@media (max-width: 700px) { .apro-big { white-space: normal; font-size: 25vw; line-height: .9; } .apro-pin { height: 90vh; } }

/* línea con luz que recorre todo el hero */
@property --hx-a { syntax: '<angle>'; initial-value: 0deg; inherits: true; }
.hx-line { position: absolute; z-index: 0; inset: 12px -28px -22px; border-radius: 34px; pointer-events: none; --hx-a: 0deg; animation: hxluz 9s linear infinite; }
.hx-line::before, .hx-line::after, .hx-line i { content: ''; position: absolute; inset: 0; border-radius: inherit; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.hx-line::before { padding: 1px; background: var(--line); }
.hx-line::after { padding: 1.5px; background: conic-gradient(from var(--hx-a), transparent 0deg 285deg, rgba(224,78,28,.25) 315deg, var(--acc2) 348deg, #ffe2d4 356deg, transparent 360deg); }
.hx-line i { display: block; padding: 7px; inset: -3px; opacity: .35; background: conic-gradient(from var(--hx-a), transparent 0deg 300deg, rgba(224,78,28,.35) 340deg, rgba(255,140,90,.6) 354deg, transparent 360deg); }
@keyframes hxluz { to { --hx-a: 360deg; } }
.hx.fx-off .hx-line { animation-play-state: paused; }
@media (max-width: 900px) { .hx-line { inset: 6px -10px -14px; border-radius: 26px; } }
@media (prefers-reduced-motion: reduce) { .hx-line { animation: none; } }

/* números */
.hx-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); overflow: hidden; }
.hx-stats .st { padding: 18px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.hx-stats .st:first-child { border-left: 0; }
.hx-stats b { font-size: clamp(28px, 3.2vw, 40px); font-weight: 900; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.hx-stats b i { font-style: normal; color: var(--acc); }
.hx-stats .st > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hx-stats .st:last-child b { color: var(--acc); }

@media (max-width: 900px) {
  .hx-grid { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hx-stage { margin-top: 18px; }
  .hx-ph { width: 92px; }
  .hx-stats { grid-template-columns: 1fr 1fr; }
  .hx-stats .st:nth-child(3) { border-left: 0; }
  .hx-stats .st:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hx { padding-top: 26px; }
  .hx-cta { flex: 1; }
  .hx-stats .st { padding: 14px; }
}

/* ---------- marquee de modelos ---------- */
.mq { margin: 34px -18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; overflow: hidden; }
@media (min-width: 1236px) { .mq { margin-left: calc((100vw - 1200px) / -2 - 18px); margin-right: calc((100vw - 1200px) / -2 - 18px); } }
.mq-track { display: flex; width: max-content; align-items: center; gap: 30px; padding-right: 30px; will-change: transform; }
.mq span { font-size: clamp(26px, 4vw, 48px); font-weight: 900; letter-spacing: -1.5px; white-space: nowrap; line-height: 1; }
.mq span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1.2px var(--text); opacity: .55; }
.mq i { font-style: normal; color: var(--acc); font-size: 20px; }

/* ---------- por qué ---------- */
.why-sec .why { margin-top: 40px; }

/* ---------- tarjetas ---------- */
.card { position: relative; transition: border-color .3s; transform-style: preserve-3d; will-change: transform; }
.card:hover { transform: none; }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 30%), rgba(224,78,28,.14), transparent 45%); }
.card:hover::after { opacity: 1; }
.card .ph-img { transition: opacity .25s, transform .9s cubic-bezier(.2,.7,.1,1); }
.card:hover .ph-img { transform: scale(1.05); }
.card .ph svg { transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.card:hover .ph svg { transform: translateY(-6px) rotate(-3deg); }
.line-h h2 { display: flex; align-items: center; gap: 12px; }
.line-h h2::before { content: ''; width: 22px; height: 3px; border-radius: 3px; background: var(--acc); }

/* ---------- modal ---------- */
.ov { transition: background .3s; }
.ov.open .modal { animation: fxModal .55s cubic-bezier(.2,.8,.2,1); }
@keyframes fxModal { from { transform: translateY(40px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 719px) { @keyframes fxModal { from { transform: translateY(100%); } to { transform: none; } } }

/* ---------- bloques ---------- */
.blk { position: relative; overflow: hidden; }
.blk::before { content: ''; position: absolute; left: 50%; top: 0; width: 60%; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--acc), transparent); opacity: .5; }
.step .n, .ins li::before { box-shadow: 0 0 0 6px var(--accbg); }
.faq details { transition: background .3s; }
.faq details[open] { background: var(--accbg); }
.faq summary::after { transition: transform .35s cubic-bezier(.2,.7,.1,1); }
.faq details[open] summary::after { content: "+"; transform: rotate(45deg); }

/* ---------- barra de abajo ---------- */
.bbar { transition: transform .5s cubic-bezier(.2,.7,.1,1); }

/* ---------- cambio de tema (círculo que se expande desde el botón) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
  .hx-bg i { animation: none; }
  .ov.open .modal { animation: none; }
}

/* ---------- por qué Altech: bento ---------- */
.why h2 { margin-bottom: 4px; }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-areas: "a a b b" "a a c d" "e e f f"; gap: 14px; margin-top: 26px; text-align: left; }
.bx { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; padding: 24px; background: linear-gradient(160deg, var(--panel), var(--panel2)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-height: 170px; transition: border-color .4s, transform .5s cubic-bezier(.2,.7,.1,1); }
.bx:hover { border-color: var(--accln); transform: translateY(-4px); }
.bx::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 30%), rgba(224,78,28,.16), transparent 50%); }
.bx:hover::before { opacity: 1; }
.bx-a { grid-area: a; justify-content: flex-end; min-height: 360px; background: radial-gradient(ellipse 80% 70% at 85% 10%, rgba(224,78,28,.22), transparent 60%), linear-gradient(160deg, var(--panel), var(--panel2)); }
.bx-b { grid-area: b; } .bx-c { grid-area: c; } .bx-d { grid-area: d; } .bx-e { grid-area: e; } .bx-f { grid-area: f; }
.bx-ic { width: 40px; height: 40px; color: var(--acc); margin-bottom: auto; flex: none; transition: transform .5s cubic-bezier(.2,.7,.1,1); }
.bx:hover .bx-ic { transform: scale(1.12) rotate(-6deg); }
.bx-a .bx-ic { position: absolute; top: 24px; left: 24px; width: 52px; height: 52px; }
.bx h3 { font-size: 19px; font-weight: 900; letter-spacing: -.5px; margin-top: 14px; }
.bx-a h3 { font-size: 28px; letter-spacing: -1px; }
.bx p { font-size: 14px; color: var(--muted); line-height: 1.45; max-width: 46ch; }
.bx p b { color: var(--text); }
.bx-num { display: flex; align-items: baseline; gap: 10px; line-height: .8; }
.bx-num .cnt { font-size: clamp(120px, 14vw, 190px); font-weight: 900; letter-spacing: -8px; background: linear-gradient(180deg, var(--acc2), var(--acc)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bx-num small { font-size: 22px; font-weight: 800; color: var(--muted); }
.bx-link { align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--acc); padding: 0; }
.bx-link span { transition: transform .4s cubic-bezier(.2,.7,.1,1); }
.bx-link:hover span { transform: translateX(5px); }
.bx-swap { position: absolute; right: 22px; top: 20px; display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 34px; letter-spacing: -1.5px; color: var(--text); opacity: .14; }
.bx-swap i { font-style: normal; color: var(--acc); opacity: 1; font-size: 26px; display: inline-block; animation: bxsw 3.2s ease-in-out infinite; }
@keyframes bxsw { 0%, 30% { transform: rotate(0); } 50%, 80% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
.bx:hover .bx-swap { opacity: .3; }
.bx-tags { position: absolute; right: 18px; top: 18px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.bx-tags span { font-size: 11.5px; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: var(--accbg); border: 1px solid var(--accln); color: var(--acc); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "a a" "b b" "c d" "e e" "f f"; gap: 10px; }
  .bx-a { min-height: 300px; }
}
@media (max-width: 560px) {
  .bx { padding: 18px; min-height: 0; border-radius: 20px; }
  .bx-c, .bx-d { padding: 16px; }
  .bx h3 { font-size: 16px; } .bx-a h3 { font-size: 24px; }
  .bx p { font-size: 13px; }
  .bx-ic { width: 32px; height: 32px; }
  .bx-swap, .bx-tags { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bx-swap i { animation: none; } }

/* flecha "Abajo" para que sigan bajando */
.apro-abajo { position: absolute; z-index: 3; left: 50%; bottom: clamp(82px, 10vh, 104px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; padding: 6px 14px; cursor: pointer; }
.apro-abajo span { opacity: .85; padding-left: .28em; }
.apro-abajo svg { width: 42px; height: 42px; padding: 8px; border-radius: 50%; border: 1.5px solid rgba(224,78,28,.7); fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(224,78,28,.35); animation: aproRebote 1.6s cubic-bezier(.45,0,.55,1) infinite; box-shadow: 0 0 0 0 rgba(224,78,28,.45); }
@keyframes aproRebote { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.apro-abajo::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 42px; height: 42px; margin-left: -21px; border-radius: 50%; border: 1.5px solid rgba(224,78,28,.7); animation: aproOnda 1.6s ease-out infinite; pointer-events: none; }
@keyframes aproOnda { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.apro-abajo:hover svg { background: rgba(224,78,28,.3); }
@media (prefers-reduced-motion: reduce) { .apro-abajo svg, .apro-abajo::after { animation: none; } }
