/* Beliefs — a dark microsite, styled as a sibling of Atlas.
   Same deep black, same gold, same typographic hero, so the special pages
   read as one family. */

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

:root {
    color-scheme: dark;

    --os-bg: #0a0a09;
    --os-fg: #c8c4bc;
    --os-fg-bright: #ede9e1;
    --os-fg-muted: #8a857c;
    --os-fg-dim: #5c584f;
    --os-ghost: #2a2825;
    --os-accent: #e0ba74;
    --os-border: #1d1c1a;

    --os-serif: 'Source Serif 4', Georgia, serif;
    --os-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --os-gutter: clamp(20px, 5vw, 80px);
    --os-measure: 1180px;

    --os-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --os-dur: 200ms;
}

html {
    /* Fluid, but anchored to the reader's own text-size setting. */
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--os-serif);
    font-optical-sizing: auto;
    background: var(--os-bg);
    color: var(--os-fg);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p { text-wrap: pretty; }

:focus-visible {
    outline: 2px solid var(--os-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

::selection {
    background: color-mix(in srgb, var(--os-accent) 30%, transparent);
    color: var(--os-fg-bright);
}

/* ---- Nav ---- */

.os-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    max-width: var(--os-measure);
    margin: 0 auto;
    padding: 2rem var(--os-gutter);
}

.os-nav-name {
    font-family: var(--os-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--os-fg-bright);
    text-decoration: none;
}

.os-nav-links {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
}

.os-nav-links a {
    font-family: var(--os-sans);
    font-size: 0.875rem;
    color: var(--os-fg-muted);
    text-decoration: none;
    transition: color var(--os-dur) var(--os-ease);
}

@media (hover: hover) and (pointer: fine) {
    .os-nav-name:hover,
    .os-nav-links a:hover { color: var(--os-accent); }
}

/* ---- Shell ---- */

.os-main {
    max-width: var(--os-measure);
    margin: 0 auto;
    padding: 0 var(--os-gutter);
}

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

.os-hero {
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.os-title {
    font-weight: 300;
    font-size: clamp(3.75rem, 15vw, 10rem);
    line-height: 0.92;
    letter-spacing: -0.045em;
    color: var(--os-fg-bright);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.os-title-word { display: block; }

.os-title-word > span {
    display: inline-block;
    animation: os-rise 800ms var(--os-ease) backwards;
}

/* Letters arrive left to right, quickly enough to read as one gesture. */
.os-title-word > span:nth-child(1) { animation-delay:   0ms; }
.os-title-word > span:nth-child(2) { animation-delay:  45ms; }
.os-title-word > span:nth-child(3) { animation-delay:  90ms; }
.os-title-word > span:nth-child(4) { animation-delay: 135ms; }
.os-title-word > span:nth-child(5) { animation-delay: 180ms; }
.os-title-word > span:nth-child(6) { animation-delay: 225ms; }
.os-title-word > span:nth-child(7) { animation-delay: 270ms; }

@keyframes os-rise {
    from { opacity: 0; transform: translateY(0.18em); }
    to   { opacity: 1; transform: none; }
}

.os-lede {
    max-width: 34em;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.65;
    color: var(--os-fg-muted);
}

/* ---- Entries ---- */

.os-entries {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    border-top: 1px solid var(--os-border);
    padding-top: clamp(2rem, 5vw, 3.5rem);
}

.os-group {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 1rem 3rem;
    align-items: start;
}

.os-group-label {
    font-family: var(--os-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--os-accent);
    /* The rail label keeps the reader oriented through a long group. */
    position: sticky;
    top: 1.5rem;
}

.os-group-entries {
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 4vw, 2.5rem);
    max-width: 44em;
}

.os-entry {
    padding-left: 1.25rem;
    border-left: 1px solid var(--os-border);
}

.os-entry-highlight {
    border-left-color: color-mix(in srgb, var(--os-accent) 55%, transparent);
}

.os-statement {
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--os-fg-bright);
    margin-bottom: 0.5rem;
    text-wrap: balance;
}

.os-entry-highlight .os-statement {
    color: var(--os-accent);
}

.os-reflection {
    font-size: 0.98rem;
    color: var(--os-fg-muted);
}

/* ---- Footer ---- */

.os-footer {
    margin-top: clamp(3rem, 7vw, 5rem);
    padding: 2.5rem 0 3.5rem;
    border-top: 1px solid var(--os-border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.os-footer p {
    font-family: var(--os-sans);
    font-size: 0.8rem;
    color: var(--os-fg-dim);
}

.os-footer-links {
    display: flex;
    gap: 1.5rem;
}

.os-footer-links a {
    color: var(--os-fg-dim);
    text-decoration: none;
    transition: color var(--os-dur) var(--os-ease);
}

@media (hover: hover) and (pointer: fine) {
    .os-footer-links a:hover { color: var(--os-accent); }
}

/* ---- Narrow ---- */

@media (max-width: 720px) {
    .os-group {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .os-group-label {
        position: static;
    }
}
