/*
 * Bourdon Spirits: front-end styles.
 * Ported from the v8 prototype. Section classes (.hero, .inv, .svc, .dist, .buy, .contact)
 * are set on Group blocks in the Home page; table looks are block styles
 * (Spec sheet, Key / value list, Compact) that editors can pick in the sidebar.
 */

:root {
	--ink: #1b1a17;
	--ink2: #47443e;
	--grey: #77736b;
	--line: #d6d4cf;
	--line2: #ebeae7;
	--bg: #ffffff;
	--tint: #f4f4f2;
	--still: #a35a2a;
	--display: "Marcellus", "Times New Roman", serif;
	--text: "Libre Franklin", "Franklin Gothic Book", "Helvetica Neue", Arial, sans-serif;
	--pad: clamp(20px, 4.2vw, 64px);
	--hdr-h: 76px;
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 8px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.6; font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
/* :is(...) raises these above core's ":root :where(.is-layout-flow) > :last-child" margin reset */
:root :is(.wp-site-blocks, .editor-styles-wrapper) :is(h1, h2, h3) { font-family: var(--display); font-weight: 400; letter-spacing: 0; margin: 0; line-height: 1.08; }
:root :is(.wp-site-blocks, .editor-styles-wrapper) h2 { font-size: clamp(30px, 3vw, 42px); margin: 0 0 22px; }
:root :is(.wp-site-blocks, .editor-styles-wrapper) h3 { font-size: clamp(22px, 2vw, 28px); margin: 0 0 14px; }
:root :is(.wp-site-blocks, .editor-styles-wrapper) p { margin: 0 0 1em; }
:root figure.wp-block-image, :root figure.wp-block-video, :root figure.wp-block-table { margin: 0; }
mark.has-inline-color { padding: 0; }

/* Action link (paragraph block style) */
.is-style-action-link a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.is-style-action-link a:hover { text-decoration-color: var(--still); }
:root p.is-style-action-link { margin-bottom: 0; }

/* Lead / fine print (paragraph block styles) */
:root p.is-style-lead { font-size: clamp(21px, 1.9vw, 26px); line-height: 1.45; }
:root p.is-style-fine-print { font-size: 13.5px; color: var(--grey); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.admin-bar .hdr { top: 32px; }
@media (max-width: 782px) { .admin-bar .hdr { top: 46px; } }
@media (max-width: 600px) { .admin-bar .hdr { top: 0; } }
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--pad); height: var(--hdr-h); }
.brand { line-height: 0; }
.brand a, .brand img { display: block; }
.hdr .brand img { width: 262px; height: 34px; }

.hdr .nav.wp-block-navigation { font-size: 15.5px; }
.hdr .nav.wp-block-navigation,
.hdr .nav .wp-block-navigation__container { gap: 30px; align-items: center; }
.hdr .nav .wp-block-navigation-item__content { text-decoration: none; color: var(--ink2); }
.hdr .nav .wp-block-navigation-item__content:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.hdr .nav .nav-cta .wp-block-navigation-item__content { color: var(--ink); font-weight: 600; border: 1.5px solid var(--ink); padding: 9px 16px; }
.hdr .nav .nav-cta .wp-block-navigation-item__content:hover { background: var(--ink); color: #fff; text-decoration: none; }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero-media { background: #9a6446; }
.hero-media video { display: block; width: 100%; height: min(62vh, 640px); object-fit: cover; object-position: 50% 50%; }
.hero-text { position: relative; z-index: 1; background: #fff; margin: -140px 0 0 0; width: min(calc(720px + var(--pad)), calc(100% - var(--pad))); padding: 40px 56px 8px var(--pad); }
:root .hero-text h1 { font-size: clamp(42px, 5.2vw, 74px); margin-bottom: 20px; }
:root .hero-text p { font-size: 19px; color: var(--ink2); max-width: 34em; margin-bottom: 22px; }
:root .hero-text p.is-style-action-link { font-size: 17px; color: var(--ink); margin-bottom: 0; }

/* ---------- 12-column sections ---------- */
.intro, .inv, .svc, .dist, .buy, .contact { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 32px; }

/* intro */
.intro { padding: 56px var(--pad) 96px; }
:root .intro .lead { grid-column: 1 / span 7; font-size: clamp(21px, 1.9vw, 26px); line-height: 1.45; margin: 0; }
:root .intro .side { grid-column: 9 / span 4; color: var(--ink2); margin: 6px 0 0; font-size: 16px; }

/* inventory */
.inv { padding: 72px var(--pad) 110px; border-top: 1px solid var(--line); }
.inv-head { grid-column: 1 / span 4; }
:root .inv-head p { color: var(--ink2); font-size: 16px; max-width: 26em; }
.table-box { grid-column: 5 / span 8; }
.inv-photo { grid-column: 4 / span 9; margin-top: 80px !important; }
.inv-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 40%; }
:root p.after-table.is-style-action-link { margin: 22px 0 16px; color: var(--grey); }
.after-table a { color: var(--ink); }
.after-table a:first-child { margin-right: 8px; }
.after-table a + a { margin-left: 8px; }

/* custom bottling */
.svc { padding: 96px var(--pad) 112px; border-top: 1px solid var(--line); align-items: start; }
.svc-head { grid-column: 1 / span 4; }
:root .svc-head p { color: var(--ink2); max-width: 26em; }
:root .svc-head p.is-style-action-link { color: var(--ink); }
.svc-specs { grid-column: 6 / span 6; padding-top: 10px; }
:root .svc-specs .wp-block-table { margin-bottom: 28px; }

/* distillery */
.dist { padding: 88px var(--pad) 0; align-items: end; background: var(--tint); }
.dist-photo { grid-column: 1 / span 6; margin-top: -1px !important; }
.dist-photo img { width: 100%; height: 680px; object-fit: cover; object-position: 16% 50%; }
.band-room + .dist .dist-photo img { height: 620px; }
.dist-text { grid-column: 8 / span 4; padding: 80px 0 72px; }
:root .dist-text p { color: var(--ink2); }
:root .dist-text p.is-style-action-link { color: var(--ink); }
:root .dist-text .addr { margin-bottom: 18px; }

/* full-width photo bands */
.band img { width: 100%; height: min(56vh, 520px); object-fit: cover; object-position: 50% 55%; }
.band-room img { height: min(80vh, 780px); object-position: 50% 30%; }

/* buying */
.buy { padding: 88px var(--pad) 80px; }
.buy-head { grid-column: 1 / span 3; }
.buy-photo { margin-top: 36px !important; }
.buy-photo img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.buy-dl { grid-column: 5 / span 7; margin-top: 62px !important; align-self: start; }

/* contact */
.contact { padding: 88px var(--pad) 104px; border-top: 1px solid var(--line); }
.contact-info { grid-column: 1 / span 4; }
:root .contact-info p { color: var(--ink2); }
:root .contact-info .address { color: var(--ink); font-size: 18px; line-height: 1.75; margin: 26px 0 14px; }
.contact-info .address a { text-decoration: none; }
.contact-info .address a:hover { text-decoration: underline; }

/* ---------- tables (block styles) ---------- */
.wp-block-table table { border-collapse: collapse; width: 100%; font-variant-numeric: lining-nums tabular-nums; }
.wp-block-table thead, .wp-block-table tfoot { border: 0; }
.wp-block-table th, .wp-block-table td { border: 0; padding: 0; text-align: left; vertical-align: top; font-weight: 400; }
.wp-block-table :where(figcaption) { text-align: left; font-size: 13.5px; color: var(--grey); margin: 0; }
.wp-block-table [data-align="right"] { text-align: right; }

/* Spec sheet: inventory table */
.is-style-spec-sheet { display: flex; flex-direction: column; overflow: visible; }
.is-style-spec-sheet figcaption { order: -1; padding-bottom: 10px; }
.is-style-spec-sheet table { font-size: 16px; }
.is-style-spec-sheet th, .is-style-spec-sheet td { padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); }
.is-style-spec-sheet thead th { font-size: 13.5px; font-weight: 600; color: var(--ink2); border-bottom: 1.5px solid var(--ink); padding-bottom: 9px; line-height: 1.3; }
.is-style-spec-sheet tbody th { font-weight: 600; }
.is-style-spec-sheet [data-align="right"] { padding-right: 28px; white-space: nowrap; }
.is-style-spec-sheet tbody a { color: var(--ink); text-decoration: underline; text-decoration-color: #a9a6a0; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.is-style-spec-sheet tbody a:hover { text-decoration-color: var(--ink); }
.is-style-spec-sheet sup { font-size: .68em; line-height: 0; margin-left: 1px; }
.is-style-spec-sheet tfoot td { border-bottom: 0; padding-top: 14px; font-size: 13.5px; color: var(--grey); line-height: 1.7; }

/* Key / value list: bottling specs and buying steps */
.is-style-key-value table { border-top: 1.5px solid var(--ink); font-size: 15.5px; }
.is-style-key-value td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.is-style-key-value td:first-child { color: var(--ink); padding-right: 20px; }
.is-style-key-value td:last-child { text-align: right; }

/* buying steps variant: term column + description */
.buy-dl table { font-size: 17px; }
.buy-dl td { padding: 16px 0; }
.buy-dl td:first-child { font-weight: 600; width: 150px; padding-right: 24px; }
.buy-dl td:last-child { text-align: left; color: var(--ink2); }

/* Compact: pot stills */
.is-style-compact { display: flex; flex-direction: column; max-width: 340px; margin: 26px 0 !important; }
.is-style-compact figcaption { order: -1; padding-bottom: 8px; }
.is-style-compact table { font-size: 15.5px; }
.is-style-compact th, .is-style-compact td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.is-style-compact thead th { font-size: 13.5px; font-weight: 600; color: var(--ink2); border-bottom: 1.5px solid var(--ink); }

/* ---------- inquiry form ---------- */
.form { grid-column: 6 / span 6; display: grid; gap: 20px; align-content: start; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form label { display: grid; gap: 7px; font-size: 14.5px; font-weight: 500; color: var(--ink2); }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #a9a6a0; border-radius: 0; padding: 11px 12px; width: 100%; box-sizing: border-box; margin: 0; }
.form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%231b1a17'/%3E%3C/svg%3E"); background-position: calc(100% - 14px) 50%; background-repeat: no-repeat; padding-right: 36px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form button { font: inherit; font-size: 16px; font-weight: 600; color: #fff; background: var(--still); border: 0; border-radius: 0; padding: 13px 28px; cursor: pointer; }
.form button:hover { background: #8a4b22; }
.form button[disabled] { opacity: .6; cursor: progress; }
:root .form .sent { margin: 0; font-size: 14.5px; color: var(--ink2); }
:root .form .sent.is-error { color: #a1271b; }
.form.is-sent .f2, .form.is-sent > label, .form.is-sent button { display: none; }
:root .form.is-sent .sent { font-size: 17px; color: var(--ink); }
.bs-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.ftr { background: #0c0b0c; color: #d8d4cc; font-size: 15px; display: grid; grid-template-columns: repeat(12, 1fr); }
.ftr-in { grid-column: 1 / span 9; padding: 64px var(--pad) 36px; }
.ftr-photo { grid-column: 10 / span 3; position: relative; min-height: 420px; }
.ftr-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.ftr .brand img { width: 300px; height: 39px; }
.ftr-cols { display: grid; grid-template-columns: 5fr 3fr 2fr; gap: 32px; margin-top: 40px !important; padding-bottom: 36px; border-bottom: 1px solid #36333a; }
:root .ftr-cols p { margin: 0; line-height: 1.8; }
.ftr a { text-decoration: none; }
.ftr a:hover { text-decoration: underline; }
:root .ftr .ttb { margin: 26px 0 8px; color: #f3eee6; }
:root .ftr .credit { margin: 0; font-size: 13px; color: #9c978d; }

/* ---------- block editor: let home-page sections use the full canvas width ---------- */
.editor-styles-wrapper .is-root-container > :is(.hero, .intro, .inv, .svc, .dist, .buy, .contact, .band) { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.editor-styles-wrapper .contact .wp-block-shortcode { grid-column: 6 / span 6; }

/* ---------- inner pages ---------- */
.bs-page { padding: 72px var(--pad) 104px; }
:root .bs-page > .wp-block-post-title { margin-bottom: 32px; font-size: clamp(36px, 4vw, 56px); }
:root .bs-prose > :is(h2, h3) { margin-top: 1.6em; }
:root .bs-prose > :is(ul, ol) { margin: 0 0 1em; padding-left: 1.2em; }
.bs-prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bs-date { color: var(--grey); font-size: 14px; margin-bottom: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
	.hdr .nav .wp-block-navigation-item:not(.nav-cta) { display: none; }
	:root .intro .lead { grid-column: 1 / span 12; }
	:root .intro .side { grid-column: 1 / span 9; margin-top: 22px; }
	.inv-head { grid-column: 1 / span 12; }
	.table-box { grid-column: 1 / span 12; margin-top: 12px; }
	.inv-photo { grid-column: 2 / span 11; }
	.svc-head { grid-column: 1 / span 5; }
	.svc-specs { grid-column: 7 / span 6; }
	.dist-photo { grid-column: 1 / span 12; }
	.dist-photo img { height: 420px; }
	.dist-text { grid-column: 1 / span 10; padding: 48px 0 64px; }
	.buy-head { grid-column: 1 / span 4; }
	.buy-dl { grid-column: 6 / span 7; }
	.contact-info { grid-column: 1 / span 12; margin-bottom: 36px; }
	.form { grid-column: 1 / span 12; }
	.ftr-in { grid-column: 1 / span 8; }
	.ftr-photo { grid-column: 9 / span 4; }
	.ftr-cols { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 640px) {
	:root { --hdr-h: 62px; }
	body { font-size: 16px; }
	.hdr .brand img { width: 190px; height: 25px; }
	.hdr .nav .nav-cta .wp-block-navigation-item__content { padding: 7px 11px; font-size: 14px; }
	.hero-media video { height: 46vh; min-height: 300px; }
	.hero-text { margin: -48px 0 0 0; width: calc(100% - var(--pad)); padding: 28px 20px 8px var(--pad); }
	:root .hero-text p { font-size: 17px; }
	.intro { padding: 36px var(--pad) 64px; }
	:root .intro .lead { font-size: 20px; }
	:root .intro .side { grid-column: 1 / span 12; }
	.inv { padding-top: 56px; padding-bottom: 72px; }

	/* spec sheet: stack each row as a card, labels come from the header row (site.js) */
	.is-style-spec-sheet table, .is-style-spec-sheet thead, .is-style-spec-sheet tbody, .is-style-spec-sheet tfoot,
	.is-style-spec-sheet tr, .is-style-spec-sheet th, .is-style-spec-sheet td { display: block; }
	.is-style-spec-sheet thead { display: none; }
	.is-style-spec-sheet figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.is-style-spec-sheet tbody tr { border-top: 1.5px solid var(--ink); padding: 12px 0 16px; }
	.is-style-spec-sheet tbody th { border: 0; padding: 0 0 6px; font-size: 17px; }
	.is-style-spec-sheet tbody td { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line2); padding: 7px 0; text-align: right; }
	.is-style-spec-sheet tbody td::before { content: attr(data-label); color: var(--grey); text-align: left; }
	.is-style-spec-sheet [data-align="right"] { padding-right: 0; }
	.is-style-spec-sheet tfoot td { display: block; text-align: left; }

	/* "Request the inventory sheet or ask for samples": one link per line, hide the "or" */
	:root .after-table { font-size: 0; }
	:root .after-table a { display: block; font-size: 16px; margin: 0 0 12px; width: max-content; }

	.inv-photo { grid-column: 1 / span 12; margin-top: 44px !important; }
	.svc { padding: 64px var(--pad); }
	.svc-head, .svc-specs { grid-column: 1 / span 12; }
	.svc-specs { padding-top: 12px; }
	.dist { padding: 0; }
	.dist-photo img { height: 360px; }
	.dist-text { grid-column: 1 / span 12; padding: 44px var(--pad) 56px; }
	.band img { height: 240px; }
	.band-room img { height: 340px; object-position: 56% 35%; }
	.buy { padding: 64px var(--pad); }
	.buy-head { grid-column: 1 / span 12; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: start; }
	.buy-head h2 { grid-column: 1 / span 2; }
	.buy-photo { margin-top: 8px !important; grid-column: 2; }
	.buy-photo img { aspect-ratio: 4 / 5; }
	.buy-dl { grid-column: 1 / span 12; margin-top: 40px !important; }
	.buy-dl table, .buy-dl tbody, .buy-dl tr, .buy-dl td { display: block; }
	.buy-dl table { font-size: 16px; }
	.buy-dl tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
	.buy-dl td, .buy-dl td:first-child { width: auto; padding: 0; border: 0; }
	.buy-dl td:first-child { margin-bottom: 4px; }
	.contact { padding: 64px var(--pad) 72px; }
	.f2 { grid-template-columns: 1fr; }
	.form button { width: 100%; }
	.ftr .brand img { width: 230px; height: 30px; }
	.ftr-cols { grid-template-columns: 1fr; gap: 20px; }
	.ftr { display: block; }
	.ftr-photo { min-height: 0; height: 300px; }
	.bs-page { padding: 48px var(--pad) 72px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
