.hero__buttons { align-items: center; gap: .85rem; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.hero__buttons::before, .hero__buttons::after { display: none; content: none; }
.hero__buttons .btn { min-height: 60px; justify-content: center; gap: .85rem; border-radius: 17px; font-weight: 700; letter-spacing: -.01em; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease; }
.hero__button-primary { min-width: 218px; color: #fff; background: linear-gradient(115deg, #5122d6 0%, #7042ed 100%); border: 1px solid rgba(255,255,255,.12); box-shadow: none; }
.hero__button-primary:hover { color: #fff; background: linear-gradient(115deg, #4720c2 0%, #6235df 100%); box-shadow: none; transform: translateY(-2px); }
.hero__button-icon { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -.55rem; color: var(--primary); background: #fff; border-radius: 50%; box-shadow: none; transition: transform .22s ease; }
.hero__button-primary:hover .hero__button-icon { transform: translateX(3px); }
.hero__button-secondary { min-width: 218px; color: var(--primary); background: rgba(255,255,255,.94); border: 1px solid rgba(var(--primary-rgb),.24); box-shadow: none; }
.hero__button-secondary:hover { color: var(--primary-dark); background: #fff; border-color: rgba(var(--primary-rgb),.58); box-shadow: none; transform: translateY(-2px); }
.hero__button-secondary > i { color: var(--primary); font-size: .82rem; transition: transform .22s ease; }
.hero__button-secondary:hover > i { transform: translate(2px,-2px); }
.hero__buttons .btn:focus-visible { outline: 3px solid rgba(var(--primary-rgb),.42); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
    .hero__buttons .btn, .hero__button-icon, .hero__button-secondary > i { transition: none; }
}

.home-stats { position: relative; z-index: 2; padding: 1.8rem 0 1.15rem; background: linear-gradient(180deg, #fff 0%, #fbfaff 48%, #f7f6fa 100%); }
.home-stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.home-stat { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: center; column-gap: 1rem; row-gap: .12rem; min-height: 108px; padding: 1.25rem; background: var(--white); border: 1px solid var(--border-lighter); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.home-stat__icon { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; color: var(--primary); background: rgba(var(--primary-rgb),.09); border-radius: 15px; font-size: 1.1rem; }
.home-stat__value { color: var(--dark); font: 800 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--font-heading); font-variant-numeric: tabular-nums; }
.home-stat__label { color: var(--medium-gray); font-size: .82rem; line-height: 1.35; }
html[data-theme="dark"] .hero__button-primary { color: #fff; background: linear-gradient(120deg, #704ce0, #8969f2); box-shadow: 0 12px 25px rgba(0,0,0,.25); }
html[data-theme="dark"] .hero__button-primary:hover { background: linear-gradient(120deg, #7957e6, #967af4); }
html[data-theme="dark"] .hero__button-icon { color: #32176f; background: #fff; }
html[data-theme="dark"] .hero__button-secondary { color: #d6c9ff; background: rgba(32,29,41,.78); border-color: #51476a; }
html[data-theme="dark"] .hero__button-secondary:hover { color: #fff; background: #292435; border-color: #9a7cf0; }
html[data-theme="dark"] .hero__button-secondary > i { color: #c4adff; }
html[data-theme="dark"] .home-stat { color: var(--ui-text); background: var(--ui-surface); border-color: var(--ui-border); }
html[data-theme="dark"] .home-stat__value { color: var(--dark); }
html[data-theme="dark"] .home-stat__label { color: var(--ui-text-muted); }
html[data-theme="dark"] .home-stat__icon { color: #c4adff; background: rgba(168,139,255,.14); }

.home-pillars { padding-top: 2.25rem; padding-bottom: 3rem; background: linear-gradient(180deg, #f7f6fa 0%, #f5f4f8 58%, #fff 100%); }
.home-pillars__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.home-pillar {
    position: relative;
    min-height: 208px;
    padding: 1.5rem;
    overflow: hidden;
    color: var(--dark-text);
    background: var(--white);
    border: 1px solid var(--border-lighter);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.home-pillar:hover { transform: translateY(-4px); border-color: rgba(var(--primary-rgb), .32); box-shadow: var(--shadow-md); }
.home-pillar__number { position: absolute; top: 1rem; right: 1.15rem; color: var(--medium-gray); opacity: .45; font: 700 .75rem var(--font-heading); letter-spacing: .08em; }
.home-pillar__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem; color: var(--primary); background: rgba(var(--primary-rgb), .09); border-radius: 13px; font-size: 1.05rem; }
.home-pillar h2 { margin: 0 0 .45rem; color: var(--dark); font: 700 1rem/1.4 var(--font-heading); }
.home-pillar p { margin: 0; color: var(--medium-gray); font-size: .9rem; line-height: 1.65; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.home-projects .home-section-heading { display: block; text-align: center; }
.home-projects .home-section-heading > div { width: 100%; text-align: center; }
.home-projects .home-section-heading .section__label { justify-content: center; }
.home-projects .home-section-heading .section__description { max-width: 600px; margin-inline: auto; }
.home-section-heading .section__header { margin-bottom: 0; }
.home-section-heading .section__title { margin-bottom: .4rem; }
.home-section-heading .section__description { margin: 0; }
.home-projects__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; margin-top: 2.25rem; }
.home-projects__footer { display: flex; justify-content: center; margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.home-projects__button { min-height: 56px; gap: .9rem; padding: .5rem .65rem .5rem 1.4rem; border: 1px solid rgba(var(--primary-rgb), .35); box-shadow: 0 10px 26px rgba(var(--primary-rgb), .22), inset 0 1px 0 rgba(255,255,255,.16); transition: transform .22s ease, box-shadow .22s ease, background .22s ease; }
.home-projects__button:hover { transform: translateY(-3px); box-shadow: 0 15px 32px rgba(var(--primary-rgb), .3), inset 0 1px 0 rgba(255,255,255,.18); }
.home-projects__button-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--primary); background: #fff; border-radius: 50%; transition: transform .22s ease; }
.home-projects__button:hover .home-projects__button-icon { transform: translateX(3px); }
.home-projects__button:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .45); outline-offset: 4px; }
.home-project-card { overflow: hidden; color: var(--dark-text); background: var(--white); border: 1px solid var(--border-lighter); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); transition: transform .25s ease, box-shadow .25s ease; }
.home-project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.home-project-card__image { position: relative; display: block; height: 220px; overflow: hidden; background: var(--lighter-gray); }
.home-project-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.home-project-card:hover .home-project-card__image img { transform: scale(1.04); }
.home-project-card__image > span { position: absolute; left: 1rem; bottom: 1rem; padding: .35rem .7rem; color: var(--primary-dark); background: var(--white); border-radius: 999px; font-size: .72rem; font-weight: 700; }
.home-project-card__body { padding: 1.25rem 1.35rem 1.35rem; }
.home-project-card__body h3 { margin: 0 0 .45rem; color: var(--dark); font: 700 1.05rem/1.4 var(--font-heading); }
.home-project-card__body p { min-height: 3.1em; margin: 0 0 1rem; color: var(--medium-gray); font-size: .9rem; line-height: 1.65; }
.home-project-card__link { display: inline-flex; align-items: center; gap: .55rem; color: var(--primary); font-size: .88rem; font-weight: 700; }
.home-project-card__link:hover { gap: .75rem; color: var(--primary-dark); }
.home-projects__empty { display: grid; justify-items: center; gap: .85rem; margin-top: 2rem; padding: 2.5rem 1.25rem; color: var(--medium-gray); background: var(--white); border: 1px dashed var(--border-light); border-radius: var(--radius-lg); text-align: center; }
.home-projects__empty > i { color: var(--primary); font-size: 1.6rem; }
.home-projects__empty p { margin: 0; }
.home-process__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.home-process-card { position: relative; min-height: 220px; padding: 1.65rem; background: var(--white); border: 1px solid var(--border-lighter); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.home-process-card__step { position: absolute; top: 1.35rem; right: 1.4rem; color: var(--primary); font: 800 .8rem var(--font-heading); letter-spacing: .08em; }
.home-process-card > i { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1.35rem; color: var(--primary); background: rgba(var(--primary-rgb), .09); border-radius: 14px; font-size: 1.1rem; }
.home-process-card h3 { margin: 0 0 .55rem; color: var(--dark); font: 700 1.05rem/1.4 var(--font-heading); }
.home-process-card p { margin: 0; color: var(--medium-gray); font-size: .92rem; line-height: 1.7; }
.home-cta { padding-block: clamp(2.25rem, 4vw, 3.5rem); }
.home-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.75rem, 4vw, 3.25rem); color: #fff; background: linear-gradient(120deg, #29115f, #5427db 65%, #7652e8); border-radius: var(--radius-2xl); box-shadow: 0 18px 55px rgba(84,39,219,.2); }
.home-cta__eyebrow { display: block; margin-bottom: .55rem; color: #d9ceff; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.home-cta__inner h2 { margin: 0 0 .55rem; color: #fff; font: 800 clamp(1.5rem, 3vw, 2.25rem)/1.2 var(--font-heading); }
.home-cta__inner p { max-width: 620px; margin: 0; color: rgba(255,255,255,.82); }
.home-cta__inner .home-cta__button { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-width: 250px; min-height: 70px; padding: .75rem 1rem .75rem 1.75rem; overflow: hidden; color: #34156e; background: linear-gradient(115deg, #fff 0%, #f5efff 52%, #fff 100%); border: 1px solid rgba(255,255,255,.9); border-radius: 999px; box-shadow: 0 12px 28px rgba(24,8,68,.24), inset 0 1px 0 rgba(255,255,255,.95); font-weight: 800; transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.home-cta__inner .home-cta__button::before { position: absolute; z-index: -1; inset: -60% auto -60% -30%; width: 28%; content: ""; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); transform: rotate(22deg) translateX(-220%); transition: transform .65s ease; }
.home-cta__button-icon { display: grid; place-items: center; width: 46px; height: 46px; color: #fff; background: linear-gradient(135deg, #4219ae, #7949f5); border-radius: 50%; box-shadow: 0 5px 14px rgba(84,39,219,.35); transition: transform .25s ease; }
.home-cta__inner .home-cta__button:hover { color: #25104f; background: #fff; box-shadow: 0 18px 40px rgba(24,8,68,.32), 0 0 0 6px rgba(255,255,255,.12); transform: translateY(-4px) scale(1.02); }
.home-cta__inner .home-cta__button:hover::before { transform: rotate(22deg) translateX(700%); }
.home-cta__inner .home-cta__button:hover .home-cta__button-icon { transform: translateX(3px) rotate(-35deg); }
.home-cta__button:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
html[data-theme="dark"] .home-stats { background: linear-gradient(180deg, #100e16 0%, #14111d 50%, #17141e 100%); }
html[data-theme="dark"] .home-pillars { background: linear-gradient(180deg, #17141e 0%, #191620 60%, #100e16 100%) !important; }
html[data-theme="dark"] .home-process { background: linear-gradient(180deg, #17141e 0%, #191620 50%, #100e16 100%) !important; }

html[data-theme="dark"] .home-pillar,
html[data-theme="dark"] .home-project-card,
html[data-theme="dark"] .home-process-card,
html[data-theme="dark"] .home-projects__empty { color: var(--ui-text); background: var(--ui-surface); border-color: var(--ui-border); }
html[data-theme="dark"] .home-pillar h2,
html[data-theme="dark"] .home-project-card__body h3,
html[data-theme="dark"] .home-process-card h3 { color: var(--dark); }
html[data-theme="dark"] .home-pillar p,
html[data-theme="dark"] .home-project-card__body p,
html[data-theme="dark"] .home-process-card p,
html[data-theme="dark"] .home-projects__empty p { color: var(--ui-text-muted); }
html[data-theme="dark"] .home-project-card__image { background: var(--ui-surface-raised); }
html[data-theme="dark"] .home-project-card__image > span { color: #201633; background: #e8ddff; }
html[data-theme="dark"] .home-cta__inner { background: linear-gradient(120deg, #201338, #4930a0 65%, #6245be); }

@media (max-width: 900px) {
    .home-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-pillars__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-project-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .home-stats { padding: 1.25rem 0 .75rem; }
    .home-stats__grid { gap: .7rem; }
    .home-stat { min-height: 96px; grid-template-columns: 1fr; justify-items: start; row-gap: .45rem; padding-block: 1rem; padding-inline: .9rem; }
    .home-stat__icon { grid-row: auto; width: 36px; height: 36px; border-radius: 11px; font-size: .9rem; }
    .home-stat__value { font-size: 1.45rem; }
    .home-stat__label { font-size: .75rem; }
    .hero__buttons { gap: .7rem; }
    .hero__buttons .btn { min-width: 0; min-height: 54px; padding: .85rem 1.15rem; border-radius: 14px; }
    .hero__button-primary,
    .hero__button-secondary { flex: 1 1 100%; }
    .home-pillars__grid,
    .home-projects__grid,
    .home-process__grid { grid-template-columns: 1fr; }
    .home-pillar { min-height: 0; }
    .home-project-card:last-child:nth-child(odd) { grid-column: auto; }
    .home-project-card__image { height: 205px; }
    .home-section-heading,
    .home-cta__inner { align-items: flex-start; flex-direction: column; }
    .home-projects .home-section-heading > div { width: 100%; }
    .home-projects__footer { margin-top: 1.5rem; }
    .home-projects__button { width: min(100%, 280px); justify-content: space-between; }
    .home-process-card { min-height: 0; }
    .home-cta { padding-block: 2rem; }
    .home-cta__inner { gap: 1.25rem; }
    .home-cta__inner .btn { width: 100%; justify-content: center; }
    .home-cta__inner .home-cta__button { min-height: 64px; justify-content: space-between; padding-inline: 1.25rem; text-align: left; }
    .home-cta__button > span:first-child { flex: 1 1 auto; text-align: left; }
}

/* Ajustes para telemóveis estreitos e zoom elevado do navegador. */
@media (max-width: 640px) {
    .hero { padding: clamp(1.5rem, 7vw, 2.5rem) 0 clamp(2rem, 9vw, 3rem); }
    .hero__content { width: 100%; min-width: 0; }
    .hero__title {
        max-width: 100%;
        font-size: clamp(2rem, 8.6vw, 3rem);
        line-height: 1.12;
        letter-spacing: -.045em;
        overflow-wrap: anywhere;
    }
    .hero__title .hero__rotating-word {
        max-width: 100%;
        vertical-align: baseline;
    }
    .hero__title .hero__rotating-word::after { bottom: 2px; height: .16em; }
    .hero__description { max-width: 34rem; font-size: 1rem; line-height: 1.65; }
    .hero__buttons { width: 100%; flex-direction: row; flex-wrap: nowrap; gap: .55rem; }
    .hero__buttons .btn { flex: 1 1 0; width: 0; min-width: 0; min-height: 52px; padding: .55rem .5rem; gap: .35rem; border-radius: 13px; font-size: clamp(.72rem, 3.1vw, .9rem); line-height: 1.15; white-space: normal; }
    .hero__button-primary,
    .hero__button-secondary { flex: 1 1 0; }
    .hero__button-icon { width: 25px; height: 25px; flex: 0 0 25px; margin-right: -.2rem; }
    .hero__button-secondary > i { flex: 0 0 auto; font-size: .72rem; }

    .home-stat { min-height: 0; padding: 1rem; }
    .home-stat__value { font-size: clamp(1.35rem, 6vw, 1.7rem); }
    .home-stat__label { font-size: .82rem; }

    .home-cta { padding-block: 1.5rem; }
    .home-cta__inner { padding: clamp(1.35rem, 6vw, 2rem); border-radius: 22px; }
    .home-cta__inner h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
    .home-cta__inner p { font-size: 1rem; line-height: 1.6; }
    .home-cta__inner .home-cta__button {
        box-sizing: border-box; align-self: center; flex: 0 0 auto; width: min(100%, 230px); max-width: 230px; min-width: 0; min-height: 52px; max-height: 56px; gap: .45rem;
        padding: .45rem .7rem .45rem .9rem; font-size: clamp(.88rem, 4vw, .98rem); line-height: 1.2; white-space: nowrap;
    }
    .home-cta__button-icon { width: 36px; height: 36px; flex: 0 0 36px; }

    .adn-banner { padding: 3.25rem 0; }
    .adn-banner__inner { gap: 1.25rem; padding-inline: 1.25rem; }
    .adn-banner__text { font-size: clamp(1rem, 4.5vw, 1.25rem); line-height: 1.55; }
}

@media (max-width: 380px) {
    .home-stats__grid { grid-template-columns: 1fr 1fr; gap: .55rem; }
    .home-stat { padding: .85rem; }
    .home-stat__label { font-size: .75rem; }
    .hero__title { font-size: clamp(1.8rem, 8.2vw, 2.3rem); }
    .hero__buttons { gap: .4rem; }
    .hero__buttons .btn { min-height: 48px; padding-inline: .35rem; gap: .25rem; font-size: .7rem; }
    .hero__button-icon { width: 22px; height: 22px; flex-basis: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero__rotating-word [data-rotating-item] { transition: none; }
    .home-pillar,
    .home-project-card,
    .home-project-card__image img { transition: none; }
    .home-cta__inner .home-cta__button,
    .home-cta__button-icon { transition: none; }
    .home-cta__inner .home-cta__button::before { display: none; }
}
