/*
 * Design tokens and front-end styles for The Victorian.
 *
 * Measurements come from the 1602px-wide Figma frame ("Frame 13"):
 * container 1402px with 100px side margins, header 107px tall with a 1px
 * rule beneath, buttons 231x49 with a 1px border, beer cards 311x466,
 * event cards 311x550, gallery tiles 319x396. Type sizes derived from
 * measured cap heights: H1/H2 40px, card titles 36px, event titles 28px,
 * nav 20px, pre-headers 16px, body 18px on a 28px line.
 */

:root {
    --tv-ink: #0f0f0f;          /* page background */
    --tv-card: #000000;         /* card background */
    --tv-panel: #4f4f4f;        /* placeholder tiles, dark logo */
    --tv-paper: #fffffa;        /* text, rules, borders */
    --tv-paper-2: #f6f5ee;      /* secondary off-white */
    --tv-muted: #b3b3b3;        /* secondary text */
    --tv-disabled: #8f8f8f;     /* inactive carousel arrows */

    --tv-font-display: "Libre Baskerville", Baskerville, "Times New Roman", serif;
    --tv-font-body: "Figtree", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;

    --tv-container: 1402px;
    --tv-gutter: 100px;
    --tv-rule: 1px solid var(--tv-paper);

    --tv-text-h1: 40px;
    --tv-text-h2: 40px;
    --tv-text-card-title: 36px;
    --tv-text-event-title: 28px;
    --tv-text-nav: 20px;
    --tv-text-preheader: 16px;
    --tv-text-body: 18px;
    --tv-leading-body: 28px;
    --tv-tracking-caps: 0.02em;
}

/* Pre-header: small caps line with a rule beneath, as above every section title. */
.tv-preheader {
    font-family: var(--tv-font-display);
    font-size: var(--tv-text-preheader);
    letter-spacing: var(--tv-tracking-caps);
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: var(--tv-rule);
    display: inline-block;
}

/* Section headings are display caps with a two-line stack in the design. */
.tv-heading {
    font-family: var(--tv-font-display);
    font-size: var(--tv-text-h2);
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: var(--tv-tracking-caps);
}

/* Outlined button, 231x49 in the design. */
.wp-block-button.is-style-outline .wp-block-button__link,
.tv-button {
    font-family: var(--tv-font-display);
    font-size: var(--tv-text-body);
    line-height: 1;
    padding: 15px 20px;
    min-width: 231px;
    border: var(--tv-rule);
    border-radius: 0;
    background: transparent;
    color: var(--tv-paper);
    text-align: center;
}

/* Bordered panel used for beer and event cards. */
.wp-block-group.is-style-panel {
    padding: 20px;
    background: var(--tv-card);
    border: var(--tv-rule);
}

/*
 * Corner cut: the bar's ticket-notch frame. Concave quarter-circle corners
 * (30px in the design) with a hairline border that follows the arc.
 *
 * The element is masked to the notched outline, so whatever it holds is
 * clipped: photos, video, a group of blocks. The border is a ring painted by
 * ::after, built from three mask layers composited top-down:
 *   outline(r)  MINUS  ( outline(r + b)  INTERSECT  box inset by b )
 * The interior stays transparent, so it sits on any background. Override
 * --r, --b and --c per instance for other radii, weights or colours.
 */
.corner-cut,
.is-style-corner-cut {
    --r: 30px;
    --b: 1px;
    --c: var(--tv-paper);
    --R: calc(var(--r) + var(--b));
    position: relative;
    mask: radial-gradient(var(--r) at var(--r) var(--r), #0000 98%, #000)
        calc(-1 * var(--r)) calc(-1 * var(--r));
}

.corner-cut::after,
.is-style-corner-cut::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--c);
    mask:
        radial-gradient(var(--r) at var(--r) var(--r), #0000 98%, #000)
            calc(-1 * var(--r)) calc(-1 * var(--r)),
        radial-gradient(var(--R) at var(--R) var(--R), #0000 98%, #000)
            calc(-1 * var(--R)) calc(-1 * var(--R)),
        linear-gradient(#000 0 0) center / calc(100% - 2 * var(--b)) calc(100% - 2 * var(--b)) no-repeat;
    mask-composite: subtract, intersect, add;
}

/* The image block puts the class on the figure; keep the img flush to it. */
.wp-block-image.is-style-corner-cut img {
    display: block;
}
