/* =============================================
   WESTAY SRC — BASE STYLES
   Reset + global typography + element defaults.
   ============================================= */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--src-font-body);
    font-size: var(--src-text-base);
    font-weight: var(--src-weight-regular);
    line-height: var(--src-leading-normal);
    letter-spacing: var(--src-tracking-normal);
    color: var(--src-text-primary);
    background: linear-gradient(180deg, #e8eef3 0%, #f4f7f9 50%, #edf2f6 100%);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Page Backdrop --------------------------------------------------
   The "ice" under Liquid Glass on Ice: a muted image on a FIXED
   layer beneath all content. Fixed pseudo-element, NOT
   background-attachment:fixed (Safari repaints that on every scroll).
   Every translucent surface (sidebar, topbar, content glass) refracts
   this — remove it and backdrop-filter has nothing to show. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    /* Relative to this file's own URL, so the same sheet resolves on any
       docroot — the absolute /core/... spelling was the PHP planes' path and
       404'd on Gravitus, taking the whole glass language down with it.
       TWO layers, a PATTERN not a plane name: plane-backdrop.webp is the
       plane's own identity image — untracked (gitignored), living only in a
       plane's tree like .env.local, so review-loads never carry or wipe it.
       Where a plane ships none, its 404 costs nothing visible: the tracked
       alpine default underneath still renders (a failed layer in a multiple
       background does not blank the others). The plane vhost serves this one
       file must-revalidate (see plane-*.conf) because every plane answers
       the SAME URL — a 7d-cached copy from one plane would impersonate the
       next plane's identity for a week. */
    background-image: url('images/plane-backdrop.webp'), url('images/backdrop.webp?v=2');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    pointer-events: none;
}

/* --- Headings --- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--src-font-body);
    font-weight: var(--src-weight-semibold);
    line-height: var(--src-leading-tight);
    color: var(--src-text-primary);
}

h1 {
    font-size: var(--src-text-2xl);
    font-weight: var(--src-weight-semibold);
    letter-spacing: var(--src-tracking-tight);
}

h2 {
    font-size: var(--src-text-xl);
}

h3 {
    font-size: var(--src-text-lg);
}

h4 {
    font-size: var(--src-text-md);
}

h5, h6 {
    font-size: var(--src-text-base);
    font-weight: var(--src-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--src-tracking-wide);
    color: var(--src-text-secondary);
}

/* --- Text Elements --- */

p {
    margin-bottom: var(--src-space-4);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: var(--src-weight-semibold);
}

small {
    font-size: var(--src-text-sm);
    color: var(--src-text-secondary);
}

/* --- Links --- */

a {
    color: var(--src-text-link);
    text-decoration: none;
    transition: color var(--src-transition-fast);
}

a:hover {
    color: var(--src-text-link-hover);
}

a:focus-visible {
    outline: 2px solid var(--src-border-focus);
    outline-offset: 2px;
    border-radius: var(--src-radius-sm);
}

/* --- Lists --- */

ul, ol {
    list-style: none;
}

/* --- Images --- */

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

/* --- Tables (reset only) --- */

table {
    border-collapse: collapse;
    width: 100%;
}

/* --- Forms (reset only) --- */

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input, select, textarea {
    border: none;
    outline: none;
    background: none;
}

textarea {
    resize: vertical;
}

fieldset {
    border: none;
}

/* --- Focus --- */

:focus-visible {
    outline: 2px solid var(--src-border-focus);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* --- Selection --- */

::selection {
    background-color: var(--src-sandstone-light);
    color: var(--src-midnight);
}

/* --- Scrollbar --- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(2, 36, 60, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(2, 36, 60, 0.25);
}

/* --- Print --- */

@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    body::before {
        display: none;
    }
}
