/* ============================================================
   base.css — reset, document defaults, typography, focus.
   ============================================================ */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* The sticky compact bar is 64px; anchors must clear it. */
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--ff-base);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: var(--fw-regular);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* Scroll lock used by the drawer, modals and the search overlay. The
   scrollbar width is compensated in JS via --scrollbar-w. */
body.is-locked {
    overflow: hidden;
    padding-right: var(--scrollbar-w, 0px);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--ff-heading);
    font-weight: var(--fw-bold);
    color: var(--c-heading);
    text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: var(--ls-h4); font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-h6); line-height: var(--lh-h6); font-weight: var(--fw-semibold); }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast) var(--e-out);
}

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

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
    margin: 0;
}

button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: inherit;
}

address { font-style: normal; }

hr {
    border: 0;
    border-top: 1px solid var(--c-border);
    margin: var(--s-9) 0;
}

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

::selection { background: var(--c-accent); color: var(--c-on-accent); }

/* --- Focus ------------------------------------------------ */
:focus { outline: none; }

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

/* On dark surfaces the ring inverts so it stays visible. */
.on-dark :focus-visible,
.header__utility :focus-visible,
.section--subscribe :focus-visible,
.card--overlay :focus-visible {
    outline-color: var(--c-white);
}

/* --- Icons ------------------------------------------------ */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: inherit;
    flex-shrink: 0;
}
.icon--14 { font-size: 14px; }
.icon--16 { font-size: 16px; }
.icon--18 { font-size: 18px; }
.icon--20 { font-size: 20px; }
.icon--24 { font-size: 24px; }
.icon--28 { font-size: 28px; }

/* Uicons ship as an <i> with a ::before glyph; keep them optically centred. */
i[class^="fi-"], i[class*=" fi-"] {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
i[class^="fi-"]::before, i[class*=" fi-"]::before {
    display: block;
    line-height: 1;
}

/* --- Content photographs ---------------------------------- */
.photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--img-filter);
    transform: scale(var(--img-zoom));
    /* The frame around a .photo always clips (.u-ratio and .card both set
       overflow:hidden), so the zoom grows into the frame instead of pushing
       the layout around. */
    transition: transform var(--t-image) var(--e-out),
                opacity var(--t-slow) var(--e-out);
}

/* Lazy images fade in once decoded. */
.photo[loading="lazy"]:not(.is-loaded) { opacity: 0; }
.photo.is-loaded { opacity: 1; }

/* --- Skip link -------------------------------------------- */
.skip-link {
    position: absolute;
    top: var(--s-2);
    left: var(--s-2);
    z-index: var(--z-toast);
    padding: 12px 22px;
    background: var(--c-accent);
    color: var(--c-on-accent);
    border-radius: var(--r-pill);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    transform: translateY(-200%);
    transition: transform var(--t-base) var(--e-out);
}
.skip-link:focus { transform: translateY(0); }

/* --- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .photo[loading="lazy"]:not(.is-loaded) { opacity: 1; }
}
