:root {
    --sand-1: #f3d6a4;
    --sand-2: #d9a35b;
    --sand-3: #a8672c;
    --night: #0b0705;
    --ink: #efe2cc;
    --ink-dim: rgba(239, 226, 204, .62);
    --sapho: #b3122e;
    --sapho-glow: rgba(214, 32, 60, .55);
    --glass: rgba(18, 11, 7, .38);
    --line: rgba(243, 214, 164, .22);
    --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --display: "Cinzel", "Trajan Pro", Georgia, serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

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

html { background: var(--night); color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--serif);
    color: var(--ink);
    background: radial-gradient(120% 90% at 50% 110%, #c2773a 0%, #5a2e17 35%, #1a0e08 65%, #0b0705 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.sr-only, .hp {
    position: absolute !important;
    width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- camadas da cena ---------- */
#desert, #dust {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    display: block;
}
#desert { z-index: 0; opacity: 0; transition: opacity 2.4s ease; }
#desert.is-ready { opacity: 1; }
#dust { z-index: 1; pointer-events: none; mix-blend-mode: screen; }

.grain {
    position: fixed; inset: -50%; z-index: 2; pointer-events: none;
    opacity: .09;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 1.2 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-3%, 2%); }
    40%  { transform: translate(2%, -4%); }
    60%  { transform: translate(-4%, -1%); }
    80%  { transform: translate(3%, 3%); }
    100% { transform: translate(0, 0); }
}

.vignette {
    position: fixed; inset: 0; z-index: 2; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 42%, transparent 35%, rgba(5, 3, 2, .55) 78%, rgba(3, 2, 1, .92) 100%),
        linear-gradient(to bottom, rgba(5, 3, 8, .35), transparent 18%, transparent 70%, rgba(5, 3, 2, .75));
}

/* ---------- cabeçalho ---------- */
.top {
    position: relative; z-index: 5;
    display: flex; flex-wrap: wrap; gap: 12px;
    justify-content: space-between; align-items: center;
    padding: max(22px, env(safe-area-inset-top)) clamp(18px, 4vw, 56px) 0;
}
.brand {
    display: flex; align-items: center; gap: 14px;
    font-family: var(--display); font-weight: 600;
    letter-spacing: .42em; font-size: .82rem;
}
.brand__mark { width: 34px; height: 34px; fill: none; stroke: var(--sand-2); stroke-width: 2; }
.brand__mark .dash { stroke-dasharray: 3 5; animation: spin 18s linear infinite; transform-origin: 32px 32px; }
.brand__mark .core { fill: var(--sapho); stroke: none; filter: drop-shadow(0 0 6px var(--sapho-glow)); }

.status {
    font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink-dim); display: flex; align-items: center; gap: 10px;
}
.pulse {
    width: 8px; height: 8px; border-radius: 50%; background: var(--sapho);
    box-shadow: 0 0 0 0 var(--sapho-glow); animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 var(--sapho-glow); }
    100% { box-shadow: 0 0 0 14px rgba(214, 32, 60, 0); }
}

/* ---------- palco principal ---------- */
.stage {
    position: relative; z-index: 4;
    min-height: calc(100vh - 80px);
    display: grid; place-items: center;
    padding: 40px clamp(18px, 4vw, 56px) 80px;
}

.oracle {
    position: absolute; left: 50%; top: 47%;
    width: min(92vmin, 760px); aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none; opacity: .85;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.oracle svg { width: 100%; height: 100%; overflow: visible; }
.ring circle { fill: none; stroke: var(--line); }
.r1 circle { stroke-width: 1; stroke-dasharray: 2 10; }
.r2 circle { stroke-width: 1.4; stroke: rgba(217, 163, 91, .32); stroke-dasharray: 120 18 4 18; }
.r3 circle { stroke-width: .8; stroke: rgba(243, 214, 164, .16); }
.ring, .ticks, .glyphs { transform-origin: 300px 300px; }
.r1 { animation: spin 140s linear infinite; }
.r2 { animation: spin 90s linear infinite reverse; }
.r3 { animation: spin 60s linear infinite; }
.t1 { animation: spin 200s linear infinite reverse; }
.t2 { animation: spin 75s linear infinite; }
.glyphs { animation: spin 320s linear infinite; }
.ticks line { stroke: rgba(243, 214, 164, .35); stroke-width: 1; }
.ticks line.major { stroke: rgba(243, 214, 164, .7); stroke-width: 1.6; }
.glyphs text {
    font-family: var(--mono); font-size: 9px; fill: rgba(243, 214, 164, .38); letter-spacing: 1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero ---------- */
.hero {
    position: relative; text-align: center; max-width: 880px;
    animation: rise 1.8s cubic-bezier(.2, .7, .2, 1) both .3s;
}
.hero::before {
    content: ""; position: absolute; inset: -12% -18%; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse at 50% 45%, rgba(10, 6, 4, .5) 0%, rgba(10, 6, 4, .22) 45%, transparent 72%);
    filter: blur(10px);
}
@keyframes rise {
    from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
}

.eyebrow {
    font-family: var(--mono); font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
    color: #f0c27f; margin: 0 0 22px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .8);
}
.title {
    margin: 0;
    font-family: var(--display); font-weight: 400;
    font-size: clamp(2.5rem, 8.4vw, 6.6rem);
    line-height: .98; letter-spacing: .04em; text-transform: uppercase;
    text-shadow: 0 2px 30px rgba(0, 0, 0, .6);
}
.title__line { display: block; }
.title__line--accent {
    background: linear-gradient(100deg, #fff1d6 0%, #f0c27f 35%, #c77a35 62%, #f7dcae 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: sheen 9s ease-in-out infinite;
    filter: drop-shadow(0 4px 22px rgba(199, 122, 53, .35));
}
@keyframes sheen { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }

.lede {
    max-width: 600px; margin: 28px auto 0;
    font-size: clamp(1.1rem, 2.1vw, 1.38rem); line-height: 1.55; color: var(--ink-dim);
    text-shadow: 0 1px 12px rgba(0, 0, 0, .7);
}
.lede strong { color: var(--ink); font-weight: 500; font-style: italic; }

/* contagem decrescente */
.countdown {
    display: flex; justify-content: center; align-items: flex-start;
    gap: clamp(6px, 2vw, 22px);
    margin: 44px auto 0; padding: 22px clamp(14px, 3vw, 38px);
    width: fit-content; max-width: 100%;
    background: var(--glass);
    border: 1px solid var(--line); border-radius: 2px;
    backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
    box-shadow: inset 0 1px 0 rgba(255, 230, 190, .08), 0 30px 80px -20px rgba(0, 0, 0, .7);
}
.cd { display: flex; flex-direction: column; align-items: center; min-width: 3.2ch; }
.cd__n {
    font-family: var(--mono); font-weight: 300;
    font-size: clamp(1.7rem, 5.4vw, 3.3rem); line-height: 1;
    color: #fff3dc; font-variant-numeric: tabular-nums;
    text-shadow: 0 0 18px rgba(240, 194, 127, .35);
}
.cd__n.tick { animation: tick .5s ease-out; }
@keyframes tick { from { color: #ff8e9e; text-shadow: 0 0 22px var(--sapho-glow); } }
.cd__l {
    margin-top: 10px; font-family: var(--mono); font-size: .62rem;
    letter-spacing: .3em; text-transform: uppercase; color: var(--ink-dim);
}
.cd__sep {
    font-style: normal; font-family: var(--mono); font-weight: 300;
    font-size: clamp(1.4rem, 4vw, 2.6rem); line-height: 1.1; color: rgba(243, 214, 164, .35);
}

/* inscrição */
.signup {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0;
    margin: 36px auto 0; max-width: 560px;
}
.signup input[type="email"] {
    flex: 1 1 240px; min-width: 0;
    padding: 17px 20px;
    font: 400 1rem var(--mono); color: var(--ink);
    background: rgba(10, 6, 4, .55);
    border: 1px solid var(--line); border-right: 0; border-radius: 2px 0 0 2px;
    outline: none; transition: border-color .3s, box-shadow .3s;
}
.signup input::placeholder { color: rgba(239, 226, 204, .35); }
.signup input:focus { border-color: var(--sand-2); box-shadow: 0 0 0 3px rgba(217, 163, 91, .15); }
.signup button {
    flex: 0 0 auto;
    position: relative; overflow: hidden; cursor: pointer;
    padding: 17px 26px;
    font: 600 .74rem var(--display); letter-spacing: .24em; text-transform: uppercase;
    color: #fff4e4;
    background: linear-gradient(180deg, #c8203d, #7d0b1f);
    border: 1px solid #d23a55; border-radius: 0 2px 2px 0;
    box-shadow: 0 10px 30px -8px var(--sapho-glow), inset 0 1px 0 rgba(255, 255, 255, .2);
    transition: transform .2s, box-shadow .3s, filter .3s;
}
.signup button::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .8s;
}
.signup button:hover { filter: brightness(1.12); box-shadow: 0 14px 40px -6px var(--sapho-glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.signup button:hover::after { transform: translateX(120%); }
.signup button:active { transform: translateY(1px); }
.signup button:disabled { filter: grayscale(.5) brightness(.8); cursor: progress; }
.signup button span { position: relative; z-index: 1; }

.signup__msg {
    min-height: 1.4em; margin: 16px 0 0;
    font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; color: var(--ink-dim);
}
.signup__msg.is-ok { color: #f0c27f; }
.signup__msg.is-err { color: #ff8e9e; }

/* ---------- HUD lateral ---------- */
.hud {
    position: absolute; right: clamp(18px, 3vw, 48px); bottom: 48px;
    width: 300px; padding: 16px 18px;
    font-family: var(--mono); font-size: .66rem; color: var(--ink-dim);
    background: var(--glass); border: 1px solid var(--line);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    animation: rise 1.6s cubic-bezier(.2, .7, .2, 1) both 1.4s;
}
.hud__head {
    display: flex; justify-content: space-between;
    letter-spacing: .22em; text-transform: uppercase; color: var(--sand-2);
    padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
}
.hud__stream {
    list-style: none; margin: 0; padding: 0; height: 132px; overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent, #000 30%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
    display: flex; flex-direction: column; justify-content: flex-end;
}
.hud__stream li { line-height: 1.65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: fadeIn .4s ease; }
.hud__stream li b { color: var(--ink); font-weight: 400; }
.hud__stream li em { color: #ff8e9e; font-style: normal; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }
.hud__meter {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
    text-transform: uppercase; letter-spacing: .14em;
}
.bar { height: 3px; background: rgba(243, 214, 164, .12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sand-2), var(--sapho)); transition: width .8s ease; }
.hud__meter b { color: var(--ink); font-weight: 400; min-width: 4ch; text-align: right; }

/* ---------- pilares ---------- */
.pillars {
    position: relative; z-index: 4;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px;
    max-width: 1100px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 56px);
}
.pillar {
    padding: 40px 32px;
    background: linear-gradient(180deg, rgba(20, 12, 8, .62), rgba(12, 7, 4, .78));
    border: 1px solid var(--line);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; transform: translateY(30px);
    transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1), border-color .4s;
}
.pillar.in { opacity: 1; transform: none; }
.pillar:hover { border-color: rgba(217, 163, 91, .5); }
.pillar__n { font-family: var(--display); font-size: .85rem; color: var(--sapho); letter-spacing: .3em; }
.pillar h2 {
    margin: 14px 0 12px; font-family: var(--display); font-weight: 400;
    font-size: 1.5rem; letter-spacing: .18em; text-transform: uppercase;
}
.pillar p { margin: 0; font-size: 1.12rem; line-height: 1.6; color: var(--ink-dim); }

/* ---------- axioma ---------- */
.axiom {
    position: relative; z-index: 4;
    max-width: 820px; margin: 0 auto; padding: 120px clamp(18px, 4vw, 56px) 100px;
    text-align: center;
}
.axiom p {
    margin: 0; font-style: italic; font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.3;
    color: #f7e6c8; text-shadow: 0 2px 30px rgba(0, 0, 0, .8);
}
.axiom cite {
    display: block; margin-top: 22px; font-style: normal;
    font-family: var(--mono); font-size: .7rem; letter-spacing: .32em; text-transform: uppercase; color: var(--sand-2);
}
.axiom cite::before, .axiom cite::after {
    content: ""; display: inline-block; vertical-align: middle;
    width: 36px; height: 1px; margin: 0 14px; background: var(--line);
}

/* ---------- rodapé ---------- */
.foot {
    position: relative; z-index: 4;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px;
    padding: 30px 18px max(30px, env(safe-area-inset-bottom));
    font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: rgba(239, 226, 204, .42);
    border-top: 1px solid rgba(243, 214, 164, .1);
}
.foot__sep { color: var(--sapho); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
    .hud { position: relative; right: auto; bottom: auto; margin: 48px auto 0; width: min(100%, 420px); }
    .stage { display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 560px) {
    .brand { letter-spacing: .28em; }
    .status { display: none; }
    .signup input[type="email"] { border-right: 1px solid var(--line); border-radius: 2px; flex-basis: 100%; }
    .signup button { flex-basis: 100%; margin-top: 10px; border-radius: 2px; }
    .cd__l { letter-spacing: .14em; font-size: .56rem; }
    .pillar { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
