/* ==========================================================================
   Sable Automation
   Heraldic palette: sable (black) and or (gold).
   ========================================================================== */

:root {
    --sable: #0a0a0b;
    --sable-raised: #141416;
    --or: #d4a94f;
    --or-bright: #f0cf86;
    --or-dim: rgba(212, 169, 79, 0.45);
    --ink: #f4f1ea;
    --ink-muted: rgba(244, 241, 234, 0.68);
    --ink-faint: rgba(244, 241, 234, 0.42);

    --font-sans: "Jost", "Segoe UI", system-ui, sans-serif;
    --font-serif: "Cormorant Garamond", "Georgia", serif;

    --gutter: clamp(16px, 4vw, 56px);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    background:
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(212, 169, 79, 0.07), transparent 70%),
        radial-gradient(ellipse 60% 50% at 15% 85%, rgba(212, 169, 79, 0.05), transparent 70%),
        var(--sable);
    color: var(--ink);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Background layers
   -------------------------------------------------------------------------- */

.filaments {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

/* Darkens the centre so the type always sits on calm ground, and fades the edges. */
.vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 42% at 50% 50%, rgba(10, 10, 11, 0.72) 0%, rgba(10, 10, 11, 0.35) 55%, transparent 100%),
        linear-gradient(to bottom, rgba(10, 10, 11, 0.55) 0%, transparent 18%, transparent 82%, rgba(10, 10, 11, 0.7) 100%);
}

/* --------------------------------------------------------------------------
   Page frame
   -------------------------------------------------------------------------- */

.page {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 var(--gutter);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(20px, 4vh, 40px) 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--or);
    text-decoration: none;
}

.mark {
    width: 34px;
    height: 34px;
    flex: none;
}

.brand-name {
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.brand-name-secondary {
    color: var(--ink-muted);
    font-weight: 300;
}

.established {
    color: var(--or);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.site-main {
    display: grid;
    place-items: center;
    padding: clamp(24px, 6vh, 64px) 0;
}

.site-footer {
    display: flex;
    justify-content: center;
    padding: clamp(20px, 4vh, 36px) 0;
    color: var(--ink-faint);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    width: 100%;
    max-width: 960px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.5rem;
    color: var(--or);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
    content: "";
    width: clamp(24px, 5vw, 48px);
    height: 1px;
    background: var(--or-dim);
}

.hero-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(3.6rem, 12vw, 9.5rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.01em;
    background: linear-gradient(180deg, var(--ink) 35%, rgba(244, 241, 234, 0.74) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title em {
    /* Padding stops the italic overhang being clipped by background-clip. */
    padding-right: 0.06em;
    font-style: italic;
    background: linear-gradient(180deg, var(--or-bright) 20%, var(--or) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    max-width: 34rem;
    margin: 1.75rem auto 0;
    color: var(--ink-muted);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Countdown
   -------------------------------------------------------------------------- */

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 560px;
    margin: clamp(2.5rem, 7vh, 4rem) auto 0;
}

.countdown-unit {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0.5rem;
}

/* A small gold lozenge, a heraldic diamond, between each unit. */
.countdown-unit + .countdown-unit::before {
    content: "";
    position: absolute;
    top: 38%;
    left: 0;
    width: 5px;
    height: 5px;
    background: var(--or);
    opacity: 0.8;
    transform: translate(-50%, -50%) rotate(45deg);
}

.countdown-value {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 8.5vw, 5rem);
    font-weight: 300;
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--ink);
}

.countdown-label {
    margin-top: 0.5rem;
    color: var(--or);
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.8;
}

.launch-note {
    margin: clamp(2.25rem, 6vh, 3.5rem) 0 0;
    color: var(--ink-faint);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.launch-note time {
    display: block;
    margin-top: 0.35rem;
    color: var(--or-bright);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    letter-spacing: 0.02em;
    text-transform: none;
}

/* --------------------------------------------------------------------------
   Error page
   -------------------------------------------------------------------------- */

.message {
    max-width: 34rem;
    text-align: center;
}

.message h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.message p {
    color: var(--ink-muted);
}

.message a {
    color: var(--or-bright);
}

.message code {
    color: var(--ink-faint);
    font-size: 0.8em;
}

/* --------------------------------------------------------------------------
   Entrance motion
   -------------------------------------------------------------------------- */

.reveal {
    animation: reveal 1.4s var(--ease-out) both;
    animation-delay: calc(0.25s + var(--delay, 0) * 0.15s);
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(6px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
    .brand-name-secondary {
        display: none;
    }

    .brand-name {
        letter-spacing: 0.28em;
    }

    .countdown-unit {
        padding: 0.25rem 0.15rem;
    }

    .countdown-label {
        font-size: 0.55rem;
        letter-spacing: 0.18em;
    }

}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        animation: none;
    }
}
