/* Almerivo base layer: fonts, tokens, reset, header, nav, footer, shared pieces */

@font-face {
    font-family: 'DM Serif Display';
    src: url('../fonts/dmserif-display.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Serif Display Fallback';
    src: local('Georgia');
    ascent-override: 105.2%;
    descent-override: 34.4%;
    line-gap-override: 0%;
    size-adjust: 98.9%;
}
@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/dmsans-var.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Sans Fallback';
    src: local('Arial');
    ascent-override: 94.8%;
    descent-override: 29.7%;
    line-gap-override: 0%;
    size-adjust: 104.4%;
}

:root {
    --wool-light: #F4F5F8;
    --wool-tint: #E8EAF0;
    --felt-dark: #1C1B22;
    --thread-grey: #6B6A75;
    --thread-deep: #55545F; /* muted text that stays above 4.5:1 on the tint bands */
    --seam-line: #D4D6DE;
    --lining-white: #FFFFFF;
    --garnet: oklch(47% 0.17 18);
    --garnet-deep: oklch(40% 0.16 18);

    --selvedge-shift: 10px; /* offset-frame drift; notes below framed blocks derive their gap from it */
    --hem-width: 1240px;
    --stitch-s: 12px;
    --stitch-m: 24px;
    --stitch-l: 40px;

    --serif: 'DM Serif Display', 'DM Serif Display Fallback', Georgia, serif;
    --sans: 'DM Sans', 'DM Sans Fallback', Arial, sans-serif;
}

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

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

body {
    margin: 0;

    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--felt-dark);

    background: var(--wool-light);
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
    margin: 0;
}

h1,
h2 {
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.85rem, 1.1rem + 2.5vw, 3.3rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

h3 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.15;
}

a {
    color: var(--garnet);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--garnet-deep);
}

:focus-visible {
    outline: 2px solid var(--garnet);
    outline-offset: 3px;
}

button,
input,
select {
    font: inherit;
}

.alm-wrap {
    width: min(100% - 40px, var(--hem-width));
    margin-inline: auto;
}

@media (min-width: 900px) {
    .alm-wrap {
        width: min(100% - 96px, var(--hem-width));
    }
}

.alm-label {
    display: block;

    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--thread-deep);
}

/* outline word: serif stroke, filled only where stroke is unsupported */
.alm-outline {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: 0;
    color: transparent;
    -webkit-text-stroke: 1.3px var(--garnet);
}

@supports not (-webkit-text-stroke: 1px black) {
    .alm-outline {
        color: var(--garnet);
    }
}

.alm-num {
    font-family: var(--serif);
    font-variant-numeric: lining-nums;
    color: var(--garnet);
}

.alm-sr {
    position: absolute;

    width: 1px;
    height: 1px;
    overflow: hidden;

    clip-path: inset(50%);
    white-space: nowrap;
}

/* buttons */
.alm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 28px;

    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--lining-white);

    background: var(--garnet);
    border: 1px solid var(--garnet);
    border-radius: 0;

    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.alm-btn:hover {
    color: var(--lining-white);

    background: var(--garnet-deep);
    border-color: var(--garnet-deep);
}

.alm-btn-line {
    color: var(--felt-dark);

    background: transparent;
    border-color: var(--felt-dark);
}

.alm-btn-line:hover {
    color: var(--lining-white);

    background: var(--felt-dark);
    border-color: var(--felt-dark);
}

/* header: logo centred, menu row under it */
.alm-top {
    position: relative;
    z-index: 200;

    background: var(--wool-light);
    border-bottom: 1px solid var(--seam-line);
}

.alm-top-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 72px;
}

.alm-top-note {
    display: none;
}

.alm-logo {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    min-height: 48px;

    font-family: var(--serif);
    font-size: 1.85rem;
    line-height: 1;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--felt-dark);
}

.alm-logo:hover {
    color: var(--felt-dark);
}

.alm-top-tel {
    display: none;
}

.alm-burger {
    position: relative;
    z-index: 310;
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;

    color: var(--felt-dark);

    background: transparent;
    border: 1px solid var(--felt-dark);
    border-radius: 0;

    cursor: pointer;
}

.alm-burger span,
.alm-burger span::before,
.alm-burger span::after {
    display: block;
    width: 20px;
    height: 1.5px;

    background: currentColor;

    transition: rotate 0.2s ease, translate 0.2s ease;
}

.alm-burger span {
    position: relative;
}

.alm-burger span::before,
.alm-burger span::after {
    position: absolute;
    left: 0;

    content: "";
}

.alm-burger span::before {
    top: -6px;
}

.alm-burger span::after {
    top: 6px;
}

.alm-burger[aria-expanded="true"] {
    color: var(--wool-light);

    border-color: var(--wool-light);
}

.alm-burger[aria-expanded="true"] span {
    background: transparent;
}

.alm-burger[aria-expanded="true"] span::before {
    translate: 0 6px;
    rotate: 45deg;
}

.alm-burger[aria-expanded="true"] span::after {
    translate: 0 -6px;
    rotate: -45deg;
}

/* no-JS: plain link row under the logo, burger stays out */
html:not(.alm-js) .alm-burger {
    display: none;
}

.alm-nav {
    border-top: 1px solid var(--seam-line);
}

.alm-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 24px;
    padding: 0;

    list-style: none;
}

.alm-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 4px;

    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--felt-dark);
}

.alm-nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
}

.alm-nav .alm-nav-tel {
    display: none;
}

/* mobile menu with JS: fixed sheet inside the header context (z 300 > tray 150) */
@media (max-width: 899px) {
    .alm-js .alm-nav {
        position: fixed;
        inset: 0;
        z-index: 300;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 96px 24px 48px;

        background: var(--felt-dark);
        border-top: 0;

        visibility: hidden;
        transform: translateY(-16px);
        transition: transform 0.25s ease, visibility 0.25s ease;
    }

    .alm-js .alm-nav.open {
        visibility: visible;
        transform: none;
    }

    .alm-js .alm-nav ul {
        display: grid;
        gap: 8px;

        text-align: center;
    }

    .alm-js .alm-nav a {
        min-height: 56px;
        padding: 4px 12px;

        font-family: var(--serif);
        font-size: 2.2rem;
        font-weight: 400;
        letter-spacing: 0;
        text-transform: none;
        color: var(--wool-light);
    }

    .alm-js .alm-nav .alm-nav-tel {
        display: block;
    }

    .alm-js .alm-nav .alm-nav-tel a {
        margin-top: 24px;

        font-family: var(--sans);
        font-size: 1.1rem;
        letter-spacing: 0.08em;
    }
}

@media (min-width: 900px) {
    .alm-top-row {
        min-height: 84px;
    }

    .alm-top-note {
        display: block;
    }

    .alm-top-tel {
        grid-column: 3;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        min-height: 44px;

        font-size: 0.95rem;
        font-weight: 500;
        letter-spacing: 0.04em;
        text-decoration: none;
        color: var(--felt-dark);
    }

    .alm-burger {
        display: none;
    }

    .alm-nav ul {
        gap: 44px;
    }

    .alm-nav a:hover {
        color: var(--garnet);
    }
}

/* page head shared by every inner page: same block keeps h1 at one height */
.alm-head {
    padding-top: 64px;
    padding-bottom: 52px;

    background: var(--wool-tint);
    border-bottom: 1px solid var(--seam-line);
}

.alm-head h1 {
    margin-top: 14px;

    font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.5rem);
}

.alm-head-lead {
    max-width: 680px;
    margin-top: 20px;

    font-size: 1.12rem;
    color: var(--thread-deep);
}

/* bands: background / tint alternation, padding grows towards the footer */
.alm-band-tint {
    background: var(--wool-tint);
}

.alm-band-light {
    background: var(--wool-light);
}

.alm-sec-head {
    max-width: 760px;
    margin-bottom: 40px;
}

.alm-sec-head h2 {
    margin-top: 12px;
}

.alm-sec-head p:not(.alm-label) {
    margin-top: 18px;

    color: var(--thread-deep);
}

/* footer: a single legal strip */
.alm-foot {
    padding-top: 56px;
    padding-bottom: 56px;

    color: var(--wool-tint);

    background: var(--felt-dark);
}

.alm-foot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
}

.alm-foot-copy {
    font-size: 0.9rem;
}

.alm-foot ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
    padding: 0;

    list-style: none;
}

.alm-foot a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;

    font-size: 0.9rem;
    color: var(--wool-light);
}

.alm-foot a:hover {
    color: var(--wool-tint);
}

/* reveal: hidden state is added by init.js only, page is complete without it */
.alm-await {
    opacity: 0;
    translate: 0 22px;
    transition: opacity 0.6s ease, translate 0.6s ease;
}

.alm-await.shown {
    opacity: 1;
    translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
    .alm-await,
    .alm-nav,
    .alm-btn,
    .alm-burger span,
    .alm-burger span::before,
    .alm-burger span::after {
        transition: none;
    }

    .alm-await {
        translate: 0 0;
    }
}
