/*
 * Ianus website landing styles.
 *
 * Palette migrated to the v4 brand in 2026-04: slate blue (#4a6fa5)
 * takes over from the earlier terracotta accent, with a warm cream
 * ground that keeps the page readable under daylight and comfortable
 * under dim-screen evening reading. The Cormorant Garamond epigraph
 * stays for the classical Ovidius quote; the wordmark swaps from an
 * SVG path-baked logo to a live <h1> typeset in Artegra Sans Semi-
 * Bold so the headline can respond to viewport width without the
 * fixed-dimension blur that bitmap upscaling produces at retina.
 *
 * No Three.js and no canvas animation: the page is static HTML plus
 * this stylesheet. That drops about 600 KB of WebGL runtime off the
 * first paint and removes a jank source on low-end GPUs.
 */

@font-face {
    /*
   * Artegra Sans Semi-Bold is the wordmark face. The woff2 file lives
   * at assets/website/fonts/ so the site can be hosted standalone
   * without reaching into the repo-wide font directory; a woff fallback
   * is shipped for browsers that predate woff2 support (mostly IE-era
   * holdovers and older embedded webviews).
   */
    font-family: "Artegra Sans";
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src:
        url("fonts/ArtegraSans-SemiBold.woff2") format("woff2"),
        url("fonts/ArtegraSans-SemiBold.woff") format("woff");
}

:root {
    /* v4 brand palette. Hex values pinned to the SVG sources so the
   * website and the icon stay tonally identical even when one side
   * or the other gets tweaked. */
    --bg: #faf7f2;
    --bg-tint: #efe8d8;
    --ink: #1a1a1a;
    --ink-muted: #5b5650;
    --ink-faint: #8b857b;

    --accent: #4a6fa5; /* slate blue, matches the v4 face fill */
    --accent-deep: #3a5a8e; /* hover / link-active variant */
    --accent-soft: rgba(74, 111, 165, 0.12);
    --cream: #e8d5b7; /* v4 background oval, used as a tint */

    --rule: #e3dccd;

    --serif:
        "Cormorant Garamond", "Iowan Old Style", "Palatino", Georgia, serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --display: "Artegra Sans", var(--sans);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    /* A pair of subtle slate-blue spotlights lift the hero area without
   * requiring a real background image. Kept fixed so scrolling past the
   * fold (there is no real fold on this page, but viewports vary) does
   * not parallax-tear the gradient. */
    min-height: 100vh;
    background:
        radial-gradient(
            1200px 700px at 50% -10%,
            rgba(74, 111, 165, 0.14),
            transparent 62%
        ),
        radial-gradient(
            900px 520px at 85% 18%,
            rgba(232, 213, 183, 0.35),
            transparent 70%
        ),
        var(--bg);
    background-attachment: fixed;
    overflow-x: hidden;
}

main {
    min-height: 100vh;
    max-width: 920px;
    margin: 0 auto;
    padding: 56px 28px 32px;
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 12px;
}

/* ---------- hero ---------- */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 0 8px;
}

.mark {
    /* The v4 two-face icon rendered statically. width/height on the
   * <img> element set the intrinsic size; this rule scales it
   * responsively down to viewport width while capping at 180 px so
   * it never fights the wordmark for visual weight below it. */
    width: clamp(120px, 22vw, 180px);
    height: auto;
    margin: 0 0 22px;
    user-select: none;
    -webkit-user-drag: none;
}

.wordmark {
    /* Typeset rather than path-baked so the letter-spacing on narrow
   * viewports can relax without blurring. Weight 600 matches the v4
   * logo SVG's Artegra Sans Semi-Bold outlines. */
    margin: 0 0 14px;
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(44px, 7.5vw, 72px);
    letter-spacing: 0.16em;
    color: var(--accent);
    line-height: 1;
    /* Align the visual centre of the glyphs with the icon above by
   * nudging the translate a hair; different browsers handle
   * letter-spacing on an <h1> slightly differently, so the shift is
   * small enough to vanish on mobile but hold the eye on desktop. */
    transform: translateX(0.08em);
}

.tag {
    margin: 0;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(17px, 1.9vw, 21px);
    color: var(--ink-muted);
    letter-spacing: 0.005em;
    font-weight: 400;
}

/* ---------- epigraph ---------- */

.epigraph {
    display: flex;
    justify-content: center;
    padding: 24px 0 28px;
}

.epigraph blockquote {
    margin: 0;
    max-width: 560px;
    text-align: center;
    position: relative;
}

/* Thin rule above and below the Latin quote, same treatment as the
 * earlier palette so the classical feel carries through the rebrand. */
.epigraph blockquote::before,
.epigraph blockquote::after {
    content: "";
    display: block;
    width: 56px;
    height: 1px;
    margin: 0 auto 16px;
    background: var(--rule);
}
.epigraph blockquote::after {
    margin: 16px auto 0;
}

.latin {
    margin: 0;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(19px, 2.2vw, 24px);
    line-height: 1.45;
    color: var(--ink);
    letter-spacing: 0.005em;
}

.epigraph cite {
    display: block;
    margin-top: 10px;
    font-family: var(--serif);
    font-style: normal;
    font-size: clamp(12px, 1.2vw, 14px);
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    text-transform: uppercase;
}

.epigraph cite em {
    font-style: italic;
    text-transform: none;
    letter-spacing: 0.02em;
}

/* ---------- footer ---------- */

footer {
    padding: 16px 0 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.passage {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: var(--ink-faint);
    text-decoration: none;
    font-size: 15px;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}
.passage:hover,
.passage:focus-visible {
    color: var(--accent-deep);
    background: var(--accent-soft);
    transform: translateY(-1px);
    outline: none;
}

/* ---------- responsive ---------- */

@media (max-width: 540px) {
    main {
        padding: 32px 20px 20px;
    }
    .hero {
        padding-top: 12px;
    }
    .mark {
        margin-bottom: 16px;
    }
    .wordmark {
        letter-spacing: 0.12em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .passage {
        transition: none;
    }
}

@media (prefers-color-scheme: dark) {
    /* Quiet dark mode. Not a palette inversion; just enough contrast
   * adjustment that the page does not glare when a visitor has their
   * OS in dark mode. The slate-blue accent stays recognisable on a
   * warm near-black ground because its luminance is mid-range. */
    :root {
        --bg: #14120f;
        --bg-tint: #1d1a15;
        --ink: #f4efe6;
        --ink-muted: #b8b0a3;
        --ink-faint: #7c7468;
        --rule: #2a2620;
        --accent-soft: rgba(74, 111, 165, 0.22);
    }
    body {
        background:
            radial-gradient(
                1200px 700px at 50% -10%,
                rgba(74, 111, 165, 0.22),
                transparent 62%
            ),
            radial-gradient(
                900px 520px at 85% 18%,
                rgba(232, 213, 183, 0.06),
                transparent 70%
            ),
            var(--bg);
    }
}
