:root {
    --emerald: #187652;
    --emerald-deep: #064229;
    --gold: #b08a38;
    --gold-deep: #a3813b;
    --silver: #9c9c9a;
    --ivory: #f4f0e6;
    --paper: #e7e2d6;
    --ink: #0e1411;
    --bloom: #f3e6c8;
    --font-serif: "Playfair Display", Palatino, "Palatino Linotype", serif;
    --font-sans: Montserrat, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 70% 42% at 50% 0%, rgba(6, 66, 41, 0.42), transparent 62%),
        var(--ink);
    color: var(--ivory);
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: 0.015em;
}

.glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse 48% 36% at var(--gx, 50%) var(--gy, 34%),
        rgba(6, 66, 41, 0.72),
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    place-items: center;
    padding: 4.5rem 1.5rem 2rem;
}

.stage {
    display: grid;
    justify-items: center;
    text-align: center;
    width: min(720px, 100%);
}

.logo {
    position: relative;
    width: min(440px, 86vw);
    opacity: 0;
    animation: logoIn 1.15s ease 0.1s forwards;
}

.logo img {
    width: 100%;
    height: auto;
    display: block;
}

.logo-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 0%,
        transparent 38%,
        rgba(244, 240, 230, 0.2) 46%,
        rgba(243, 230, 200, 0.95) 50%,
        rgba(176, 138, 56, 0.55) 54%,
        transparent 64%,
        transparent 100%
    );
    background-size: 240% 100%;
    background-repeat: no-repeat;
    mix-blend-mode: screen;
    pointer-events: none;
    -webkit-mask-image: url("../assets/logo.png");
    mask-image: url("../assets/logo.png");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
    animation: logoShine 4.4s ease-in-out infinite;
}

body:not(.is-ready) .logo-shine {
    animation-play-state: paused;
}

.kicker {
    margin: 1.6rem 0 0.2rem;
    color: var(--gold);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.headline {
    position: relative;
    margin: 0.15rem 0 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(3.1rem, 9vw, 6.4rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    white-space: nowrap;
}

.headline-fill {
    display: inline-block;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.42em);
    animation: rise 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.headline::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    font: inherit;
    letter-spacing: inherit;
    background-image: linear-gradient(
        105deg,
        var(--ivory) 0%,
        var(--ivory) 36%,
        var(--bloom) 46%,
        #fff6df 50%,
        var(--gold) 54%,
        var(--ivory) 64%,
        var(--ivory) 100%
    );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    pointer-events: none;
    animation: textShine 4.6s linear infinite;
}

.headline.is-live::after {
    opacity: 1;
    transition: opacity 0.7s ease;
}

.ethos {
    margin: 1.15rem 0 0;
    max-width: 28ch;
    color: var(--paper);
    font-size: 1.02rem;
    letter-spacing: 0.04em;
}

.footer {
    position: relative;
    z-index: 1;
    padding: 1.1rem 1rem 1.6rem;
    text-align: center;
}

.footer a {
    color: var(--silver);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.45s ease, border-color 0.45s ease;
}

.footer a:hover,
.footer a:focus-visible {
    color: var(--gold);
    border-color: rgba(176, 138, 56, 0.85);
}

.footer a:focus-visible {
    outline: none;
}

@keyframes logoIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes logoShine {
    0%, 18% { background-position: 140% 0; }
    62%, 100% { background-position: -140% 0; }
}

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

@keyframes textShine {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

@media (max-width: 520px) {
    .headline {
        font-size: clamp(2.55rem, 12vw, 3.4rem);
    }

    .kicker { letter-spacing: 0.24em; }
}

@media (prefers-reduced-motion: reduce) {
    .logo,
    .logo-shine,
    .letter,
    .headline::after {
        animation: none;
    }

    .logo,
    .letter {
        opacity: 1;
        transform: none;
    }

    .headline::after { opacity: 0; }
}
