/* Acervo de acolhimento — página que reúne os seis acervos por fase da vida */

body.ah {
    --bg: #f7f3ec;
    --bg-alt: #efe8dc;
    --ink: #1f1b16;
    --muted: #6b6258;
    --line: rgba(31, 27, 22, 0.14);
    --c-pi: #86a867;
    --c-si: #ff7a1a;
    --c-ad: #b9a6f5;
    --c-ja: #2f4a34;
    --c-fa: #ffe45c;
    --c-ti: #6f96bf;
    --stripe: linear-gradient(90deg,
        var(--c-pi) 0 16.66%, var(--c-si) 16.66% 33.33%, var(--c-ad) 33.33% 50%,
        var(--c-ja) 50% 66.66%, var(--c-fa) 66.66% 83.33%, var(--c-ti) 83.33% 100%);
    margin: 0;
    background: var(--bg) !important;
    color: var(--ink);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.ah h1, .ah h2, .ah h3 {
    margin: 0;
    font-family: "DM Sans", system-ui, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: inherit !important;
}
.ah p { margin: 0; }
.ah a { color: inherit; }

.ah-title em,
.ah-h em {
    font-style: normal;
    background: var(--stripe) left 92% / 100% 0.14em no-repeat;
    padding-bottom: 0.04em;
}

.ah-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Capa ---------- */
.ah-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: clamp(540px, 82svh, 800px);
    background: var(--bg);
}
.ah-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: var(--stripe);
}
.ah-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 1rem;
    padding: 2rem 6% 0;
    font-size: 0.85rem;
    line-height: 1.3;
}
.ah-top b { display: block; }
.ah-top span { color: var(--muted); }
.ah-top a { font-weight: 700; text-decoration: none; }
.ah-top a:hover { text-decoration: underline; }
.ah-top > :last-child { justify-self: end; text-align: right; padding-right: 3.75rem; }

.ah-hero-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 6% 2.5rem;
}
.ah-title {
    max-width: 14ch;
    font-size: clamp(2.8rem, 7.4vw, 6.4rem) !important;
}
.ah-lead {
    max-width: 38rem;
    margin-top: 1.6rem !important;
    font-size: 1.1rem;
    color: var(--muted);
}

/* Linha da vida */
.ah-ruler { padding: 0 6% 3rem; }
.ah-ruler ol {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px -24px rgba(31, 27, 22, 0.5);
}
.ah-ruler a {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.2rem;
    min-height: 118px;
    padding: 1rem 1.1rem;
    text-decoration: none;
    transition: filter 0.2s, transform 0.2s;
}
.ah-ruler a:hover,
.ah-ruler a:focus-visible { filter: brightness(1.07); }
.ah-ruler b { font-size: clamp(1.4rem, 2.4vw, 2.1rem); line-height: 1; }
.ah-ruler span { font-size: 0.85rem; font-weight: 500; }
.ah-seg--pi a { background: #fdf5e2; color: #2f543a; }
.ah-seg--pi b { font-family: "Gilda Display", serif; font-weight: 400; }
.ah-seg--si a { background: #a9e0ff; color: #16277a; }
.ah-seg--si b { font-family: "Fredoka", sans-serif; font-weight: 700; color: #ff7a1a; text-shadow: 2px 2px 0 #fff; }
.ah-seg--ad a { background: #b9a6f5; color: #1d2f8f; }
.ah-seg--ad b { font-family: "Gloock", serif; font-weight: 400; }
.ah-seg--ja a { background: var(--c-ja) url("images/idades/ja-tex-verde.jpg") center / 300px; color: #f1ede2; }
.ah-seg--ja b { font-family: "Oswald", sans-serif; font-weight: 500; }
.ah-seg--fa a { background: #ffe45c; color: #161616; }
.ah-seg--fa b { font-family: "Courier Prime", monospace; letter-spacing: -0.04em; }
.ah-seg--ti a { background: linear-gradient(180deg, #a3c1dc, #c9dbeb); color: #1f3550; }
.ah-seg--ti b { font-family: "Instrument Serif", serif; font-weight: 400; }

/* ---------- Seções ---------- */
.ah-sec { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.ah-sec--alt { background: var(--bg-alt); }
.ah-wrap { width: min(1180px, 88%); margin: 0 auto; }
.ah-h { max-width: 18ch; font-size: clamp(2.1rem, 4.6vw, 3.6rem) !important; }
.ah-sub { max-width: 36rem; margin-top: 1rem !important; font-size: 1.05rem; color: var(--muted); }

/* ---------- Capas dos acervos ---------- */
.ah-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin: 3rem 0 0;
    padding: 0;
    list-style: none;
}
.ah-grid > li { display: flex; }
.ah-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 400px;
    padding: 1.6rem 1.6rem 1.5rem;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ah-card > * { position: relative; z-index: 1; }
.ah-card:hover,
.ah-card:focus-visible { transform: translateY(-4px); }
.ah-age {
    position: absolute !important;
    z-index: 0 !important;
    right: 0.2em;
    top: 2.6rem;
    font-style: normal;
    font-size: clamp(4.2rem, 6.2vw, 5.6rem);
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}
.ah-card small {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.ah-card h3 {
    margin-top: 0.45rem !important;
    font-size: 2.2rem !important;
    letter-spacing: -0.01em;
}
.ah-cover {
    display: block;
    width: calc(100% + 3.2rem);
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 10;
    margin: -1.6rem -1.6rem 1.3rem;
    object-fit: cover;
}
.ah-cover ~ .ah-age {
    top: 1rem;
    right: 1rem;
    z-index: 2 !important;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 1.05rem;
}
.ah-card .ah-go { margin-top: auto; }
.ah-card .ah-for { margin-bottom: 1.3rem !important; }
.ah-tag { margin-top: 0.4rem !important; font-size: 1.1rem; }
.ah-desc { margin-top: 0.9rem !important; font-size: 0.95rem; opacity: 0.85; }
.ah-for { margin-top: 0.35rem !important; font-size: 0.85rem; opacity: 0.7; }
.ah-go {
    align-self: flex-start;
    margin-top: 1.3rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 700;
}

/* 0–6 · livro de histórias em aquarela */
.ah-card--pi {
    border-radius: 26px;
    background: #fdf5e2;
    color: #2b2a24;
    box-shadow: 0 16px 34px -24px rgba(47, 60, 40, 0.6);
}
.ah-card--pi .ah-cover { object-position: 82% 70%; }
.ah-card--pi .ah-age { font-family: "Gilda Display", serif; background: #2f543a; color: #fdf5e2; }
.ah-card--pi small { color: #b5651d; }
.ah-card--pi h3 { font-family: "Gilda Display", serif !important; font-weight: 400 !important; color: #2f543a !important; }
.ah-card--pi .ah-tag { font-family: "Gilda Display", serif; font-size: 1.2rem; color: #2f543a; }
.ah-card--pi .ah-go { border-radius: 999px; background: #1f1f1c; color: #fdf5e2; }

/* 7–11 · céu azul, laranja e amarelo */
.ah-card--si {
    border-radius: 26px;
    background: #a9e0ff;
    color: #16277a;
    box-shadow: 0 16px 34px -24px rgba(22, 39, 122, 0.55);
}
.ah-card--si .ah-cover { object-position: 50% 30%; }
.ah-card--si .ah-age { font-family: "Fredoka", sans-serif; font-weight: 700; background: #ff7a1a; color: #fff; }
.ah-card--si small { color: #16277a; }
.ah-card--si h3 { font-family: "Fredoka", sans-serif !important; font-weight: 700 !important; color: #ff7a1a !important; text-shadow: 3px 3px 0 #fff; }
.ah-card--si .ah-tag { font-family: "Fredoka", sans-serif; font-weight: 600; }
.ah-card--si .ah-go { border-radius: 999px; background: #fbb33b; color: #16277a; box-shadow: 0 4px 0 #d98e17; }

/* 12–18 · céu, serifada, lilás e laranja */
.ah-card--ad {
    border-radius: 22px;
    background: #fff4e0;
    color: #1d2f8f;
    box-shadow: 0 16px 34px -24px rgba(29, 47, 143, 0.55);
}
.ah-card--ad .ah-cover { object-position: 50% 22%; }
.ah-card--ad .ah-age { font-family: "Gloock", serif; background: #b9a6f5; color: #1d2f8f; }
.ah-card--ad small { color: #d4560f; }
.ah-card--ad h3 { font-family: "Gloock", serif !important; font-weight: 400 !important; color: #2446c6 !important; font-size: 2.4rem !important; }
.ah-card--ad .ah-tag { font-family: "Gloock", serif; }
.ah-card--ad .ah-go { border-radius: 999px; background: #f26b1d; color: #fff; }

/* 19–29 · colagem de papel rasgado */
.ah-card--ja {
    border-radius: 6px;
    background: #f1ede2 url("images/idades/ja-tex-papel.jpg") center / cover;
    color: #1f2622;
    box-shadow: 0 14px 30px -22px rgba(40, 35, 20, 0.5);
}
.ah-card--ja .ah-cover {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 94% calc(100% - 2px), 87% calc(100% - 12px), 80% calc(100% - 3px), 72% calc(100% - 10px), 65% 100%, 57% calc(100% - 9px), 49% calc(100% - 2px), 41% calc(100% - 12px), 33% calc(100% - 4px), 25% calc(100% - 11px), 17% 100%, 9% calc(100% - 9px), 0 calc(100% - 3px));
}
.ah-card--ja .ah-age { font-family: "Oswald", sans-serif; font-weight: 500; background: #f4c23b; color: #1f2622; }
.ah-card--ja small { color: #6b6a5f; }
.ah-card--ja h3 { font-family: "Oswald", sans-serif !important; font-weight: 500 !important; text-transform: uppercase; letter-spacing: 0.01em; }
.ah-card--ja .ah-tag { color: #2f4a34; font-weight: 500; }
.ah-card--ja .ah-go { border-radius: 999px; background: #f4c23b; color: #1f2622; font-family: "Oswald", sans-serif; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

/* 30–59 · revista com moldura amarela */
.ah-card--fa {
    border: 10px solid #ffe45c;
    border-radius: 26px;
    background: #efece6;
    color: #161616;
}
.ah-card--fa .ah-cover { margin: -1.6rem -1.6rem 0; }
.ah-card--fa .ah-age { font-family: "Courier Prime", monospace; background: #ffe45c; color: #161616; }
.ah-card--fa small {
    margin: 0 -1.6rem 1rem;
    padding: 0.5rem 1.6rem;
    background: #ffe45c;
    font-family: "Courier Prime", monospace;
    color: #161616;
}
.ah-card--fa h3 { font-family: "Courier Prime", monospace !important; letter-spacing: -0.04em; }
.ah-card--fa .ah-tag { font-family: "Courier Prime", monospace; font-weight: 700; text-transform: uppercase; font-size: 0.95rem; }
.ah-card--fa .ah-go { border-radius: 999px; background: #161616; color: #fff; }

/* 60+ · céu azul e serifada alta */
.ah-card--ti {
    border-radius: 22px;
    background: linear-gradient(180deg, #a3c1dc 0%, #c9dbeb 45%, #eef4f9 100%);
    color: #1f3550;
    box-shadow: 0 16px 34px -24px rgba(31, 53, 80, 0.55);
}
.ah-card--ti .ah-cover { object-position: 50% 18%; }
.ah-card--ti .ah-age { font-family: "Instrument Serif", serif; background: #fffaf0; color: #1f3550; }
.ah-card--ti small { font-size: 0.85rem; letter-spacing: 0.04em; text-transform: none; color: #1f3550; }
.ah-card--ti h3 { font-family: "Instrument Serif", serif !important; font-weight: 400 !important; font-size: 2.7rem !important; }
.ah-card--ti .ah-tag { font-family: "Instrument Serif", serif; font-style: italic; font-size: 1.35rem; color: #b8432f; }
.ah-card--ti .ah-desc,
.ah-card--ti .ah-for { font-size: 1.02rem; opacity: 1; }
.ah-card--ti .ah-go { min-height: 48px; display: inline-flex; align-items: center; border-radius: 999px; background: #1f3550; color: #fff; font-size: 1rem; }

/* ---------- De quem cuidar ---------- */
.ah-who {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
    align-items: center;
}
.ah-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ah-chips a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 64px;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}
.ah-chips a::before {
    content: "";
    flex: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--dot);
}
.ah-chips a::after { content: "→"; margin-left: auto; color: var(--muted); }
.ah-chips a:hover,
.ah-chips a:focus-visible { border-color: var(--ink); transform: translateX(3px); }
.ah-chips li:nth-child(1) { --dot: var(--c-pi); }
.ah-chips li:nth-child(2) { --dot: var(--c-si); }
.ah-chips li:nth-child(3) { --dot: var(--c-ad); }
.ah-chips li:nth-child(4) { --dot: var(--c-ja); }
.ah-chips li:nth-child(5) { --dot: var(--c-fa); }
.ah-chips li:nth-child(6) { --dot: var(--c-ti); }
.ah-chips li:nth-child(5) a::before { box-shadow: inset 0 0 0 1.5px #111; }

/* ---------- Como funciona ---------- */
.ah-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 3rem 0 0;
    padding: 0;
    list-style: none;
}
.ah-steps li {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 1rem;
    border-top: 4px solid;
}
.ah-steps li:nth-child(1) { border-color: var(--c-pi); }
.ah-steps li:nth-child(2) { border-color: var(--c-si); }
.ah-steps li:nth-child(3) { border-color: var(--c-ad); }
.ah-steps li:nth-child(4) { border-color: var(--c-fa); }
.ah-steps li:nth-child(5) { border-color: var(--c-ti); }
.ah-steps b { font-size: 0.8rem; color: var(--muted); }
.ah-steps strong { font-size: 1.15rem; }
.ah-steps span { font-size: 0.92rem; color: var(--muted); }

/* ---------- Aviso ---------- */
.ah-alert {
    max-width: 44rem;
    margin: 0 auto;
    padding: 2.4rem 2.2rem;
    border-radius: 20px;
    background: var(--bg);
    text-align: center;
    box-shadow: 0 18px 40px -28px rgba(31, 27, 22, 0.5);
}
.ah-alert h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem) !important; }
.ah-alert p { margin-top: 0.9rem !important; color: var(--muted); }
.ah-alert b { color: var(--ink); }
.ah-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 44rem;
    margin: 1.4rem auto 0;
}
.ah-next a {
    display: block;
    padding: 1.3rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    text-decoration: none;
    transition: border-color 0.2s;
}
.ah-next a:hover,
.ah-next a:focus-visible { border-color: var(--ink); }
.ah-next span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ah-next h3 { margin: 0.35rem 0 0.3rem !important; font-size: 1.4rem !important; }
.ah-next p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Rodapé ---------- */
.ah-foot {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 2.2rem 6%;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}
.ah-foot b { display: block; color: var(--ink); }
.ah-foot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; }
.ah-foot a { font-weight: 700; color: var(--ink); text-decoration: none; }
.ah-foot a:hover { text-decoration: underline; }

.ah .site-ad-section { background: var(--bg); }

.ah a:focus-visible { outline: 3px solid var(--c-si); outline-offset: 3px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
    .ah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ah-ruler ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ah-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2rem; }
    .ah-who { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 620px) {
    .ah-top { grid-template-columns: 1fr 1fr; padding-top: 1.5rem; }
    .ah-top > a { display: none; }
    .ah-hero { min-height: 0; }
    .ah-hero-main { padding: 3rem 6% 2rem; }
    .ah-lead { font-size: 1rem; }
    .ah-ruler ol { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 14px; }
    .ah-ruler a { min-height: 92px; padding: 0.85rem 0.9rem; }
    .ah-grid { grid-template-columns: 1fr; gap: 1.3rem; }
    .ah-card { min-height: 360px; }
    .ah-chips { grid-template-columns: 1fr; }
    .ah-steps { grid-template-columns: 1fr; }
    .ah-next { grid-template-columns: 1fr; }
    .ah-alert { padding: 2rem 1.3rem; }
    .ah-foot { grid-template-columns: 1fr; text-align: center; }
    .ah-foot nav { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .ah-card, .ah-chips a, .ah-ruler a { transition: none; }
    .ah-card:hover, .ah-chips a:hover { transform: none; }
}
