/* ferrisholiday.com — styles (mobile-first)
   Base rules target phones; min-width media queries layer on tablet/desktop.
   Sections: Tokens · Reset · Base/Mobile · Header · Links · Loader ·
             Animations · ≥361px · ≥600px · ≥1100px (totems) ·
             Wide+tall centering · Motion */

/* === Tokens === */
:root {
    --bg: #000;
    --card: #111;
    --border: #333;
    --text: #fff;
    --muted: #bbb;

    --stack-gap: 8px;        /* rhythm between crest and card on phones */
    --line-body: 1.55;       /* body line-height floor */
}

@font-face {
    font-family: 'Bureau';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/Bureau.otf') format('opentype');
}

/* === Reset / base === */
*, *::before, *::after { box-sizing: border-box; }

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

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Keyboard focus ring (CLAUDE.md: never remove outline without replacing) */
:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
    border-radius: 4px;
}

/* === Base = MOBILE === */
body {
    font-family: 'Bureau', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;          /* keep — fallback intentional */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* top-anchored on phones */
    align-items: center;
    padding: 10px;
    gap: var(--stack-gap);
    font-size: 1rem;             /* 16px floor */
    line-height: var(--line-body);
}

/* === Layout === */
.container {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    position: relative;
}

/* Stage holds the card and (on wide screens) the flanking totems */
.stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 100%;
}

/* Crest above the card — scaled to read as the card's masthead on phones */
.brand-mark {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
}

.brand-mark img {
    width: 170px;
    max-width: 100%;
    height: auto;
    opacity: 0.9;
}

/* Totems hidden on phones/tablets; restored ≥1100px */
.totem { display: none; }

hr {
    border: none;
    border-top: 1px solid #444;
    margin: 14px 0;
}

/* === Header === */
.header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.profile-info { display: flex; flex-direction: column; }

h1 { font-size: 1.6em; margin: 0; }

.description {
    font-size: 1rem;            /* 16px floor on phones */
    line-height: var(--line-body);
    color: var(--muted);
    margin: 6px 0 0;
}

/* Typewriter caret */
.cursor {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    margin-left: 5px;
}

.cursor::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--text);
    animation: blink-caret 0.75s step-end infinite;
}

/* === Links (minimal-glow icon row) === */
.links {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 28px icon centered in a 44px tap target (CLAUDE.md: ≥44×44px) */
.link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
}

.link img {
    width: 28px;
    height: 28px;
    opacity: 0.55;             /* white icons read as "dim" via opacity, not grayscale */
    transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.link:hover img,
.link:focus-visible img {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));  /* soft glow */
}

/* === Loader === */
#loader {
    position: fixed;
    inset: 0 0 auto 0;
    height: 2px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#loader .loader-bar {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, var(--text), transparent);
    animation: loader-slide 1s ease-in-out infinite;
}

body.loaded #loader { opacity: 0; }

/* === Animations === */
@keyframes blink-caret {
    from, to { opacity: 0; }
    50%      { opacity: 1; }
}

@keyframes loader-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* === ≥361px — standard phones (bump crest/title) === */
@media (min-width: 361px) {
    .brand-mark img { width: 200px; }
    h1 { font-size: 1.8em; }
}

/* === ≥600px — desktop typography & spacing === */
@media (min-width: 600px) {
    body {
        padding: 24px 16px 16px;   /* top-anchored, matches prior desktop */
        gap: 24px;
    }

    .container {
        max-width: 440px;          /* compact card — sized to the sparse content, not a wide banner */
        padding: 32px;
        border-radius: 10px;
    }

    .brand-mark img { width: 380px; }

    hr { margin: 20px 0; }

    .header { margin-bottom: 20px; }

    h1 { font-size: 2.5em; }

    .description {
        font-size: 1.2em;
        margin: 10px 0 0;
    }
}

/* === ≥1100px — flanking totems === */
@media (min-width: 1100px) {
    .stage {
        gap: 80px;
        max-width: 1400px;
    }

    .totem {
        display: block;
        flex-shrink: 0;
        height: 600px;
        width: auto;
        object-fit: contain;
        opacity: 0.85;
        transition: opacity 0.3s ease;
    }

    .totem:hover { opacity: 1; }
    .totem-right { transform: scaleX(-1); }
}

/* === Wide + tall viewports — center the whole stack === */
@media (min-width: 1101px) and (min-height: 901px) {
    body {
        justify-content: center;
        padding: 16px;
    }
}

/* === Motion preferences === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .cursor::after { display: none; }
}
