/* ==========================================================================
   Areias Technology · design system
   Paleta extraída das logos:
   navy  #0F2A43 / #1D4E77   ·   areia #FBE3B5 / #F2C879 / #E8A94E
   fogo  #F59E0B / #EA580C / #C2410C
   ========================================================================== */

:root {
    --navy-950: #081726;
    --navy-900: #0F2A43;
    --navy-800: #123253;
    --navy-700: #1D4E77;

    --sand-100: #FDF7EA;
    --sand-150: #FAF1DE;
    --sand-200: #FBE3B5;
    --sand-300: #F2C879;
    --gold-500: #E8A94E;
    --amber-500: #F59E0B;
    --orange-600: #EA580C;
    --orange-700: #C2410C;

    --text-light: #F4ECDD;
    --text-light-muted: #A9BACB;
    --text-dark: #0F2A43;
    --text-dark-muted: #47617A;

    --grad-brand: linear-gradient(92deg, var(--sand-300) 0%, var(--gold-500) 45%, var(--orange-600) 100%);

    --font-display: "Space Grotesk", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Consolas", monospace;

    --container: 1120px;
    --radius: 16px;
    --header-h: 72px;
}

/* ---------- reset ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--navy-950);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.12;
    font-weight: 600;
}

:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(var(--container), 100% - 3rem);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--gold-500);
    color: var(--navy-950);
    border-radius: 0 0 8px 8px;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

.grad-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- header ---------- */

.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--header-h);
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
    border-bottom: 1px solid transparent;
}

.header.is-scrolled {
    background: rgba(8, 23, 38, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: rgba(232, 169, 78, .14);
    box-shadow: 0 8px 30px rgba(3, 10, 18, .35);
}

.header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.brand__mark {
    width: 42px;
    height: auto;
}

.brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .14em;
    font-size: .95rem;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__suffix {
    font-size: .52rem;
    font-weight: 500;
    letter-spacing: .42em;
    color: var(--gold-500);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: .92rem;
    font-weight: 500;
}

.nav__list a:not(.nav__cta) {
    position: relative;
    padding: .35rem 0;
    color: var(--text-light-muted);
    transition: color .2s ease;
}

.nav__list a:not(.nav__cta)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--grad-brand);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.nav__list a:not(.nav__cta):hover {
    color: var(--text-light);
}

.nav__list a:not(.nav__cta):hover::after {
    transform: scaleX(1);
}

.nav__cta {
    padding: .55rem 1.25rem;
    border-radius: 999px;
    background: var(--grad-brand);
    color: var(--navy-950);
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease;
}

.nav__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(234, 88, 12, .35);
}

.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid rgba(232, 169, 78, .3);
    border-radius: 10px;
    cursor: pointer;
}

.nav__toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--sand-300);
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- botões ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn--primary {
    background: var(--grad-brand);
    color: var(--navy-950);
    box-shadow: 0 8px 24px rgba(234, 88, 12, .28);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(234, 88, 12, .42);
}

.btn--ghost {
    border: 1px solid rgba(242, 200, 121, .45);
    color: var(--sand-200);
}

.btn--ghost:hover {
    border-color: var(--gold-500);
    background: rgba(232, 169, 78, .08);
    transform: translateY(-3px);
}

/* ---------- hero ---------- */

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 4rem) 0 14rem;
    background:
        radial-gradient(ellipse 60% 45% at 70% 8%, rgba(29, 78, 119, .55), transparent 70%),
        var(--navy-950);
    overflow: hidden;
}

.hero__glow {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(242, 200, 121, .1) 1px, transparent 1.6px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__tag {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem 1.1rem;
    border: 1px solid rgba(232, 169, 78, .35);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--sand-200);
    background: rgba(15, 42, 67, .5);
    margin-bottom: 1.75rem;
}

.hero__tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-500);
    box-shadow: 0 0 0 0 rgba(232, 169, 78, .6);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 169, 78, .55);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(232, 169, 78, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(232, 169, 78, 0);
    }
}

.hero__title {
    font-size: clamp(2.5rem, 6.4vw, 4.6rem);
    font-weight: 700;
    letter-spacing: -.02em;
    max-width: 16ch;
}

.hero__subtitle {
    margin-top: 1.5rem;
    max-width: 56ch;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-light-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.hero__metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 2rem;
    margin-top: 4.5rem;
    max-width: 820px;
}

.metric {
    border-left: 2px solid rgba(232, 169, 78, .35);
    padding-left: 1rem;
}

.metric dd {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--sand-200);
    order: -1;
}

.metric dt {
    font-size: .78rem;
    letter-spacing: .02em;
    color: var(--text-light-muted);
    margin-top: .15rem;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric__sep {
    color: var(--gold-500);
}

/* dunas animadas */

.hero__dunes {
    position: absolute;
    inset: auto 0 0 0;
    height: 190px;
    pointer-events: none;
}

.dune {
    position: absolute;
    bottom: 0;
    left: -4%;
    width: 108%;
    height: 100%;
}

.dune--1 {
    animation: drift 16s ease-in-out infinite alternate;
}

.dune--2 {
    animation: drift 12s ease-in-out infinite alternate-reverse;
}

.dune--3 {
    animation: drift 20s ease-in-out infinite alternate;
}

/* a última camada assume a cor da seção seguinte para emendar sem costura */
.dune--3 path {
    fill: var(--sand-150);
}

@keyframes drift {
    from {
        transform: translateX(-1.6%);
    }

    to {
        transform: translateX(1.6%);
    }
}

/* ---------- seções ---------- */

.section {
    padding: 6.5rem 0;
}

.section--sand {
    background: var(--sand-150);
    color: var(--text-dark);
}

.section__eyebrow {
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--orange-600);
    margin-bottom: 1rem;
}

.section__title {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    letter-spacing: -.015em;
    max-width: 24ch;
}

.section__lead {
    margin-top: 1.25rem;
    max-width: 62ch;
    font-size: 1.05rem;
    color: var(--text-dark-muted);
}

.section:not(.section--sand) .section__lead {
    color: var(--text-light-muted);
}

/* ---------- cards de serviços ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(15, 42, 67, .08);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    box-shadow: 0 2px 10px rgba(15, 42, 67, .05);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--grad-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15, 42, 67, .13);
}

.card:hover::before {
    transform: scaleX(1);
}

.card__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(242, 200, 121, .28), rgba(234, 88, 12, .14));
    color: var(--orange-700);
    margin-bottom: 1.4rem;
}

.card__icon svg {
    width: 27px;
    height: 27px;
}

.card h3 {
    font-size: 1.18rem;
    margin-bottom: .6rem;
    color: var(--navy-900);
}

.card p {
    font-size: .94rem;
    color: var(--text-dark-muted);
}

/* ---------- método ---------- */

.metodo {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: center;
}

.steps {
    margin-top: 2.75rem;
    display: grid;
    gap: 2.1rem;
    counter-reset: step;
    position: relative;
}

.step {
    display: flex;
    gap: 1.4rem;
    position: relative;
}

.step__num {
    font-family: var(--font-mono);
    font-size: .95rem;
    font-weight: 500;
    color: var(--navy-950);
    background: var(--grad-brand);
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 54px;
    bottom: -26px;
    width: 2px;
    background: linear-gradient(rgba(232, 169, 78, .5), rgba(232, 169, 78, .08));
}

.step h3 {
    font-size: 1.12rem;
    margin-bottom: .35rem;
}

.step p {
    font-size: .93rem;
    color: var(--text-light-muted);
}

/* terminal */

.terminal {
    background: linear-gradient(160deg, var(--navy-900), var(--navy-950) 70%);
    border: 1px solid rgba(232, 169, 78, .22);
    border-radius: var(--radius);
    box-shadow: 0 30px 70px rgba(3, 10, 18, .55);
    overflow: hidden;
}

.terminal__bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.1rem;
    border-bottom: 1px solid rgba(232, 169, 78, .14);
}

.terminal__bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.terminal__bar span:nth-child(1) {
    background: var(--orange-600);
}

.terminal__bar span:nth-child(2) {
    background: var(--amber-500);
}

.terminal__bar span:nth-child(3) {
    background: var(--sand-300);
}

.terminal__bar p {
    margin-left: .6rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-light-muted);
}

.terminal__body {
    padding: 1.3rem 1.4rem 1.6rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    line-height: 1.85;
    min-height: 275px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--sand-200);
}

.terminal__body .t-ok {
    color: #7DD87D;
}

.terminal__body .t-dim {
    color: var(--text-light-muted);
}

.terminal__body .t-gold {
    color: var(--gold-500);
}

.terminal__body .t-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--gold-500);
    vertical-align: text-bottom;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ---------- stack ---------- */

.stack {
    margin-top: 3.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem 2rem;
}

.stack__group h3 {
    font-size: .82rem;
    font-family: var(--font-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--orange-700);
    margin-bottom: 1.1rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.chips li {
    padding: .45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 42, 67, .18);
    background: #fff;
    font-size: .86rem;
    font-weight: 500;
    color: var(--navy-900);
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
    cursor: default;
}

.chips li:hover {
    border-color: var(--gold-500);
    background: var(--sand-200);
    transform: translateY(-2px);
}

/* ---------- contato ---------- */

.contato {
    background:
        radial-gradient(ellipse 55% 65% at 50% 100%, rgba(29, 78, 119, .5), transparent 75%),
        var(--navy-950);
}

.contato__box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contato__logo {
    width: 88px;
    margin-bottom: 1.75rem;
    filter: drop-shadow(0 12px 30px rgba(232, 169, 78, .3));
}

.contato__box h2 {
    font-size: clamp(1.9rem, 4.4vw, 3.1rem);
    letter-spacing: -.015em;
}

.contato__box p {
    margin-top: 1.25rem;
    max-width: 52ch;
    color: var(--text-light-muted);
    font-size: 1.05rem;
}

.contato__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* ---------- footer ---------- */

.footer {
    border-top: 1px solid rgba(232, 169, 78, .14);
    padding: 2.5rem 0;
    background: var(--navy-950);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.brand--footer .brand__name {
    font-size: .8rem;
}

.footer__links {
    display: flex;
    gap: 1.75rem;
    font-size: .88rem;
}

.footer__links a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-light-muted);
    transition: color .2s ease;
}

.footer__links a:hover {
    color: var(--sand-200);
}

.footer__note {
    width: 100%;
    font-size: .78rem;
    color: var(--text-light-muted);
    opacity: .7;
}

/* ---------- animação de entrada ---------- */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.cards .reveal:nth-child(2),
.steps .reveal:nth-child(2) {
    transition-delay: .1s;
}

.cards .reveal:nth-child(3),
.steps .reveal:nth-child(3) {
    transition-delay: .2s;
}

.cards .reveal:nth-child(4),
.steps .reveal:nth-child(4) {
    transition-delay: .3s;
}

.cards .reveal:nth-child(5) {
    transition-delay: .4s;
}

.cards .reveal:nth-child(6) {
    transition-delay: .5s;
}

/* ---------- responsivo ---------- */

@media (max-width: 900px) {
    .metodo {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero__metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .nav__toggle {
        display: flex;
    }

    .nav__list {
        position: fixed;
        top: var(--header-h);
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .75rem 1.5rem 1.5rem;
        background: rgba(8, 23, 38, .97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(232, 169, 78, .18);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform .25s ease, opacity .25s ease, visibility .25s;
    }

    .nav__list.is-open {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav__list li {
        border-bottom: 1px solid rgba(232, 169, 78, .1);
    }

    .nav__list li:last-child {
        border-bottom: none;
        margin-top: 1rem;
    }

    .nav__list a:not(.nav__cta) {
        display: block;
        padding: 1rem 0;
    }

    .nav__cta {
        display: block;
        text-align: center;
    }

    .hero {
        padding-bottom: 11rem;
    }

    .hero__dunes {
        height: 120px;
    }

    .section {
        padding: 4.5rem 0;
    }

    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 460px) {
    .hero__metrics {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem 1rem;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .contato__actions .btn {
        width: 100%;
    }
}

/* ---------- acessibilidade: movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
