@font-face {
    font-family: "Hrabia Condensed";
    src: url("../fonts/nimbus-sans-narrow-bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Independent side artwork, a repeatable wall and a separate wooden surface.
   The artwork keeps its proportions; wider viewports reveal more of the middle. */
.hp-portfolio {
    --hp-paper: #f9eedb;
    --hp-accent: #db713c;
    --hp-bottle-height: clamp(266px, 19.5vw, 365px);
    --hp-caption-height: 78px;
    --hp-row-gap: 30px;
    position: relative;
    z-index: 1;
    isolation: isolate;
    scroll-margin-top: 100px;
    color: var(--hp-paper);
    background: #100f0d;
}

.hp-portfolio__tabs {
    position: absolute;
    z-index: 4;
    top: 27px;
    right: clamp(28px, 5vw, 110px);
    display: flex;
    gap: 22px;
}

.hp-portfolio__tab {
    position: relative;
    padding: 10px 0 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #c2b8a6;
    font: 700 13px/1.2 "Hrabia Condensed", Arial, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
}

.hp-portfolio__tab[aria-selected="true"] { color: #fff5e5; border-color: var(--hp-accent); }
.hp-portfolio__tab:hover { color: #fff5e5; }
.hp-portfolio[data-brand="baron"] .hp-portfolio__tab { color: #556878; }
.hp-portfolio[data-brand="baron"] .hp-portfolio__tab[aria-selected="true"],
.hp-portfolio[data-brand="baron"] .hp-portfolio__tab:hover { color: #183e62; border-color: #183e62; }

.hp-panel {
    --hp-wall: url("../images/portfolio/hrabia-wall.webp");
    --hp-wood: url("../images/portfolio/hrabia-wood.webp");
    position: relative;
    isolation: isolate;
    padding: 38px 0 0;
    background: #100f0d;
}
.hp-panel[hidden] { display: none; }
.hp-panel--baron {
    --hp-wall: url("../images/portfolio/baron-wall.webp");
    --hp-wood: url("../images/portfolio/baron-wood.webp");
    --hp-accent: #254f72;
    color: #173e61;
    background: #f5e8d0;
}
.hp-scenery {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.hp-scenery__wall {
    position: absolute;
    inset: 0;
    background-image: var(--hp-wall);
    background-size: 1216px 580px;
    background-repeat: repeat;
}
.hp-scenery__floor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 119px;
    background-image: var(--hp-wood);
    background-repeat: repeat-x;
    background-size: auto 119px;
    -webkit-mask-image: linear-gradient(transparent, #000 24%, #000);
    mask-image: linear-gradient(transparent, #000 24%, #000);
}
.hp-panel--baron .hp-scenery__floor { opacity: .6; }
.hp-scenery__side {
    position: absolute;
    bottom: 0;
    width: auto;
    height: 100%;
    max-width: none;
    max-height: 680px;
    object-fit: contain;
}
.hp-scenery__side--left {
    left: 0;
    --hp-side-mask: linear-gradient(90deg, #000 40%, #000d 61%, transparent 100%);
}
.hp-scenery__side--right {
    right: 0;
    --hp-side-mask: linear-gradient(270deg, #000 47%, #000d 64%, transparent 100%);
}
.hp-scenery__side {
    -webkit-mask-image: var(--hp-side-mask), linear-gradient(to bottom, transparent, #000 15%);
    mask-image: var(--hp-side-mask), linear-gradient(to bottom, transparent, #000 15%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
.hp-panel__inner { width: 100%; margin: 0 auto; }
.hp-heading { position: relative; z-index: 1; margin: 0 auto 25px; text-align: center; }
.hp-heading h2 {
    margin: 0;
    font-family: "Hrabia Slab", Georgia, serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -.025em;
}
.hp-heading__main {
    display: block;
    font-size: clamp(58px, 5.2vw, 91px);
    line-height: .99;
}
.hp-heading__sub {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    color: var(--hp-accent);
    font-size: clamp(29px, 2.75vw, 48px);
    line-height: 1.12;
    white-space: nowrap;
}
.hp-heading__ornament { display: inline-flex; align-items: center; width: 48px; height: 13px; gap: 8px; }
.hp-heading__ornament::before { content: ""; flex: 1; height: 1px; background: currentColor; }
.hp-heading__ornament::after { content: "★"; font: 12px/1 Georgia, serif; }
.hp-heading__ornament:last-child { transform: rotate(180deg); }
.hp-panel--baron .hp-heading__sub { font-size: clamp(24px, 2.4vw, 41px); }

.hp-lineup {
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: var(--hp-row-gap) 0;
    width: min(84%, 1336px);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
.hp-product { min-width: 0; margin: 0; padding: 0; }
.hp-product__link { display: block; position: relative; text-align: center; }
.hp-product__media {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: flex-end;
    height: var(--hp-bottle-height);
}
.hp-product__media::after {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: -7px;
    left: 50%;
    width: calc(var(--hp-bottle-height) * .38);
    height: 18px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #000b;
    filter: blur(7px);
}
.hp-product__bottle {
    position: relative;
    display: block;
    height: var(--hp-bottle-height);
    width: calc(var(--hp-bottle-height) * 403 / 1537);
    overflow: hidden;
    transition: transform 220ms ease;
}
/* Crop transparent source margins with CSS; the original labels stay intact. */
.hp-product__bottle img {
    position: absolute;
    width: 228.536%;
    height: 133.247%;
    max-width: none;
    left: -62.035%;
    top: -7.677%;
}
.hp-product__name {
    position: relative;
    display: flex;
    height: var(--hp-caption-height);
    padding: 22px 4px 12px;
    justify-content: center;
    align-items: flex-start;
    color: var(--hp-product-color);
    /* Reuse the layout's display serif, scaled for readable product captions. */
    font: 700 clamp(15px, 1.15vw, 18px)/1.2 "Hrabia Slab", Georgia, serif;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.hp-product + .hp-product .hp-product__name::before {
    content: "";
    position: absolute;
    left: 0;
    top: 26px;
    width: 1px;
    height: 16px;
    background: #e7d1aa55;
}
.hp-product__link:hover .hp-product__bottle { transform: translateY(-7px); }
.hp-product__link:hover .hp-product__name { text-decoration: underline; text-underline-offset: 5px; }
.hp-product__link:focus-visible { outline: 2px solid var(--hp-product-color); outline-offset: 5px; }
.hp-panel--baron .hp-lineup { width: min(58%, 820px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-panel--baron .hp-product__name { font-size: clamp(18px, 1.5vw, 21px); }
.hp-panel--baron .hp-product__name::before { background: #254f7240; }
.hp-panel--baron .hp-product__media::after { background: #36200a70; }
.hp-panel__footer { display: flex; justify-content: center; height: 39px; padding-top: 9px; }
.hp-catalog-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    position: relative;
    z-index: 3;
    min-height: 52px;
    padding: 14px 28px;
    border: 1px solid #efba9d;
    box-shadow: inset 0 0 0 3px #81151b, inset 0 0 0 4px #e3aa8266, 0 4px 12px #0002;
    background: #a61b23;
    color: #fff5e5;
    font: 700 16px/1.2 "Hrabia Condensed", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: .045em;
    transition: background-color 180ms ease;
}
.hp-catalog-link .hr-arrow { width: 22px; height: 22px; flex: 0 0 22px; }
.hp-catalog-link:hover { background: #83141b; }
.hp-panel--baron .hp-catalog-link { background: #173e61; border-color: #b0c0ca; box-shadow: inset 0 0 0 3px #173e61, inset 0 0 0 4px #b0c0ca99, 0 4px 12px #0002; }
.hp-panel--baron .hp-catalog-link:hover { background: #102e4a; }

@media (min-width: 2200px) {
    .hp-panel { padding-top: 45px; }
    .hp-heading { margin-bottom: 30px; }
    .hp-scenery__side { max-height: 710px; }
}
@media (max-width: 1279px) {
    .hp-panel { padding-top: 78px; }
    .hp-portfolio__tabs { top: 20px; left: 0; right: 0; justify-content: center; }
    .hp-lineup { width: 88%; }
    .hp-scenery__side { max-height: 520px; }
    .hp-heading__main { font-size: clamp(52px, 6.5vw, 78px); }
    .hp-heading__sub { font-size: clamp(26px, 3.4vw, 40px); }
}
@media (max-width: 1279px) {
    .hp-portfolio { --hp-bottle-height: clamp(210px, 29vw, 265px); --hp-row-gap: 25px; }
    .hp-lineup { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 86%; }
    .hp-lineup::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0 -12vw;
        background-image: var(--hp-wood);
        background-size: 1086px 188px;
        -webkit-mask-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hp-bottle-height) - 8px), #000 calc(var(--hp-bottle-height) + 3px), #000 calc(var(--hp-bottle-height) + 28px), transparent calc(var(--hp-bottle-height) + 61px), transparent calc(var(--hp-bottle-height) + var(--hp-caption-height) + var(--hp-row-gap)));
        mask-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hp-bottle-height) - 8px), #000 calc(var(--hp-bottle-height) + 3px), #000 calc(var(--hp-bottle-height) + 28px), transparent calc(var(--hp-bottle-height) + 61px), transparent calc(var(--hp-bottle-height) + var(--hp-caption-height) + var(--hp-row-gap)));
    }
    .hp-product:nth-child(4n+1) .hp-product__name::before { display: none; }
    .hp-panel--baron .hp-lineup { width: 80%; }
    .hp-panel--baron .hp-lineup::before { display: none; }
    .hp-scenery__side { max-height: 370px; }
    .hp-product__name { font-size: clamp(15px, 2.5vw, 18px); }
}
@media (max-width: 599px) {
    .hp-portfolio { --hp-bottle-height: 225px; --hp-row-gap: 23px; scroll-margin-top: 76px; }
    .hp-panel { padding-top: 76px; }
    .hp-heading { margin-bottom: 30px; padding: 0 16px; }
    .hp-heading__main { font-size: clamp(39px, 10.5vw, 60px); }
    .hp-heading__sub { gap: 6px; margin-top: 5px; font-size: clamp(22px, 5.9vw, 34px); }
    .hp-heading__ornament { width: 20px; gap: 3px; }
    .hp-heading__ornament::after { font-size: 8px; }
    .hp-heading__ornament::before { display: none; }
    .hp-heading__ornament:last-child { justify-content: end; }
    .hp-lineup { width: calc(100% - 44px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-product__name { font-size: clamp(15px, 4.35vw, 18px); }
    .hp-product:nth-child(odd) .hp-product__name::before { display: none; }
    .hp-scenery__side { max-height: 225px; }
    .hp-scenery__side--left { left: -35px; }
    .hp-scenery__side--right { right: -45px; }
    .hp-panel--baron .hp-heading__sub { white-space: normal; font-size: 25px; line-height: 1.15; }
    .hp-panel--baron .hp-heading__sub > span:nth-child(2) { max-width: 270px; }
    .hp-panel--baron .hp-lineup { width: calc(100% - 24px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hp-panel--baron .hp-product__name { font-size: 16px; padding-inline: 3px; }
    .hp-panel--baron .hp-product:nth-child(odd) .hp-product__name::before { display: block; }
    .hp-panel--baron .hp-product:first-child .hp-product__name::before { display: none; }
    .hp-catalog-link { gap: 22px; padding-inline: 22px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .hp-product__bottle, .hp-catalog-link { transition: none; }
    .hp-product__link:hover .hp-product__bottle { transform: none; }
}
