/*
Theme Name: Booze.law
Theme URI: https://booze.law/
Author: Lindsey Zahn P.C.
Description: A news-first theme for Booze.law, the alcohol beverage law division of Lindsey Zahn P.C. Front page with a lead story and topic desks, article pages with sources and takeaway boxes, newsletter signup, and the bottle-and-section-sign logo.
Version: 2.5.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: boozelaw
*/

/* ---------- Tokens ---------- */
:root {
  --glass: #1E3B34;
  --glass-deep: #142923;
  --amber: #C08A2E;
  --amber-light: #DDAA4C;
  --amber-ink: #8A5A12;   /* amber dark enough for small text on white */
  --amber-wash: #F6EBD6;
  --mist: #E6ECE8;
  --paper: #FFFFFF;
  --ink: #17211D;
  --ink-soft: #4A5852;
  --rule: #CFD8D3;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(1.9rem, 3.4vw, 2.4rem);
  --step-4: clamp(2.2rem, 4.6vw, 3.6rem);

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 3px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: var(--step-0); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--glass); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--amber-ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-optical-sizing: auto; font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 100; width: auto; height: auto; clip: auto; padding: 0.75rem 1rem; background: var(--paper); color: var(--ink); }
.meta-sep { display: inline-block; width: 1px; height: 0.85em; background: var(--rule); margin: 0 0.6em; vertical-align: -0.08em; }

.button { display: inline-block; padding: 0.8rem 1.3rem; border-radius: var(--radius); background: var(--glass); color: var(--paper); font-weight: 600; text-decoration: none; border: 2px solid var(--glass); transition: background .15s, color .15s; }
.button:hover { background: var(--glass-deep); border-color: var(--glass-deep); color: var(--paper); }
.button--amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.button--amber:hover { background: var(--amber-light); border-color: var(--amber-light); color: var(--ink); }

/* Forms (search + generic newsletter embeds) */
.search-form { display: flex; gap: 0.5rem; max-width: 26rem; }
.search-form label { flex: 1; }
input[type="search"], input[type="email"], input[type="text"] { width: 100%; font: inherit; padding: 0.7rem 0.85rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.search-submit, input[type="submit"], button[type="submit"] { font: inherit; font-weight: 600; padding: 0.7rem 1.1rem; border-radius: var(--radius); border: 0; background: var(--glass); color: var(--paper); cursor: pointer; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 3px solid var(--glass); position: relative; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5.5rem; }
.brand { display: block; line-height: 0; }
.brand .logo-svg { height: 58px; width: auto; }
.custom-logo { max-height: 58px; width: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.55rem 0.8rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; align-items: center; }
.primary-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.97rem; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-cat > a { border-bottom-color: var(--amber); color: var(--ink); }
.primary-nav .menu-cta > a { background: var(--glass); color: var(--paper); padding: 0.55rem 0.95rem; border-radius: var(--radius); border: 0; }
.primary-nav .menu-cta > a:hover { background: var(--glass-deep); color: var(--paper); }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .brand .logo-svg, .custom-logo { height: 46px; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); z-index: 50; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.25rem; }
  .primary-nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--mist); }
  .primary-nav .menu-cta > a { text-align: center; margin-top: 0.75rem; }
}

/* Masthead line */
.masthead-line { border-bottom: 1px solid var(--rule); font-size: var(--step--1); color: var(--ink-soft); }
.masthead-line .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.masthead-line p { margin: 0; }
@media (max-width: 640px) { .masthead-line__date { display: none; } }

/* ---------- Story cards ---------- */
.kicker { display: inline-block; font-family: var(--body); font-size: 0.85rem; font-weight: 600; color: var(--amber-ink); text-decoration: none; margin-bottom: 0.45rem; }
.kicker:hover { text-decoration: underline; color: var(--amber-ink); }
.story__title a { color: var(--ink); text-decoration: none; }
.story__title a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.story__meta { font-size: var(--step--1); color: var(--ink-soft); margin: 0; }
.story__dek { color: var(--ink-soft); }
.story__img { display: block; margin-bottom: 1rem; overflow: hidden; background: var(--mist); }
.story__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.story--lead .story__title { font-size: var(--step-4); line-height: 1.06; letter-spacing: -0.015em; margin-bottom: 0.4em; }
.story--lead .story__dek { font-size: var(--step-1); line-height: 1.5; max-width: 40rem; margin-bottom: 0.9rem; }
.story--lead .kicker { font-size: 0.95rem; }

.story--card { border-top: 1px solid var(--rule); padding-top: 1rem; }
.story--card .story__title { font-size: 1.35rem; line-height: 1.2; margin-bottom: 0.5rem; }

.story--headline { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.story--headline:last-child { border-bottom: 0; }
.story--headline .story__title { font-size: 1.12rem; line-height: 1.25; margin-bottom: 0.3rem; }

.story--row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.story--row.has-post-thumbnail { grid-template-columns: 14rem 1fr; }
.story--row .story__img { margin: 0; }
.story--row .story__title { font-size: var(--step-2); line-height: 1.15; margin-bottom: 0.4rem; }
.story--row .story__dek { margin-bottom: 0.5rem; }
@media (max-width: 640px) { .story--row.has-post-thumbnail { grid-template-columns: 1fr; } }

.rail-title { font-family: var(--body); font-size: 0.95rem; font-weight: 600; color: var(--glass); border-top: 3px solid var(--glass); padding-top: 0.6rem; margin: 0 0 0.25rem; letter-spacing: 0; }

/* ---------- Front page ---------- */
.front-top { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.front-top__inner { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
.front-top__latest { border-left: 1px solid var(--rule); padding-left: clamp(1.5rem, 3vw, 2.5rem); }
@media (max-width: 900px) { .front-top__inner { grid-template-columns: 1fr; } .front-top__latest { border-left: 0; padding-left: 0; } }
.front-empty { padding: 5rem 0; }

.desk { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }
.desk__head { border-top: 3px solid var(--glass); padding-top: 1.25rem; }
.desk__head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 0.5rem 1.5rem; margin-bottom: 1.5rem; }
.desk__head h2 { font-size: var(--step-2); margin: 0; }
.desk__head h2 a { color: var(--glass-deep); text-decoration: none; }
.desk__head h2 a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.desk__head p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.desk__more { font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.desk__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 900px) {
  .desk__head { grid-template-columns: 1fr; }
  .desk__grid { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Newsletter */
.newsletter { background: var(--glass); color: var(--paper); padding: clamp(2.5rem, 6vw, 3.75rem) 0; margin: clamp(1rem, 3vw, 2rem) 0 0; }
.desk + .newsletter { margin-bottom: clamp(1rem, 3vw, 2rem); }
.newsletter__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.newsletter h2 { color: var(--paper); font-size: var(--step-3); margin-bottom: 0.3em; }
.newsletter p { color: #C9D6D0; margin: 0; max-width: 34rem; }
.newsletter a:not(.button) { color: var(--amber-light); }
.newsletter .admin-note { font-size: var(--step--1); border: 1px dashed var(--amber-light); padding: 0.75rem 1rem; }
@media (max-width: 800px) { .newsletter__inner { grid-template-columns: 1fr; } }

/* Firm band */
.firm { background: var(--mist); padding: clamp(3rem, 7vw, 5rem) 0; }
.firm__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.firm__intro { display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: start; }
.firm__mark .logo-svg { width: 64px; height: auto; }
.firm h2 { font-size: var(--step-3); color: var(--glass-deep); }
.firm p { color: var(--ink-soft); max-width: 32rem; }
.firm__tiers { list-style: none; margin: 0; padding: 0; counter-reset: tier; }
.firm__tiers li { counter-increment: tier; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.firm__tiers li::before { content: counter(tier); grid-row: span 2; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--glass); color: var(--paper); font-family: var(--display); font-weight: 700; }
.firm__tiers strong { font-weight: 600; }
.firm__tiers span { color: var(--ink-soft); font-size: var(--step--1); }
@media (max-width: 900px) { .firm__inner { grid-template-columns: 1fr; } }

/* ---------- Article ---------- */
.article__head { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: 1.5rem; }
.article__head h1, .article__dek, .article__byline { max-width: 50rem; }
.article__head h1 { line-height: 1.08; margin-bottom: 0.35em; }
.article__dek { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }
.article__byline { font-size: var(--step--1); color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 0.9rem; margin: 0; }
.article__image { margin-top: 0; margin-bottom: 2rem; }
.article__image img { width: 100%; }
.article__image figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.5rem; }
.article__layout { display: grid; grid-template-columns: minmax(0, 42rem) minmax(0, 19rem); justify-content: space-between; gap: 3rem; padding-bottom: 3rem; }
.article__rail { position: relative; }
.rail-box { background: var(--amber-wash); padding: 1.4rem; margin-bottom: 2rem; border-top: 3px solid var(--amber); }
.rail-box h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.rail-box p { font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 960px) { .article__layout { grid-template-columns: 1fr; } }

.entry { font-size: 1.1rem; line-height: 1.7; }
.entry > *:first-child { margin-top: 0; }
.entry h2 { font-size: var(--step-2); margin-top: 1.8em; }
.entry h3 { font-size: 1.3rem; margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.25rem; }
.entry li { margin-bottom: 0.4rem; }
.entry blockquote { margin: 2rem 0; padding: 0.2rem 0 0.2rem 1.4rem; border-left: 3px solid var(--amber); font-family: var(--display); font-size: var(--step-1); font-style: italic; }
.entry figure { margin: 2rem 0; }
.entry figcaption { font-size: var(--step--1); color: var(--ink-soft); }
.entry .is-style-takeaway { background: var(--mist); border-left: 4px solid var(--amber); padding: 1.25rem 1.5rem; margin: 2rem 0; }
.entry .is-style-takeaway h2, .entry .is-style-takeaway h3 { font-family: var(--body); font-size: 1rem; font-weight: 600; color: var(--glass); margin: 0 0 0.5rem; }
.entry .is-style-takeaway ul { margin: 0; }
.entry .is-style-key-dates table, .entry table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.entry th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--glass); padding: 0.5rem 0.75rem 0.5rem 0; }
.entry td { border-bottom: 1px solid var(--rule); padding: 0.55rem 0.75rem 0.55rem 0; vertical-align: top; }
.entry .is-style-key-dates td:first-child { white-space: nowrap; font-weight: 600; color: var(--glass); }
.wp-block-table { overflow-x: auto; }
.article__source { font-size: var(--step--1); border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 2.5rem; }
.article__disclaimer { font-size: 0.85rem; color: var(--ink-soft); font-style: italic; }
.article__tags a { display: inline-block; font-size: 0.85rem; padding: 0.2rem 0.6rem; border: 1px solid var(--rule); border-radius: 99px; margin: 0 0.4rem 0.4rem 0; text-decoration: none; }
.desk--related { background: var(--paper); }

/* ---------- Archives & pages ---------- */
.page-head { background: var(--mist); padding: clamp(2rem, 5vw, 3rem) 0; }
.page-head h1 { font-size: var(--step-4); color: var(--glass-deep); margin: 0; }
.page-head__desc { color: var(--ink-soft); max-width: 40rem; margin-top: 0.5rem; }
.page-head__desc p { margin: 0; }
.page-head .search-form { margin-top: 1.25rem; }
.archive { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 3rem; padding-top: 1rem; padding-bottom: 3rem; }
.desk-list { list-style: none; padding: 0; margin: 0; }
.desk-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
@media (max-width: 900px) { .archive { grid-template-columns: 1fr; } }
.pagination { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.pagination .page-numbers { padding: 0.4rem 0.8rem; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.pagination .current { background: var(--glass); color: var(--paper); border-color: var(--glass); }
body.page .entry, .error404 .entry { max-width: 42rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter); }
.alignwide { max-width: 60rem; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); max-width: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--glass-deep); color: #C4D0CA; font-size: var(--step--1); padding: 3.5rem 0 2rem; }
.site-footer a { color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand .logo-svg { width: 260px; max-width: 100%; height: auto; margin-bottom: 1.5rem; }
.site-footer h2 { font-family: var(--body); font-size: 0.95rem; font-weight: 600; color: var(--paper); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer .search-submit { background: var(--amber); color: var(--ink); }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.5rem; line-height: 1.55; }
.footer-legal p { max-width: 62rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Legal additions ---------- */
.attorney-advertising { color: #DCE4E0; font-size: 0.85rem; line-height: 1.6; }
.footer-legal__line { margin-top: 1rem; }
.newsletter__note { font-size: 0.85rem; color: #C9D6D0; margin-top: 0.75rem !important; }
.page-head__updated { margin: 0.6rem 0 0; color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- About page ---------- */
.page-head__sub { font-size: var(--step-1); color: var(--ink-soft); max-width: 40rem; margin: 0.6rem 0 0; line-height: 1.45; }
.about-main { display: grid; grid-template-columns: minmax(0, 42rem) minmax(0, 20rem); justify-content: space-between; gap: 3rem; padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
body.page .about-main .entry { padding: 0; margin: 0; max-width: none; }
.about-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-bottom: 4px solid var(--amber); }
.about-portrait figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.6rem; }
.about-side .rail-box { margin-top: 2rem; }
.about-desks { background: var(--paper); border-top: 1px solid var(--rule); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.about-desks h2 { font-size: var(--step-3); color: var(--glass-deep); }
.about-desks__grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 2rem; }
.about-desks__grid li { border-top: 1px solid var(--rule); padding: 1rem 0; }
.about-desks__grid a { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.about-desks__grid a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.about-desks__grid p { margin: 0.25rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 960px) { .about-main { grid-template-columns: 1fr; } .about-side { max-width: 22rem; } }

/* ---------- Touch screens: larger tap targets in the desktop-width menu (tablets) ---------- */
@media (pointer: coarse) and (min-width: 961px) {
  .primary-nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .primary-nav .menu-cta > a { min-height: 44px; }
}
@media (pointer: coarse) {
  .story__title a, .kicker, .site-footer li a { padding-block: 0.15em; }
}

/* ---------- Short menus (3 items or fewer) stay inline on phones ---------- */
@media (max-width: 960px) {
  .site-header--compact .nav-toggle { display: none; }
  .site-header--compact .primary-nav { display: block; position: static; border: 0; background: none; }
  .site-header--compact .primary-nav ul { flex-direction: row; align-items: center; gap: 1rem; padding: 0; }
  .site-header--compact .primary-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border-bottom: 2px solid transparent; }
  .site-header--compact .primary-nav .menu-cta > a { margin-top: 0; padding: 0 0.85rem; }
}
@media (max-width: 400px) {
  .site-header--compact .brand .logo-svg { height: 38px; }
  .site-header--compact .site-header__inner { gap: 0.75rem; }
  .site-header--compact .primary-nav ul { gap: 0.75rem; }
}

/* Footer firm links: uploaded social icons shown in white to match the footer */
.firm-link { display: inline-flex; align-items: center; gap: 0.55rem; }
.firm-link__icon { width: 18px; height: 18px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.9; flex: none; }
.firm-link:hover .firm-link__icon { opacity: 1; }

/* Also from Lindsey Zahn P.C. */
.family { background: var(--mist); border-top: 1px solid var(--rule); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.family h2 { font-size: var(--step-2); margin: 0 0 1.4rem; }
.family__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr)); gap: 1.25rem; }
.family__card { display: grid; grid-template-columns: 64px 1fr; gap: 1.1rem; align-items: center; padding: 1.4rem 1.5rem; background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--c); text-decoration: none; transition: box-shadow .15s; }
.family__card:hover { box-shadow: 0 14px 30px -20px rgba(20, 41, 35, 0.55); }
.family__card img { justify-self: center; width: auto; }
.family__card strong { display: block; font-family: var(--display); font-size: 1.375rem; font-weight: 700; color: var(--c); }
.family__card strong.is-italic { font-style: italic; }
.family__card span span { display: block; font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.25rem; }
