/* ============================================================================
   PUBLIC EDITORIAL LAYER — SHELL
   ----------------------------------------------------------------------------
   The header, mega menus, phone dock + menu sheet, footer, advisory bar, flash
   notices and the shared primitives (.pub-*) the homepage sections build on.

   Loads on EVERY public page, beside Bootstrap on the inner pages, so every
   rule is prefixed .pub- and sets its own font/colour instead of relying on a
   body reset. The body reset itself applies only to `body.pub-editorial`
   (the Bootstrap-free homepage).

   Header modes:  .pub-header--hero   fixed, transparent over a full-bleed hero
                                      (is-scrolled / is-hidden / is-dark set by JS)
                  .pub-header--solid  sticky, paper, for inner pages
   ============================================================================ */

/* ---------- editorial body reset (homepage only) ---------- */
body.pub-editorial { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-sans); font-size: 1rem; line-height: 1.6; overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.pub-editorial *, body.pub-editorial *::before, body.pub-editorial *::after { box-sizing: border-box; }
body.pub-editorial img, body.pub-editorial video, body.pub-editorial canvas, body.pub-editorial svg { display: block; max-width: 100%; }
:where(body.pub-editorial) a { color: inherit; } /* :where() keeps the reset at zero specificity so single-class rules (.btn-solid, .dtile h3) win, as in the mockup */
:where(body.pub-editorial) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(body.pub-editorial) p { margin: 0 0 1em; }
body.pub-editorial :focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
body.pub-editorial ::selection { background: var(--sky-2); color: var(--ink); }

/* inner pages: keep the fixed dock off the page bottom */
@media (max-width: 899px) { body.site-public:not(.pub-editorial) { padding-bottom: var(--dock); } }

.pub-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 999; background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- primitives ---------- */
.pub-label { font-family: var(--f-sans); font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1.4; margin: 0; }
.pub-display { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144; line-height: .86; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.pub-display em { font-style: italic; font-weight: 500; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; letter-spacing: -.02em; }
.pub-lead { font-family: var(--f-sans); font-size: var(--fs-lead); line-height: 1.55; max-width: var(--w-text); }
.pub-serif-it { font-family: var(--f-display); font-style: italic; font-weight: 400; font-variation-settings: "SOFT" 100, "WONK" 1; }

/* photo frame — square corners by default; a radius is the exception */
.pub-ph { margin: 0; position: relative; overflow: hidden; background: var(--paper-3); }
.pub-ph img, .pub-ph video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--e-out); }
a:hover .pub-ph img, a:focus-visible .pub-ph img { transform: scale(1.045) translate(-1%, -1%); }
.pub-cap { font-family: var(--f-sans); font-size: .78rem; letter-spacing: .02em; color: var(--ink-3); margin: 10px 0 0; }
.pub-cap b { font-weight: 600; color: var(--ink); }

/* buttons: the arrow slides out and a twin slides in */
.pub-btn { display: inline-flex; align-items: center; gap: 16px; padding: 17px 24px 16px; font-family: var(--f-sans); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; line-height: 1.2; border: 0; border-radius: var(--r1); cursor: pointer; transition: background var(--d-ui), color var(--d-ui), box-shadow var(--d-ui); }
.pub-btn-solid { background: var(--red); color: #fff; }
.pub-btn-solid:hover { background: #B81616; color: #fff; }
.pub-btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.pub-btn-ghost:hover { background: rgba(255, 255, 255, .1); color: inherit; }
.pub-btn-sky { background: var(--sky); color: var(--ink); }
.pub-btn-sky:hover { background: #fff; color: var(--ink); }
.pub-arw { position: relative; width: 22px; height: 12px; overflow: hidden; flex: none; }
.pub-arw svg { position: absolute; inset: 0; width: 22px; height: 12px; transition: transform var(--d-ui) var(--e-out); }
.pub-arw svg + svg { transform: translateX(-130%); }
a:hover > .pub-arw svg:first-child, a:focus-visible > .pub-arw svg:first-child, button:hover > .pub-arw svg:first-child { transform: translateX(130%); }
a:hover > .pub-arw svg + svg, a:focus-visible > .pub-arw svg + svg, button:hover > .pub-arw svg + svg { transform: translateX(0); }
.pub-link { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-sans); font-weight: 600; text-decoration: none; color: inherit; position: relative; padding-bottom: 4px; }
.pub-link::after { content: ""; position: absolute; left: 0; right: 34px; bottom: 0; height: 1px; background: currentColor; transform-origin: left; transition: transform var(--d-ui) var(--e-out); }
.pub-link:hover { color: inherit; }
.pub-link:hover::after { transform: scaleX(.3); }

/* bunting (banderitas) — drawn by js/public/bunting.js, swayed here */
.pub-bunting { display: block; width: 100%; height: 64px; overflow: visible; pointer-events: none; }
.pub-bunting path.str { fill: none; stroke: currentColor; stroke-width: 1; opacity: .55; }
.pub-bunting .flag { transform-box: fill-box; transform-origin: 50% 0; animation: pub-sway 4.8s var(--e-sway) infinite alternate; }
@keyframes pub-sway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.pub-amb { animation-play-state: paused !important; }
.is-live .pub-amb { animation-play-state: running !important; }

/* ---------- header ---------- */
.pub-header { position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav); display: flex; align-items: center; gap: var(--s6); padding: 14px var(--gutter); margin: 0; font-family: var(--f-sans); color: var(--paper); transition: background var(--d-ui), color var(--d-ui), padding var(--d-ui) var(--e-out), transform .6s var(--e-out), box-shadow var(--d-ui), top var(--d-ui) var(--e-out); }
.pub-header a { color: inherit; text-decoration: none; }
.pub-header button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.pub-header.is-scrolled, .pub-header.is-solid, .pub-header--solid { background: rgba(244, 238, 227, .93); color: var(--ink); padding-block: 8px; box-shadow: 0 1px 0 rgba(23, 20, 15, .08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pub-header--solid { position: sticky; }
.pub-header.is-scrolled.is-dark:not(.is-solid) { background: rgba(7, 12, 26, .86); color: var(--paper); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.pub-header.is-hidden { transform: translateY(-110%); }
.pub-logo { flex: none; display: block; line-height: 0; }
.pub-logo img { height: 52px; width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .45)); transition: filter var(--d-ui), height var(--d-ui) var(--e-out); }
.pub-header.is-scrolled .pub-logo img, .pub-header.is-solid .pub-logo img, .pub-header--solid .pub-logo img { height: 40px; filter: none; }
.pub-header.is-scrolled.is-dark:not(.is-solid) .pub-logo img { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .7)); }
@media (max-width: 899px) { .pub-logo img { height: 40px; } .pub-header.is-scrolled .pub-logo img, .pub-header--solid .pub-logo img { height: 32px; } }
.pub-nav { margin-left: auto; display: none; }
.pub-nav ul { display: flex; gap: clamp(18px, 2.4vw, 38px); list-style: none; margin: 0; padding: 0; }
/* .pub-nav scope outranks the generic .pub-header button reset above */
.pub-nav .pub-navlink { position: relative; display: inline-block; padding: 6px 0; font-family: var(--f-sans); font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; line-height: 1.4; }
.pub-navlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--d-ui) var(--e-out); }
.pub-navlink:hover::after, .pub-navlink[aria-expanded="true"]::after { transform: scaleX(1); transform-origin: left; }
.pub-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
@media (min-width: 900px) { .pub-nav { display: block; } .pub-tools { margin-left: var(--s4); } }
.pub-iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; text-decoration: none; transition: background var(--d-micro); }
.pub-iconbtn:hover { background: rgba(127, 127, 127, .14); }
.pub-iconbtn svg { width: 19px; height: 19px; }
.pub-search { display: flex; align-items: center; margin: 0; }
.pub-search input { width: 0; padding: 8px 0; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: .95rem; opacity: 0; transition: width .6s var(--e-out), opacity .3s, padding .6s var(--e-out); }
.pub-search input::placeholder { color: inherit; opacity: .6; }
.pub-search input:focus { outline: none; box-shadow: none; }
.pub-search.is-open input { width: min(260px, 52vw); opacity: 1; padding: 8px 6px; }

/* account menu (desktop) */
.pub-account { position: relative; }
.pub-account-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 10px 0; background: var(--paper); color: var(--ink); border-radius: var(--r2); box-shadow: 0 24px 50px -20px rgba(23, 20, 15, .45), 0 0 0 1px rgba(23, 20, 15, .06); font-size: .92rem; }
.pub-account-menu[hidden] { display: none; }
.pub-account-menu .who { padding: 6px 16px 10px; font-size: .74rem; letter-spacing: .08em; color: var(--ink-3); border-bottom: 1px solid rgba(23, 20, 15, .1); margin-bottom: 6px; }
.pub-account-menu a, .pub-account-menu button { display: block; width: 100%; text-align: left; padding: 8px 16px; color: var(--ink); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; }
.pub-account-menu a:hover, .pub-account-menu button:hover { background: rgba(23, 20, 15, .06); color: var(--ink); }
.pub-account-menu form { margin: 0; }
.pub-signin { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 8px 4px; }

/* mega menus — editorial panels with real photography */
.pub-mega { position: fixed; left: 0; right: 0; top: 0; z-index: calc(var(--z-nav) - 1); margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-sans); padding: calc(var(--nav-h, 64px) + var(--s6)) var(--gutter) var(--s8); display: grid; gap: var(--s7); grid-template-columns: 1.05fr 2fr 1.15fr; clip-path: inset(0 0 100% 0); visibility: hidden; box-shadow: 0 30px 60px -30px rgba(23, 20, 15, .35); transition: clip-path .7s var(--e-out), visibility 0s .7s; }
.pub-mega.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .7s var(--e-out); }
.pub-mega--list { grid-template-columns: repeat(3, 1fr); }
.pub-mega h2 { margin: 0 0 var(--s5); color: var(--ink-3); }
.pub-mega a { color: inherit; text-decoration: none; }
.pub-mega-list { list-style: none; margin: 0; padding: 0; }
.pub-mega-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; font-family: var(--f-display); font-size: clamp(1.02rem, 1.55vw, 1.32rem); font-weight: 500; font-variation-settings: "SOFT" 100; line-height: 1.3; border-bottom: 1px solid rgba(23, 20, 15, .1); transition: color var(--d-micro), padding var(--d-ui) var(--e-out); }
.pub-mega-list a:hover { color: var(--red-ink); padding-left: 8px; }
.pub-mega-list small { font-family: var(--f-sans); font-size: .74rem; color: var(--ink-3); letter-spacing: .06em; }
.pub-mega-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pub-mega-photos a { text-decoration: none; }
.pub-mega-photos .pub-ph { aspect-ratio: 3 / 4; }
.pub-mega-towns { columns: 2; column-gap: 24px; list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.pub-mega-towns a { display: block; padding: 4px 0; }
.pub-mega-towns a:hover { color: var(--red-ink); }
.pub-mega-more { margin-top: var(--s6); }
.pub-mega .pub-link { margin-top: var(--s5); }
@media (max-width: 899px) { .pub-mega { display: none; } }

/* ---------- phone dock + menu sheet ---------- */
.pub-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-dock); height: calc(var(--dock) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; background: rgba(244, 238, 227, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 rgba(23, 20, 15, .1); font-family: var(--f-sans); }
.pub-dock a, .pub-dock button { display: grid; place-items: center; align-content: center; gap: 3px; font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.pub-dock svg { width: 21px; height: 21px; }
@media (min-width: 900px) { .pub-dock { display: none; } }
.pub-sheet { position: fixed; inset: 0; z-index: var(--z-menu); background: var(--night); color: var(--paper); font-family: var(--f-sans); padding: 88px var(--gutter) calc(var(--dock) + 24px); overflow-y: auto; clip-path: inset(100% 0 0 0); visibility: hidden; transition: clip-path .7s var(--e-out), visibility 0s .7s; }
.pub-sheet.is-open { clip-path: inset(0); visibility: visible; transition: clip-path .7s var(--e-out); }
.pub-sheet a { color: inherit; text-decoration: none; }
.pub-sheet-logo { position: absolute; left: var(--gutter); top: 20px; height: 36px; width: auto; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .6)); }
.pub-sheet-close { position: absolute; right: var(--gutter); top: 20px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); background: none; border: 0; color: inherit; cursor: pointer; }
.pub-sheet-close svg { width: 16px; height: 16px; }
.pub-sheet ul { list-style: none; margin: 0 0 var(--s7); padding: 0; }
.pub-sheet li a { display: block; padding: 6px 0; font-family: var(--f-display); font-size: 2.4rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; line-height: 1; }
.pub-sheet li:nth-child(even) a { font-style: italic; font-weight: 400; text-transform: none; color: var(--sky); }
.pub-sheet .pub-ph { aspect-ratio: 16 / 9; }
.pub-sheet-account { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 var(--s7); padding-top: var(--s5); border-top: 1px solid rgba(255, 255, 255, .14); font-size: .86rem; }
.pub-sheet-account a, .pub-sheet-account button { color: var(--paper); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; opacity: .85; }
.pub-sheet-account form { margin: 0; display: inline; }
.pub-sheet-account .who { width: 100%; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .55; }
@media (min-width: 900px) { .pub-sheet { display: none; } }

/* ---------- advisory bar (Model.ActiveAlerts) ---------- */
.pub-advisory { display: flex; position: fixed; inset: 0 0 auto 0; z-index: calc(var(--z-nav) + 1); align-items: center; gap: 12px; min-height: 40px; margin: 0; padding: 8px var(--gutter); background: var(--red); color: #fff; font-family: var(--f-sans); font-size: .84rem; line-height: 1.35; transition: transform .5s var(--e-out); }
.pub-advisory p { margin: 0; flex: 1; min-width: 0; }
.pub-advisory .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none; }
.pub-advisory a { color: #fff; font-weight: 700; white-space: nowrap; }
.pub-advisory button { width: 28px; height: 28px; flex: none; border-radius: 50%; background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.pub-advisory button:hover { background: rgba(255, 255, 255, .18); }
html.is-scrolled .pub-advisory, html.adv-closed .pub-advisory { transform: translateY(-100%); }
html.has-advisory:not(.is-scrolled):not(.adv-closed) .pub-header { top: var(--adv-h, 40px); }
html.has-advisory:not(.is-scrolled):not(.adv-closed) .pub-mega { padding-top: calc(var(--nav-h, 64px) + var(--adv-h, 40px) + var(--s6)); }

/* ---------- flash notices (TempData) on the editorial surface ---------- */
.pub-flash-stack { position: fixed; z-index: var(--z-overlay); right: 16px; bottom: calc(var(--dock) + 16px); display: grid; gap: 10px; max-width: min(420px, calc(100vw - 32px)); font-family: var(--f-sans); }
.pub-flash { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--paper); color: var(--ink); border-left: 4px solid var(--green); border-radius: var(--r2); box-shadow: 0 20px 50px -20px rgba(23, 20, 15, .5); font-size: .92rem; }
.pub-flash--error { border-left-color: var(--red); }
.pub-flash--warning { border-left-color: var(--lime); }
.pub-flash--info { border-left-color: var(--sky); }
.pub-flash b { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; }
.pub-flash button { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: none; border: 0; cursor: pointer; color: inherit; flex: none; }
.pub-flash button:hover { background: rgba(23, 20, 15, .08); }

/* ---------- footer ---------- */
.pub-footer { position: relative; background: var(--night-2); color: rgba(244, 238, 227, .82); font-family: var(--f-sans); padding: 90px var(--gutter) calc(var(--dock) + 36px); margin-top: auto; }
.pub-footer a { color: inherit; text-decoration: none; }
.pub-footer .pub-bunting { position: absolute; left: 0; right: 0; top: -2px; color: var(--paper); }
.pub-foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7) var(--s5); }
.pub-foot-brand { grid-column: 1 / -1; }
.pub-foot-brand img.logo { height: 46px; width: auto; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .6)); }
.pub-foot-brand .seal { width: 68px; height: 68px; border-radius: 50%; overflow: hidden; margin-top: var(--s5); }
.pub-foot-brand .seal img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.6); }
.pub-foot-brand p { margin: var(--s4) 0 0; font-size: .88rem; max-width: 22rem; line-height: 1.6; }
.pub-foot-brand .social { display: flex; gap: 14px; margin-top: var(--s4); }
.pub-foot-brand .social a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.pub-foot-brand .social svg { width: 15px; height: 15px; fill: currentColor; }
.pub-foot-col h2 { color: var(--sky); margin: 0 0 var(--s4); }
.pub-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.pub-foot-col a:hover { color: var(--sky); }
.pub-foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; opacity: .7; }
.pub-foot-base nav { display: flex; gap: 18px; }
@media (min-width: 640px) and (max-width: 899px) { .pub-foot-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .pub-foot-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .pub-foot-brand { grid-column: auto; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pub-bunting .flag { animation: none; }
  .pub-header, .pub-mega, .pub-sheet, .pub-advisory, .pub-search input { transition-duration: .001ms; }
}
