/*
 * The welcome homepage (templates/front-page.html). Scoped to
 * .granite-welcome; colours and fonts come from theme.json's presets.
 */

.granite-welcome {
    --gw-bg: var(--wp--preset--color--base);
    --gw-card: var(--wp--preset--color--surface);
    --gw-dark: var(--wp--preset--color--contrast);
    --gw-dark-soft: var(--wp--preset--color--contrast-soft);
    --gw-slate: var(--wp--preset--color--primary);
    --gw-slate-light: var(--wp--preset--color--primary-light);
    --gw-granite: var(--wp--preset--color--muted);
    --gw-stone: var(--wp--preset--color--stone);
    --gw-stone-light: var(--wp--preset--color--stone-light);
    --gw-gold: var(--wp--preset--color--accent);
    --gw-sans: var(--wp--preset--font-family--body);
    --gw-display: var(--wp--preset--font-family--display);

    background: var(--gw-bg);
    color: var(--gw-dark-soft);
    font-family: var(--gw-sans);
    margin-block: 0 !important;
    padding-bottom: clamp(3rem, 6vw, 5rem);
}

.granite-welcome a {
    color: var(--gw-slate);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.granite-welcome a:hover {
    color: var(--gw-slate-light);
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.granite-welcome .gw-hero {
    position: relative;
    overflow: hidden;
    margin-block: 0 !important;
    padding: clamp(4rem, 10vw, 7.5rem) 1.5rem clamp(10rem, 19vw, 15rem);
    text-align: center;
    background:
        radial-gradient(ellipse 60% 50% at 18% 22%, rgba(255, 255, 255, 0.9), transparent 70%),
        radial-gradient(ellipse 45% 40% at 82% 30%, rgba(255, 255, 255, 0.75), transparent 70%),
        linear-gradient(180deg, #eef1f4 0%, #f3f2ee 55%, var(--gw-bg) 100%);
}

.granite-welcome .gw-hero > * {
    position: relative;
    z-index: 1;
}

.granite-welcome .gw-mark {
    display: block;
    width: 3.25rem;
    height: auto;
    margin: 0 auto 1.5rem;
    color: var(--gw-slate);
}

.granite-welcome .gw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    color: var(--gw-slate);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.granite-welcome .gw-eyebrow::before,
.granite-welcome .gw-eyebrow::after {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--gw-gold);
}

.granite-welcome .gw-title {
    max-width: 18ch;
    margin: 0 auto;
    color: var(--gw-dark);
    font-family: var(--gw-display);
    font-size: clamp(2.75rem, 7vw, 5rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.granite-welcome .gw-lead {
    max-width: 34rem;
    margin: 1.5rem auto 0;
    color: var(--gw-granite);
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    line-height: 1.6;
    text-wrap: pretty;
}

/* Mountain range along the bottom of the hero. Full bleed: the theme's
 * constrained layout would otherwise cap it at the content width. */
.granite-welcome .gw-hero > .gw-range {
    position: absolute;
    inset: auto 0 0;
    z-index: 0;
    width: 100%;
    max-width: none !important;
    height: clamp(7rem, 16vw, 12rem);
    margin: 0 !important;
}

.granite-welcome .gw-range-far {
    fill: var(--gw-stone);
    opacity: 0.7;
}

.granite-welcome .gw-range-snow {
    fill: #ffffff;
    opacity: 0.85;
}

/* The nearest ridge is the page colour, so the hills flow into the
 * section below without a seam. */
.granite-welcome .gw-range-near {
    fill: var(--gw-bg);
}

/* ─── Owner card ────────────────────────────────────────────────────────── */

.granite-welcome .gw-card {
    position: relative;
    z-index: 2;
    max-width: 62rem;
    margin: clamp(-5rem, -6vw, -3rem) auto 0 !important;
    padding: clamp(1.75rem, 4vw, 3rem);
    background: var(--gw-card);
    border: 1px solid var(--gw-stone-light);
    border-radius: 1.25rem;
    box-shadow: 0 16px 48px rgba(20, 20, 18, 0.08);
}

/* Constrained layouts cap and center children at the theme's content width;
 * the card lays out its own. */
.granite-welcome .gw-card > * {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.granite-welcome .gw-card-title {
    margin: 0;
    color: var(--gw-dark);
    font-family: var(--gw-display);
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 600;
    line-height: 1.15;
}

.granite-welcome .gw-card-intro {
    max-width: 40rem !important;
    margin: 0.625rem 0 0;
    color: var(--gw-granite);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.granite-welcome .gw-steps {
    gap: clamp(1rem, 3vw, 1.5rem) !important;
    margin: 2rem 0 0 !important;
}

.granite-welcome .gw-step {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--gw-bg);
    border-radius: 0.875rem;
}

.granite-welcome .gw-step > * {
    margin: 0 !important;
}

.granite-welcome .gw-step p {
    font-size: 0.9875rem;
    line-height: 1.6;
}

.granite-welcome .gw-step-number {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.5rem !important;
    color: #ffffff;
    background: var(--gw-slate);
    border-radius: 999px;
    font-size: 0.875rem !important;
    font-weight: 600;
    line-height: 1 !important;
}

.granite-welcome .gw-step-title {
    color: var(--gw-dark);
    font-family: var(--gw-sans);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
}

.granite-welcome .gw-step .wp-block-buttons {
    margin-top: auto !important;
    padding-top: 0.75rem;
}

.granite-welcome .gw-button .wp-block-button__link {
    padding: 0.7rem 1.15rem;
    color: #ffffff;
    background: var(--gw-slate);
    border: 1px solid var(--gw-slate);
    border-radius: 0.5rem;
    font-family: var(--gw-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.granite-welcome .gw-button .wp-block-button__link:hover {
    background: var(--gw-slate-light);
    border-color: var(--gw-slate-light);
}

.granite-welcome .gw-button-quiet .wp-block-button__link {
    color: var(--gw-slate);
    background: transparent;
    border-color: var(--gw-stone);
}

.granite-welcome .gw-button-quiet .wp-block-button__link:hover {
    color: var(--gw-slate);
    background: var(--gw-card);
    border-color: var(--gw-slate);
}

.granite-welcome .wp-block-button__link:focus-visible,
.granite-welcome a:focus-visible {
    outline: 2px solid var(--gw-slate);
    outline-offset: 3px;
}

/* ─── Gentle entrance ───────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
    .granite-welcome .gw-hero > :not(.gw-range),
    .granite-welcome .gw-card {
        animation: gw-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .granite-welcome .gw-eyebrow { animation-delay: 0.05s; }
    .granite-welcome .gw-title { animation-delay: 0.12s; }
    .granite-welcome .gw-lead { animation-delay: 0.2s; }
    .granite-welcome .gw-card { animation-delay: 0.3s; }

    @keyframes gw-rise {
        from {
            opacity: 0;
            transform: translateY(12px);
        }
    }
}
