/* Provinet — Planes con túnel de fibra (Three.js + GSAP). Sección "Planes" con 3 categorías.
   Marcado y datos: src/scripts/plans-tunnel.js · Animación: src/scripts/fiber-tunnel.js
   Color de fondo de la página: variable --ft-bg en .ft-section (por defecto blanco). */

.ft-section { --ft-bg: #ffffff; --red: #e60012; --ink: #151923; --muted: #4d5a70; }
.ft-section, .ft-section * { box-sizing: border-box; }
.ft-section h2, .ft-section p { margin: 0; }
.ft-section .eyebrow { font: 800 .78rem 'Manrope', sans-serif; letter-spacing: .32em; color: #1b2740; text-transform: none; }
.ft-card h2 { font-family: 'Baloo 2', 'Manrope', sans-serif; font-weight: 800; letter-spacing: -.01em; text-transform: none; }
.ft-card .button { display: inline-block; border-radius: 999px; color: #fff; font: 800 .95rem 'Manrope', sans-serif; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border: 0; }

  /* ---------- Sección pineada (clara) ---------- */
  .ft-section { position: relative; height: 100vh; overflow: hidden; background: var(--ft-bg); }
  .ft-stage { position: absolute; inset: 0; }
  .ft-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  /* bordes que se funden con el blanco de la página: sin cortes entre intro, planes y cierre */
  .ft-vignette { position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(180deg, var(--ft-bg) 0%, transparent 16%, transparent 84%, var(--ft-bg) 100%),
      linear-gradient(90deg, color-mix(in srgb, var(--ft-bg) 90%, transparent) 0%, color-mix(in srgb, var(--ft-bg) 45%, transparent) 30%, transparent 58%); }

  /* ---------- Contenido 2D (jerarquía: título → precio → CTA → visual) ---------- */
  .ft-ui { position: absolute; inset: 0; display: grid; align-content: center; padding: 215px clamp(24px, 8vw, 130px) 0; pointer-events: none; }
  .ft-cards { position: relative; height: 470px; max-width: 580px; }
  .ft-card { position: absolute; inset: 0; visibility: hidden; opacity: 0; pointer-events: auto;
    display: flex; flex-direction: column; justify-content: center; padding: 36px 44px;
    border-radius: 30px; border: 1px solid rgba(230,0,18,.14);
    background: linear-gradient(160deg, rgba(255,255,255,.88), rgba(255,255,255,.7));
    -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
    box-shadow: 0 24px 60px rgba(21,25,35,.12), inset 0 1px 0 #fff; }
  .ft-card .eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
  .ft-card .eyebrow::before { content: ''; width: 3px; height: 16px; border-radius: 2px; background: var(--red); }
  .ft-card h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.02; margin-bottom: 14px; color: var(--ink); }
  .ft-card .price { font: 800 clamp(2.6rem, 4.6vw, 3.8rem) / 1 'Manrope', sans-serif; letter-spacing: -.05em; color: var(--red); }
  .ft-card .price small { font: 700 1.05rem 'DM Sans', sans-serif; letter-spacing: 0; color: var(--muted); }
  .ft-card .desc { color: #2b3750; margin: 16px 0 10px; line-height: 1.55; font-size: 1.08rem; font-weight: 500; }
  .ft-card .tv { font-size: .82rem; color: #6c778c; margin-bottom: 24px; }
  .ft-card .button { align-self: flex-start; margin: 0; padding: 15px 30px; box-shadow: 0 10px 28px rgba(230,0,18,.3);
    background: linear-gradient(180deg, #ff2a3c, #d40010); }

  /* Contador en tarjeta clara */
  .ft-hud { position: absolute; right: clamp(20px, 4vw, 60px); bottom: 34px; text-align: right; pointer-events: none;
    padding: 22px 30px 18px 34px; border-radius: 26px; border: 1px solid rgba(230,0,18,.14);
    background: linear-gradient(160deg, rgba(255,255,255,.88), rgba(255,255,255,.7));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(21,25,35,.12); }
  .ft-hud .num { font: 800 clamp(4rem, 9vw, 7rem) / .95 'Manrope', sans-serif; letter-spacing: -.05em;
    background: linear-gradient(180deg, #151923 20%, #4a556d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
  .ft-hud .unit { display: inline-block; margin-top: 8px; padding: 5px 14px; border-radius: 999px; background: var(--red); color: #fff; font: 800 .8rem 'Manrope', sans-serif; letter-spacing: .28em; box-shadow: 0 6px 16px rgba(230,0,18,.3); }
  .ft-dots { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
  .ft-dot { width: 26px; height: 3px; border-radius: 2px; background: rgba(21,25,35,.15); transition: background .3s; }
  .ft-dot.is-active { background: var(--red); }
  .ft-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: linear-gradient(90deg, #ff6b78, var(--red)); transform-origin: 0 50%; transform: scaleX(0); }

  /* ---------- Fallback CSS (sin WebGL / reduced motion / equipos modestos) ---------- */
  .ft-fallback .ft-stage::before {
    content: ''; position: absolute; inset: 0;
    background: url('assets/images/fibra-tunel.png') 70% 45% / cover no-repeat;
    transform: scale(calc(1.05 + var(--ft-p, 0) * .55));
    transform-origin: 78% 30%; filter: invert(1) sepia(1) saturate(5) hue-rotate(-35deg); opacity: .35;
  }

  /* ---------- Pestañas de categoría ---------- */
  .ft-tabs { position: absolute; top: 152px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 6px; padding: 6px;
    border-radius: 999px; background: rgba(255,255,255,.88); border: 1px solid rgba(230,0,18,.14); box-shadow: 0 10px 30px rgba(21,25,35,.1);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .ft-tab { appearance: none; border: 0; cursor: pointer; padding: 11px 24px; border-radius: 999px; background: transparent; color: #1b2740;
    font: 800 .84rem 'Manrope', sans-serif; letter-spacing: .04em; text-align: center; line-height: 1.15; transition: background .3s, color .3s, box-shadow .3s; }
  .ft-tab small { display: block; margin-top: 3px; font: 600 .68rem 'DM Sans', sans-serif; letter-spacing: .04em; opacity: .7; }
  .ft-tab:hover { background: rgba(230,0,18,.07); }
  .ft-tab.is-active { background: linear-gradient(180deg, #ff2a3c, #d40010); color: #fff; box-shadow: 0 8px 20px rgba(230,0,18,.35); }
  .ft-tab:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
  @media (max-width: 980px) {
    .ft-tabs { top: 84px; max-width: calc(100% - 24px); overflow-x: auto; }
    .ft-tab { padding: 9px 16px; white-space: nowrap; }
  }


  @media (max-width: 720px) {
    .ft-vignette { background: linear-gradient(180deg, var(--ft-bg) 0%, color-mix(in srgb, var(--ft-bg) 85%, transparent) 45%, color-mix(in srgb, var(--ft-bg) 30%, transparent) 100%); }
    .ft-ui { align-content: start; padding-top: 150px; }
    .ft-cards { height: 450px; }
    /* Tarjetas más compactas: las condiciones del cargo por conexión alargan el texto. */
    .ft-card { padding: 22px 20px; border-radius: 24px; }
    .ft-card .eyebrow { margin-bottom: 10px; }
    .ft-card h2 { margin-bottom: 8px; }
    .ft-card .desc { font-size: .95rem; line-height: 1.45; margin: 10px 0 8px; }
    .ft-card .tv { font-size: .74rem; line-height: 1.4; margin-bottom: 14px; }
    .ft-card .button { padding: 13px 24px; font-size: .85rem; }
    .ft-hud { bottom: 22px; }
  }
  @media (max-width: 340px) {
    .ft-cards { height: 470px; }
  }
