/* Landing principal: só o que é exclusivo dela. A base está em site.css. */

/* Formas reaproveitadas pela intro e pelo hero; não ocupam espaço na página. */
.defs {
    position: absolute;
}

/* Intro: o anel se desenha, o "m" aparece, o círculo menor fecha a abertura e a cortina sobe.
   Só aparece quando o <head> marca o <html> com .intro-play (uma vez por sessão
   e nunca com movimento reduzido). Sem essa classe, a página abre direto. */

.intro {
    display: none;
}

.intro-play .intro {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--bg) var(--bg-gradient);
    box-shadow: 0 30px 60px rgba(4, 10, 18, 0.5);
    animation: intro-out 0.7s cubic-bezier(0.76, 0, 0.24, 1) 1.75s forwards;
}

.intro-stage {
    display: grid;
    justify-items: center;
}

.intro-mark {
    width: clamp(132px, 24vw, 196px);
    overflow: visible;
}

.intro-word {
    margin-top: 30px;
    font-family: var(--display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.intro-word b {
    color: var(--accent);
    font-weight: inherit;
}

.intro-line {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.intro-play .intro .mark-ring {
    stroke-dasharray: 1 1.2;
    stroke-dashoffset: 1.1;
    animation: mark-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.15s forwards;
}

.intro-play .intro .mark-m {
    opacity: 0;
    animation: mark-fade 0.5s ease 0.5s forwards;
}

.intro-play .intro .mark-dot {
    transform: scale(0);
    transform-box: fill-box;
    transform-origin: center;
    animation: mark-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.95s forwards;
}

.intro-play .intro-word,
.intro-play .intro-line {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 0.5s var(--ease-out) 0.95s forwards;
}

.intro-play .intro-line {
    animation-delay: 1.08s;
}

/* Quem clica, rola ou aperta uma tecla pula a intro. */
.intro-play .intro.is-skipped {
    opacity: 0;
    animation: none;
    transition: opacity 0.25s ease;
}

@keyframes intro-out {
    to {
        transform: translateY(-100%);
    }
}

/* Hero */

.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(56px, 9vw, 128px) clamp(48px, 7vw, 96px);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.hero h1 {
    margin-top: 22px;
    font-size: clamp(2.3rem, 4.5vw, 3.7rem);
    line-height: 1.1;
}

.hero .lead {
    margin-top: 26px;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

.hero .actions {
    margin-top: 38px;
}

/* Lado direito do hero: a marca e, sobre ela, um cartão de rotina */
.hero-visual {
    justify-self: end;
    width: 100%;
    max-width: 450px;
}

.hero-mark {
    width: 80%;
    margin-left: auto;
    overflow: visible;
}

/* Pulso que sai do círculo menor */
.mark-ping {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.5px;
    vector-effect: non-scaling-stroke;
    opacity: 0;
}

.mark-ring {
    fill: none;
    stroke: var(--text);
    stroke-width: 7.7;
    stroke-linecap: round;
}

.mark-dot {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
}

.mark-m {
    fill: var(--accent);
}

/* As tarefas começam concluídas no HTML; o home.js refaz o ciclo quando há movimento permitido. */
.routine {
    position: relative;
    width: min(100%, 276px);
    margin-top: -19%;
    padding: 16px 18px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    font-size: 0.85rem;
    line-height: 1.4;
}

.routine-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--display);
    font-size: 0.95rem;
    font-weight: 700;
}

.routine-title span {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.routine ul {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.routine li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-block: 9px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    transition: color 0.4s ease;
}

.routine li::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border: 2px solid var(--soft);
    border-radius: 50%;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.routine li em {
    margin-left: auto;
    color: var(--accent);
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.routine li.is-done {
    color: var(--text);
}

.routine li.is-done::before {
    border-color: var(--accent);
    background: var(--accent);
}

.routine li.is-done em {
    opacity: 1;
}

/* Entrada do hero: o anel se desenha, o círculo menor fecha a abertura e o cartão sobe. */
@media (prefers-reduced-motion: no-preference) {
    .hero-mark .mark-ring {
        stroke-dasharray: 1 1.2;
        stroke-dashoffset: 1.1;
        animation: mark-draw 1.3s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
    }

    .hero-mark .mark-m {
        opacity: 0;
        animation: mark-fade 0.7s ease 0.7s forwards;
    }

    .hero-mark .mark-dot {
        transform: scale(0);
        transform-box: fill-box;
        transform-origin: center;
        animation: mark-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s forwards;
    }

    .hero-mark .mark-ping {
        transform-box: fill-box;
        transform-origin: center;
        animation: mark-ping 4.5s ease-out 2.4s infinite;
    }

    .routine {
        opacity: 0;
        transform: translateY(14px);
        animation: rise 0.7s var(--ease-out) 1.1s forwards;
    }

    /* Com a intro na frente, a marca do hero já chega pronta (ela acabou de se desenhar lá);
       só o cartão e o pulso esperam a cortina subir. */
    .intro-play .hero-mark .mark-ring {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        animation: none;
    }

    .intro-play .hero-mark .mark-m {
        opacity: 1;
        animation: none;
    }

    .intro-play .hero-mark .mark-dot {
        transform: none;
        animation: none;
    }

    .intro-play .hero-mark .mark-ping {
        animation-delay: 3s;
    }

    .intro-play .routine {
        animation-delay: 1.95s;
    }
}

@keyframes mark-ping {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }

    45%,
    100% {
        opacity: 0;
        transform: scale(2.8);
    }
}

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes mark-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes mark-fade {
    to {
        opacity: 1;
    }
}

@keyframes mark-pop {
    to {
        transform: scale(1);
    }
}

/* Projetos */

.projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.projects .project-featured {
    grid-column: 1 / -1;
}

.projects-more {
    margin-top: 32px;
}

/* Processo: a numeração existe porque a ordem das etapas importa */

.steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding: 0 0 44px 76px;
    counter-increment: step;
}

.steps li:last-child {
    padding-bottom: 0;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    top: -8px;
    left: 0;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 48px;
    bottom: 18px;
    left: 22px;
    width: 2px;
    border-radius: 2px;
    background: var(--line);
}

.steps h3 {
    font-size: 1.5rem;
}

.step-scope {
    margin-top: 6px;
    font-size: 0.92rem;
    font-weight: 500;
}

.step-scope + p {
    margin-top: 12px;
    color: var(--muted);
}

/* Dúvidas */

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq details:first-child {
    border-top: 1px solid var(--line);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 24px;
    font-family: var(--display);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

/* Sinal de + que vira − ao abrir */
.faq summary::after {
    content: "";
    flex: none;
    width: 14px;
    height: 14px;
    background:
        linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat,
        linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat;
    transition: background-size 0.2s ease;
}

.faq details[open] summary::after {
    background-size: 100% 2px, 2px 0;
}

.faq details p {
    max-width: 58ch;
    padding-bottom: 26px;
    color: var(--muted);
}

/* A resposta abre com transição nos navegadores que já animam <details>; nos outros, abre direto. */
@media (prefers-reduced-motion: no-preference) {
    @supports (interpolate-size: allow-keywords) {
        .faq details {
            interpolate-size: allow-keywords;
        }

        .faq details::details-content {
            block-size: 0;
            overflow: hidden;
            transition: block-size 0.35s var(--ease-out), content-visibility 0.35s allow-discrete;
        }

        .faq details[open]::details-content {
            block-size: auto;
        }
    }
}

/* Responsivo */

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    /* No celular a marca já está no cabeçalho; fica só o cartão, depois do texto. */
    .hero-visual {
        justify-self: start;
        max-width: 420px;
    }

    .hero-visual::before,
    .hero-mark {
        display: none;
    }

    .routine {
        width: 100%;
        margin-top: 0;
    }

    .projects {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .steps li {
        padding-left: 62px;
    }
}
