/* Almerivo components: hero, deck, compare table, tales, steps, workshop page, form, legal, tray */

/* hero: full photo + diagonal veil, copy sits low on the dark side */
.alm-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(600px, calc(100svh - 72px), 980px);
    padding-top: 120px;
    padding-bottom: 56px;

    color: var(--wool-light);

    background-color: var(--felt-dark);
    background-image: linear-gradient(172deg, #1C1B2200 0%, #1C1B2226 28%, #1C1B22D9 56%, #1C1B22F5 100%), url("../img/abrigo-maniqui.webp");
    background-position: center, 24% center;
    background-size: cover, cover;
    background-repeat: no-repeat;
}

.alm-hero-text {
    max-width: 640px;
}

.alm-hero .alm-label {
    color: var(--wool-tint);
}

.alm-hero h1 {
    margin-top: 16px;

    font-size: clamp(2.75rem, 1rem + 5.4vw, 6.5rem);
    line-height: 0.98;
}

.alm-hero .alm-outline {
    -webkit-text-stroke: 1.4px var(--wool-light);
}

.alm-hero-lead {
    max-width: 540px;
    margin-top: 24px;

    font-size: 1.1rem;
    color: var(--wool-tint);
}

.alm-hero-act {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
    margin-top: 32px;
}

.alm-tel {
    display: inline-flex;
    align-items: center;
    min-height: 48px;

    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--wool-light);
}

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

@media (min-width: 900px) {
    .alm-hero {
        min-height: clamp(620px, calc(100svh - 132px), 980px);
        padding-bottom: 72px;

        background-image: linear-gradient(112deg, #1C1B2200 0%, #1C1B2200 34%, #1C1B22B3 50%, #1C1B22F0 68%), url("../img/abrigo-maniqui.webp");
        background-position: center, center;
    }

    .alm-hero-text {
        margin-left: auto;
    }
}

/* very wide screens: photo keeps its height, dark felt takes the right side */
@media (min-width: 1700px) {
    .alm-hero {
        background-image: linear-gradient(100deg, #1C1B2200 0%, #1C1B2200 22%, #1C1B22CC 40%, #1C1B22 48%), url("../img/abrigo-maniqui.webp");
        background-position: center, left center;
        background-size: cover, auto 100%;
    }
}

/* deck-tabs: console with four garments */
.alm-deck {
    color: var(--felt-dark);

    background: var(--wool-light);
    border: 1px solid var(--felt-dark);
}

.alm-deck-tabs {
    display: none;
}

.alm-deck-live .alm-deck-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    border-bottom: 1px solid var(--felt-dark);
}

.alm-deck-tabs button {
    min-height: 56px;
    padding: 12px 10px;

    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--felt-dark);

    background: transparent;
    border: 0;
    border-right: 1px solid var(--seam-line);
    border-bottom: 1px solid var(--seam-line);
    border-radius: 0;

    cursor: pointer;
}

.alm-deck-tabs button[aria-selected="true"] {
    color: var(--wool-light);

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

.alm-deck-pane {
    display: grid;
    gap: 28px;
    padding: 24px 20px 32px;
}

.alm-deck-pane[hidden] {
    display: none;
}

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

.alm-deck-photo {
    padding: 10px;

    background: var(--lining-white);
    border: 1px solid var(--seam-line);
}

/* polaroid: thick bottom margin, tilt via rotate so reveal translate never resets it */
.alm-tilt {
    padding: 12px 12px 40px;
}

.alm-deck-info p {
    margin-top: 14px;
}

.alm-specs {
    margin-top: 22px;

    border-top: 1px solid var(--felt-dark);
}

.alm-specs div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;

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

.alm-specs dt {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--thread-deep);
}

.alm-specs .alm-num {
    font-size: 1.5rem;
    line-height: 1.1;
}

.alm-deck-note {
    max-width: 760px;
    margin-top: 28px;

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

@media (min-width: 700px) {
    .alm-deck-live .alm-deck-tabs {
        grid-template-columns: repeat(4, 1fr);
    }

    .alm-deck-tabs button {
        border-bottom: 0;
    }

    .alm-tilt {
        rotate: -1.6deg;
    }

    .alm-tilt-r {
        rotate: 1.3deg;
    }
}

@media (min-width: 900px) {
    .alm-deck-pane {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 48px;
        padding: 40px 44px;
    }
}

/* compare table */
.alm-table-wrap {
    min-width: 0;
    overflow-x: auto;

    background: var(--lining-white);
    border: 1px solid var(--felt-dark);

    scrollbar-width: thin;
    scrollbar-color: var(--garnet) transparent;
}

.alm-compare,
.alm-data {
    width: 100%;
    border-collapse: collapse;

    font-size: 0.98rem;
}

.alm-compare {
    min-width: 640px;
}

.alm-compare caption,
.alm-data caption {
    padding: 18px 20px;

    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-align: left;
    text-transform: uppercase;
    color: var(--thread-deep);
}

.alm-compare th,
.alm-compare td,
.alm-data th,
.alm-data td {
    padding: 16px 20px;

    text-align: left;
    vertical-align: top;

    border-top: 1px solid var(--seam-line);
}

.alm-compare thead th {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    background: var(--wool-tint);
    border-top: 1px solid var(--felt-dark);
}

.alm-compare tbody th,
.alm-data th {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 400;
}

.alm-compare td:nth-child(2) {
    border-left: 1px solid var(--felt-dark);
}

.alm-compare td:last-child {
    color: var(--thread-deep);
}

.alm-data tbody th {
    width: 34%;
}

.alm-data-wide tbody th {
    width: 26%;
}

.alm-data thead th {
    font-family: var(--sans);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;

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

/* tales: offset-frame cards; frame drawn by pseudo so the grid isolates it */
.alm-tales {
    display: grid;
    gap: 44px;
    padding: 0 var(--selvedge-shift) var(--selvedge-shift) 0;

    isolation: isolate;
}

.alm-tale {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 28px;

    background: var(--wool-light);
    border: 1px solid var(--felt-dark);
}

.alm-tale::before {
    position: absolute;
    top: var(--selvedge-shift);
    left: var(--selvedge-shift);
    right: calc(var(--selvedge-shift) * -1);
    bottom: calc(var(--selvedge-shift) * -1);
    z-index: -1;

    content: "";

    border: 1px solid var(--thread-grey);
}

.alm-tale p {
    margin-top: 16px;
}

.alm-tale-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: auto;
    padding-top: 22px;

    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--thread-deep);
    list-style: none;
}

.alm-tale-facts li:last-child {
    color: var(--garnet);
}

@media (min-width: 900px) {
    .alm-tales {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 36px;
    }
}

/* steps */
.alm-steps {
    display: grid;
    padding: 0;

    list-style: none;
}

.alm-steps li {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-content: start; /* equal-height cells must not spread number and text apart */
    gap: 16px;
    padding: 28px 0;

    border-top: 1px solid var(--felt-dark);
}

.alm-step-num {
    font-size: 3rem;
    line-height: 0.9;
}

.alm-steps h3 {
    font-size: 1.45rem;
}

.alm-steps p {
    margin-top: 10px;

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

@media (min-width: 1100px) {
    .alm-steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border-bottom: 1px solid var(--felt-dark);
    }

    .alm-steps li {
        grid-template-columns: 1fr;
        padding: 32px 28px 36px;
    }

    .alm-steps li + li {
        border-left: 1px solid var(--seam-line);
    }
}

/* closing call band */
.alm-call {
    text-align: center;
}

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

.alm-call p:not(.alm-label) {
    max-width: 620px;
    margin: 22px auto 0;

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

.alm-call-act {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 32px;
    margin-top: 36px;
}

.alm-call-tel {
    display: inline-flex;
    align-items: center;
    min-height: 48px;

    font-family: var(--serif);
    font-size: 1.9rem;
    text-decoration: none;
}

/* rhythm: each band a little roomier than the one above */
.alm-pace-1 {
    padding-top: 64px;
    padding-bottom: 64px;
}

.alm-pace-2 {
    padding-top: 76px;
    padding-bottom: 76px;
}

.alm-pace-3 {
    padding-top: 88px;
    padding-bottom: 92px;
}

.alm-pace-4 {
    padding-top: 100px;
    padding-bottom: 108px;
}

.alm-pace-5 {
    padding-top: 120px;
    padding-bottom: 136px;
}

/* workshop page: sticky contents beside the chapters */
.alm-sheet {
    display: grid;
    gap: 40px;
}

.alm-toc {
    padding: 22px 24px;

    background: var(--lining-white);
    border: 1px solid var(--seam-line);
}

.alm-toc ol {
    display: grid;
    margin-top: 10px;
    padding: 0;

    list-style: none;
}

.alm-toc a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;

    font-size: 0.95rem;
    text-decoration: none;
    color: var(--felt-dark);

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

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

.alm-toc .alm-num {
    font-size: 1.05rem;
}

.alm-chapter {
    scroll-margin-top: 24px;
}

.alm-chapter + .alm-chapter {
    margin-top: 72px;
    padding-top: 44px;

    border-top: 1px solid var(--seam-line);
}

.alm-chapter h2 {
    margin-top: 10px;
}

.alm-chapter > p {
    max-width: 720px;
    margin-top: 18px;
}

.alm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding: 0;

    list-style: none;
}

.alm-chips li {
    padding: 10px 16px;

    font-size: 0.9rem;

    background: var(--wool-light);
    border: 1px solid var(--felt-dark);
}

.alm-chips .alm-num {
    margin-right: 6px;

    font-size: 1.25rem;
}

.alm-figure {
    max-width: 760px;
    margin-top: 32px;
    padding: 12px 12px 0;

    background: var(--lining-white);
    border: 1px solid var(--seam-line);
}

.alm-figure img {
    width: 100%;
    max-height: 520px;

    object-fit: cover;
}

.alm-figure figcaption {
    padding: 12px 4px 14px;

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

.alm-figure.alm-tilt {
    padding-bottom: 6px;
}

.alm-weeks {
    display: grid;
    max-width: 720px;
    margin-top: 28px;
    padding: 0;

    list-style: none;

    border: 1px solid var(--felt-dark);
}

.alm-weeks li {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 20px;

    background: var(--lining-white);
}

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

.alm-weeks .alm-num {
    font-size: 1.2rem;
}

.alm-weeks-note {
    max-width: 720px;
    margin-top: 20px;

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

.alm-rules {
    display: grid;
    gap: 16px;
    max-width: 720px;
    margin-top: 28px;
    padding: 0;

    list-style: none;
}

.alm-rules li {
    padding: 18px 22px;

    background: var(--wool-tint);
    border-left: 3px solid var(--felt-dark);
}

@media (min-width: 700px) {
    .alm-rules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    .alm-sheet {
        grid-template-columns: 250px minmax(0, 1fr);
        align-items: start;
        gap: 72px;
    }

    .alm-toc {
        position: sticky;
        top: 24px;
    }
}

/* inverse band */
.alm-inverse {
    color: var(--wool-light);

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

.alm-inverse .alm-label {
    color: var(--wool-tint);
}

.alm-inverse p:not(.alm-label) {
    max-width: 620px;
    margin-top: 20px;

    color: var(--wool-tint);
}

.alm-inverse .alm-btn {
    margin-top: 32px;
}

/* contact page */
.alm-contact {
    display: grid;
    gap: 48px;
    padding: 0 var(--selvedge-shift) var(--selvedge-shift) 0;

    isolation: isolate;
}

.alm-form-card {
    position: relative;
    order: -1;
    padding: 28px 24px;

    background: var(--lining-white);
    border: 1px solid var(--felt-dark);
}

.alm-form-card::before {
    position: absolute;
    top: var(--selvedge-shift);
    left: var(--selvedge-shift);
    right: calc(var(--selvedge-shift) * -1);
    bottom: calc(var(--selvedge-shift) * -1);
    z-index: -1;

    content: "";

    border: 1px solid var(--thread-grey);
}

.alm-form-card h2 {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.alm-field {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.alm-field label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.alm-field input {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;

    font-size: 1rem;
    color: var(--felt-dark);

    background: var(--wool-light);
    border: 1px solid var(--felt-dark);
    border-radius: 0;
}

.alm-consent {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    margin-top: 22px;

    font-size: 0.95rem;
}

.alm-consent input {
    width: 22px;
    height: 22px;
    margin: 2px 0 0;

    accent-color: var(--garnet);
}

.alm-form-note {
    margin-top: 10px;

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

.alm-form-card .alm-btn {
    width: 100%;
    margin-top: 24px;
}

.alm-form-msg {
    min-height: 1.6em;
    margin-top: 12px;

    font-size: 0.95rem;
    color: var(--garnet);
}

/* honeypot parked off-screen */
.alm-trap {
    position: absolute;
    left: -9999px;
    top: auto;

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

.alm-info {
    display: grid;
    gap: 28px;
}

.alm-info-card {
    padding: 24px;

    background: var(--wool-tint);
    border-top: 3px solid var(--felt-dark);
}

.alm-info-card dl {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.alm-info-card dt {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--thread-deep);
}

@media (min-width: 960px) {
    .alm-contact {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        align-items: start;
        gap: 56px;
    }

    .alm-form-card {
        order: 0;
        padding: 40px 40px 32px;
    }
}

/* legal pages: numbered clauses as cards */
.alm-legal {
    display: grid;
    gap: 24px;
}

.alm-clause {
    display: grid;
    gap: 14px;
    padding: 28px 24px;

    background: var(--lining-white);
    border: 1px solid var(--seam-line);
}

.alm-clause-num {
    font-size: 2.4rem;
    line-height: 1;
}

.alm-clause h2 {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
}

.alm-clause p,
.alm-clause ul {
    max-width: 760px;
}

.alm-clause p + p,
.alm-clause p + ul,
.alm-clause ul + p {
    margin-top: 12px;
}

.alm-clause ul {
    padding-left: 20px;
}

.alm-clause li + li {
    margin-top: 6px;
}

.alm-clause .alm-table-wrap {
    margin-top: 8px;

    border-color: var(--seam-line);
}

.alm-data {
    min-width: 520px;
}

.alm-data-wide {
    min-width: 680px;
}

@media (min-width: 800px) {
    .alm-clause {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 6px 28px;
        padding: 36px 40px;
    }

    .alm-clause > :not(.alm-clause-num) {
        grid-column: 2;
    }

    .alm-clause-num {
        grid-row: 1 / span 6;
    }
}

/* thanks + 404 */
.alm-next {
    display: grid;
    gap: 44px;
    padding: 0 var(--selvedge-shift) var(--selvedge-shift) 0;

    isolation: isolate;
}

.alm-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: calc(var(--selvedge-shift) + 28px);
}

@media (min-width: 800px) {
    .alm-next {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px;
    }
}

/* cookie tray */
.cc-tray {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 150;
    display: block;
    padding: 18px 20px;

    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--felt-dark);

    background: var(--lining-white);
    border: 1px solid var(--felt-dark);
}

.cc-tray[hidden] {
    display: none;
}

.cc-tray-q {
    font-family: var(--serif);
    font-size: 1.15rem;
}

.cc-tray p + p {
    margin-top: 6px;
}

.cc-tray-act {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.cc-tray .alm-btn {
    min-height: 46px;
    padding: 10px 14px;
}

@media (min-width: 640px) {
    .cc-tray {
        left: 20px;
        right: auto;
        bottom: 20px;

        width: 400px;
    }
}

/* phones: tighter tray and hero so the first screen keeps CTA and form clear of it */
@media (max-width: 639px) {
    .cc-tray {
        padding: 12px 14px;

        font-size: 0.88rem;
        line-height: 1.45;
    }

    .cc-tray-q {
        font-size: 1rem;
    }

    .cc-tray-act {
        margin-top: 10px;
    }

    .alm-hero {
        min-height: 740px; /* keeps the deck tabs below a 1084px first screen, CTA above the tray */
        padding-top: 88px;
        padding-bottom: 36px;
    }

    .alm-hero-act {
        margin-top: 24px;
    }

    .alm-head {
        padding-top: 40px;
        padding-bottom: 32px;
    }
}

.alm-form-tail {
    padding-top: 14px;

    border-top: 1px solid var(--seam-line);
}

.alm-next .alm-step-num {
    display: block;
    margin-bottom: 14px;
}
