/* ============================================================
   features.css — Section "Planos" (Timeline) — Devsi
   ============================================================
   COMPATÍVEL com main.css:
   • font-size base: 62.5% (1rem = 10px)
   • Fonte: Satoshi
   • Paleta: identidade visual Devsi

   PALETA DOS PLANOS:
   • Starter   → cinza azulado  (neutro, acessível)
   • Essentials → teal  #1D9E75 (crescimento, confiança)
   • Premium   → amarelo-verde #d2df48 (exclusividade, marca)

   ANIMAÇÕES:
   • .tl-item começa invisível (opacity:0, translateY 40px)
   • JS adiciona .tl-item--visible via IntersectionObserver
   • Cada item atrasa 150ms em relação ao anterior
   ============================================================ */


/* ══════════════════════════════════════════════════════════
   SECTION
══════════════════════════════════════════════════════════ */

.features {
    width: 100%;
    background: #0f202b;
    position: relative;
}

.features .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5.6rem;
    padding-top: 5rem;
    padding-bottom: 8rem;
}


/* ══════════════════════════════════════════════════════════
   CABEÇALHO
══════════════════════════════════════════════════════════ */

.text-features {
    text-align: center;
    max-width: 64rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

.features-tag {
    font: 600 1.4rem/120% Satoshi, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1D9E75;
    display: inline-block;
    padding: 0.5rem 1.4rem;
    border: 1px solid rgba(29, 158, 117, 0.35);
    border-radius: 99px;
    background: rgba(29, 158, 117, 0.08);
}

.text-features h2 {
    font: 700 3.2rem/118% Satoshi, sans-serif;
    letter-spacing: -0.5px;
    color: #D0E1D7;
    margin: 0;
    text-wrap: balance;
}

.text-features h2 em {
    font-style: normal;
    color: #1D9E75;
}

.text-features p {
    font: 400 1.6rem/155% Satoshi, sans-serif;
    color: #CACACA;
    margin: 0;
    max-width: 56rem;
}


/* ══════════════════════════════════════════════════════════
   TRILHA VERTICAL — linha do tempo
══════════════════════════════════════════════════════════ */

.tl-track {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    max-width: 72rem;
}


/* Linha vertical conectando os nós
   Gradiente: cinza → teal → amarelo */

.tl-track::before {
    content: '';
    position: absolute;
    left: 2.75rem;
    top: 5.6rem;
    bottom: 5.6rem;
    width: 2px;
    background: linear-gradient( to bottom, rgba(199, 217, 208, 0.2) 0%, rgba(29, 158, 117, 0.6) 50%, rgba(210, 223, 72, 0.7) 100%);
}


/* ══════════════════════════════════════════════════════════
   ITEM DA TIMELINE
   Estado inicial: invisível (JS adiciona .tl-item--visible)
══════════════════════════════════════════════════════════ */

.tl-item {
    display: flex;
    gap: 2.4rem;
    align-items: flex-start;
    padding-bottom: 3.2rem;
    position: relative;
    /* Estado inicial — escondido para animação */
    opacity: 0;
    transform: translateY(4rem);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Estado visível — JS adiciona esta classe */

.tl-item--visible {
    opacity: 1;
    transform: translateY(0);
}


/* Delays escalonados por item */

.tl-item:nth-child(1) {
    transition-delay: 0ms;
}

.tl-item:nth-child(2) {
    transition-delay: 180ms;
}

.tl-item:nth-child(3) {
    transition-delay: 340ms;
}

.tl-item--last {
    padding-bottom: 0;
}


/* ══════════════════════════════════════════════════════════
   NÓS NUMERADOS
══════════════════════════════════════════════════════════ */

.tl-node {
    width: 5.6rem;
    height: 5.6rem;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 1.6rem/1 Satoshi, sans-serif;
    border: 2px solid;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tl-item:hover .tl-node {
    transform: scale(1.08);
}


/* Starter — cinza neutro */

.tl-node--starter {
    background: #152534;
    border-color: rgba(199, 217, 208, 0.3);
    color: rgba(199, 217, 208, 0.6);
}

.tl-item:hover .tl-node--starter {
    border-color: rgba(199, 217, 208, 0.6);
    box-shadow: 0 0 16px rgba(199, 217, 208, 0.12);
}


/* Essentials — teal */

.tl-node--essentials {
    background: rgba(29, 158, 117, 0.15);
    border-color: #1D9E75;
    color: #1D9E75;
}

.tl-item:hover .tl-node--essentials {
    box-shadow: 0 0 20px rgba(29, 158, 117, 0.3);
}


/* Premium — amarelo-verde */

.tl-node--premium {
    background: rgba(210, 223, 72, 0.12);
    border-color: #d2df48;
    color: #b8c83a;
}

.tl-item:hover .tl-node--premium {
    box-shadow: 0 0 20px rgba(210, 223, 72, 0.25);
}


/* ══════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════ */

.tl-card {
    flex: 1;
    border-radius: 1.6rem;
    border: 1px solid rgba(199, 217, 208, 0.1);
    background: #152534;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.tl-item:hover .tl-card {
    border-color: rgba(199, 217, 208, 0.22);
}


/* Essentials — borda teal */

.tl-card--essentials {
    border: 2px solid #1D9E75;
    background: #0f2820;
    box-shadow: 0 0 40px rgba(29, 158, 117, 0.1);
}

.tl-item:hover .tl-card--essentials {
    box-shadow: 0 8px 48px rgba(29, 158, 117, 0.2);
}


/* Premium — borda amarela */

.tl-card--premium {
    border: 2px solid #d2df48;
    background: #1a2610;
    box-shadow: 0 0 40px rgba(210, 223, 72, 0.08);
}

.tl-item:hover .tl-card--premium {
    box-shadow: 0 8px 48px rgba(210, 223, 72, 0.18);
}


/* ── Cabeçalho do card ── */

.tl-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 2.4rem 2.4rem 2rem;
    border-bottom: 1px solid rgba(199, 217, 208, 0.08);
}

.tl-card__head--essentials {
    background: rgba(29, 158, 117, 0.06);
    border-bottom-color: rgba(29, 158, 117, 0.18);
}

.tl-card__head--premium {
    background: rgba(210, 223, 72, 0.05);
    border-bottom-color: rgba(210, 223, 72, 0.15);
}


/* Nome do plano */

.tl-plan-name {
    font: 600 2rem/120% Satoshi, sans-serif;
    color: #c7d9d0;
    margin: 0 0 0.8rem;
    letter-spacing: -0.3px;
}

.tl-plan-name--essentials {
    color: #1D9E75;
}

.tl-plan-name--premium {
    color: #d2df48;
}


/* Preço */

.tl-price-label {
    font: 500 1.2rem/1 Satoshi, sans-serif;
    color: rgba(199, 217, 208, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.4rem;
}

.tl-price {
    font: 700 3rem/110% Satoshi, sans-serif;
    color: #ffffff;
    margin: 0;
    letter-spacing: -1px;
}

.tl-price-unit {
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(199, 217, 208, 0.45);
    letter-spacing: 0;
}


/* Badge recomendado */

.tl-badge {
    font: 600 1.2rem/1 Satoshi, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #063321;
    background: #1D9E75;
    padding: 0.5rem 1.2rem;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.4rem;
}


/* ── Para quem é ── */

.tl-target {
    font: 400 1.5rem/150% Satoshi, sans-serif;
    color: rgba(199, 217, 208, 0.5);
    margin: 0;
    padding: 1.4rem 2.4rem 0;
    font-style: italic;
}


/* ── Lista de features ── */

.tl-feats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    list-style: none;
    margin: 0;
    padding: 1.6rem 2.4rem 2rem;
    gap: 0;
}

.tl-feats li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font: 400 1.4rem/130% Satoshi, sans-serif;
    color: #c7d9d0;
    padding: 0.55rem 0;
}

.tl-feat--highlight {
    font-weight: 600 !important;
    color: #ffffff !important;
}


/* Dots */

.tl-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.tl-dot--gray {
    background: rgba(199, 217, 208, 0.3);
}

.tl-dot--teal {
    background: #1D9E75;
}

.tl-dot--yellow {
    background: #d2df48;
}


/* ── Botão CTA ── */

.tl-cta {
    display: block;
    margin: 0.8rem 2.4rem 2.4rem;
    padding: 1.3rem 0;
    border-radius: 99px;
    font: 600 1.4rem/1.2 Satoshi, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid rgba(199, 217, 208, 0.2);
    color: #c7d9d0;
    background: transparent;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tl-cta:hover {
    background: rgba(199, 217, 208, 0.07);
    border-color: rgba(199, 217, 208, 0.4);
    transform: translateY(-1px);
}


/* Essentials — teal sólido */

.tl-cta--teal {
    background: #1D9E75;
    color: #ffffff;
    border-color: #1D9E75;
}

.tl-cta--teal:hover {
    background: #22b887;
    border-color: #22b887;
    transform: translateY(-2px);
}


/* Premium — amarelo sólido */

.tl-cta--yellow {
    background: #d2df48;
    color: #2d3608;
    border-color: #d2df48;
}

.tl-cta--yellow:hover {
    background: #dcea50;
    border-color: #dcea50;
    transform: translateY(-2px);
}


/* ══════════════════════════════════════════════════════════
   LINK PARA SERVIÇOS
══════════════════════════════════════════════════════════ */

.features-services-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font: 500 1.5rem/1.2 Satoshi, sans-serif;
    color: #c7d9d0;
    text-decoration: none;
    padding: 1.4rem 2.8rem;
    border: 1px solid rgba(199, 217, 208, 0.15);
    border-radius: 99px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.features-services-link:hover {
    color: #1D9E75;
    border-color: rgba(29, 158, 117, 0.5);
    background: rgba(29, 158, 117, 0.06);
}

.features-services-link svg {
    width: 1.6rem;
    height: 1.6rem;
    stroke: currentColor;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.features-services-link:hover svg {
    transform: translate(2px, -2px);
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVO
══════════════════════════════════════════════════════════ */


/* Tablet */

@media (max-width: 860px) {
    .features .container {
        padding-top: 6.4rem;
        padding-bottom: 6.4rem;
        gap: 4.8rem;
    }
    .text-features h2 {
        font: 700 2.8rem/118% Satoshi, sans-serif;
    }
    .tl-track {
        max-width: 100%;
    }
    .tl-price {
        font: 700 2.8rem/110% Satoshi, sans-serif;
    }
}


/* Mobile — features em coluna única */

@media (max-width: 640px) {
    .features .container {
        padding-top: 5.6rem;
        padding-bottom: 5.6rem;
        gap: 4rem;
    }
    .text-features h2 {
        font: 700 2.6rem/118% Satoshi, sans-serif;
    }
    /* Nó menor no mobile */
    .tl-node {
        width: 4.4rem;
        height: 4.4rem;
        font-size: 1.4rem;
    }
    /* Linha vertical reposicionada */
    .tl-track::before {
        left: 2.15rem;
        top: 4.4rem;
        bottom: 4.4rem;
    }
    .tl-item {
        gap: 1.6rem;
    }
    .tl-item:nth-child(1) {
        transition-delay: 0ms;
    }
    .tl-item:nth-child(2) {
        transition-delay: 100ms;
    }
    .tl-item:nth-child(3) {
        transition-delay: 200ms;
    }
    /* Features em coluna única */
    .tl-feats {
        grid-template-columns: 1fr;
    }
    /* Padding interno menor */
    .tl-card__head {
        padding: 2rem 2rem 1.6rem;
    }
    .tl-target {
        padding: 1.2rem 2rem 0;
    }
    .tl-feats {
        padding: 1.4rem 2rem 1.6rem;
    }
    .tl-cta {
        margin: 0.6rem 2rem 2rem;
    }
    .tl-price {
        font: 700 2.6rem/110% Satoshi, sans-serif;
    }
    .tl-plan-name {
        font: 600 1.8rem/120% Satoshi, sans-serif;
    }
    /* Badge e nome lado a lado no mobile */
    .tl-card__head {
        flex-wrap: wrap;
        gap: 1.2rem;
    }
}


/* Mobile pequeno */

@media (max-width: 400px) {
    .features .container {
        padding-top: 4.8rem;
        padding-bottom: 4.8rem;
    }
    .text-features h2 {
        font: 700 2.4rem/118% Satoshi, sans-serif;
    }
    .text-features p {
        font: 400 1.5rem/155% Satoshi, sans-serif;
    }
    .tl-node {
        width: 4rem;
        height: 4rem;
        font-size: 1.3rem;
    }
    .tl-track::before {
        left: 1.95rem;
    }
    .tl-item {
        gap: 1.4rem;
    }
    .tl-card__head {
        padding: 1.8rem 1.6rem 1.4rem;
    }
    .tl-target,
    .tl-feats {
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }
    .tl-cta {
        margin-left: 1.6rem;
        margin-right: 1.6rem;
        font-size: 1.3rem;
    }
    .features-services-link {
        font-size: 1.4rem;
        padding: 1.2rem 2rem;
        text-align: center;
    }
}


/* ══════════════════════════════════════════════════════════
   BADGE DE COBERTURA — "Até X equipamentos"
══════════════════════════════════════════════════════════ */

.tl-card__badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
    flex-shrink: 0;
}

.tl-coverage {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font: 500 1.2rem/1 Satoshi, sans-serif;
    padding: 0.5rem 1rem;
    border-radius: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
}

.tl-coverage svg {
    width: 1.3rem;
    height: 1.3rem;
    flex-shrink: 0;
}


/* Cinza — Starter */

.tl-coverage--gray {
    color: rgba(199, 217, 208, 0.7);
    background: rgba(199, 217, 208, 0.07);
    border: 1px solid rgba(199, 217, 208, 0.15);
}


/* Teal — Essentials */

.tl-coverage--teal {
    color: #1D9E75;
    background: rgba(29, 158, 117, 0.1);
    border: 1px solid rgba(29, 158, 117, 0.25);
}


/* Amarelo — Premium */

.tl-coverage--yellow {
    color: #b8c83a;
    background: rgba(210, 223, 72, 0.08);
    border: 1px solid rgba(210, 223, 72, 0.2);
}


/* ══════════════════════════════════════════════════════════
   EFEITO DE BORDA CIRCULANDO — @keyframes conic sweep
   Usa um pseudo-elemento com conic-gradient animado
   que circula ao redor de cada card sutilmente
══════════════════════════════════════════════════════════ */


/* Wrapper de posicionamento para o efeito */

.tl-card {
    position: relative;
}


/* Pseudo-elemento de borda giratória — Starter */

.tl-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1.6rem;
    background: conic-gradient( from var(--angle, 0deg), transparent 0%, rgba(199, 217, 208, 0.18) 15%, transparent 30%);
    z-index: -1;
    animation: tl-border-spin 6s linear infinite;
}


/* Essentials — borda teal */

.tl-card--essentials::after {
    background: conic-gradient( from var(--angle, 0deg), transparent 0%, rgba(29, 158, 117, 0.45) 15%, transparent 30%);
    animation: tl-border-spin 5s linear infinite;
}


/* Premium — borda amarela */

.tl-card--premium::after {
    background: conic-gradient( from var(--angle, 0deg), transparent 0%, rgba(210, 223, 72, 0.4) 15%, transparent 30%);
    animation: tl-border-spin 4s linear infinite reverse;
}


/* Animação: gira --angle de 0 a 360deg */

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes tl-border-spin {
    from {
        --angle: 0deg;
    }
    to {
        --angle: 360deg;
    }
}


/* Fallback para navegadores sem suporte a @property
   (Firefox < 128 etc.) — usa rotate no transform */

@supports not (background: conic-gradient(from 1deg, red, blue)) {
    .tl-card::after,
    .tl-card--essentials::after,
    .tl-card--premium::after {
        display: none;
    }
}


/* Responsivo — badge de cobertura */

@media (max-width: 640px) {
    .tl-coverage {
        font-size: 1.1rem;
        padding: 0.4rem 0.9rem;
    }
    .tl-coverage svg {
        width: 1.2rem;
        height: 1.2rem;
    }
}