/* ============================================================
   Magazine-cover Hero + Top Utility Bar Header
   ============================================================ */

/* ---------- MASTHEAD (wraps topbar + header) ---------- */
:root {
  --topbar-h: 36px;
  --header-h: 80px;
  --header-h-scrolled: 64px;
  --masthead-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --masthead-dur: .45s;
}
@media (max-width: 768px) {
  :root {
    --topbar-h: 0px;
    --header-h: 60px;
  }
}
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
  z-index: 1000;
  background-color: var(--cream-light);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Belt-and-suspenders: also pin the inner header full width edge-to-edge */
.masthead > .site-header,
.masthead > .topbar {
  width: 100%;
  margin: 0;
  border-radius: 0;
}
/* Body must not push the masthead with a top margin */
html, body { margin: 0; padding: 0; }
[data-theme="dark"] .masthead { background-color: var(--bg-primary); }

/* ---------- TOP UTILITY BAR — deep crimson, brand-forward ---------- */
.topbar {
  position: relative;
  z-index: 2;
  background:
    linear-gradient(180deg, #7A0E1B 0%, var(--crimson-deep) 60%, #B8132A 100%);
  color: rgba(255, 246, 247, .92);
  font-family: var(--ff-body);
  font-size: .73rem;
  font-weight: 500;
  letter-spacing: .06em;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Gold hairline at the bottom of the topbar — like an embroidered seam */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in oklab, var(--gold-bright) 55%, transparent) 25%,
    var(--gold-bright) 50%,
    color-mix(in oklab, var(--gold-bright) 55%, transparent) 75%,
    transparent);
  pointer-events: none;
  opacity: .65;
}
/* Soft top highlight — gives the band depth */
.topbar::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 200, .25), transparent);
  pointer-events: none;
}
[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, #5A0813 0%, #8B1A2B 100%);
}
.topbar.is-hidden { transform: translateY(-100%); }
.topbar__inner {
  width: min(1480px, 94vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.topbar__group { display: flex; gap: 1.6rem; align-items: center; }
.topbar__group--right { justify-content: flex-end; }
.topbar a {
  color: rgba(255, 246, 247, .92);
  opacity: 1;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  transition: color .3s, transform .3s;
}
.topbar a:hover { color: var(--gold-bright); transform: translateY(-1px); }
.topbar svg, .topbar i { width: 13px; height: 13px; }
.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--ff-editorial);
  font-style: italic;
  color: rgba(255, 246, 247, .92);
  opacity: 1;
}
.topbar__dot {
  width: 8px; height: 8px;
  background: #5BD18A;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 8px rgba(91, 209, 138, .8);
}
.topbar__dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #5BD18A;
  opacity: .5;
  animation: ringPulse 2s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.9); opacity: 0; }
}
.topbar__location {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--ff-editorial);
  font-style: italic;
  letter-spacing: .04em;
  color: var(--gold-bright);
  font-size: .82rem;
}
.topbar__location i, .topbar__location svg {
  width: 14px; height: 14px;
  color: var(--gold-bright);
}
.topbar__social { display: inline-flex; gap: .55rem; }
.topbar__social a {
  width: 26px; height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 246, 247, .35);
  background: rgba(255, 246, 247, .08);
  border-radius: 50%;
  color: #FFF6F7;
  transition: all .35s var(--ease-out-expo);
}
.topbar__social a svg, .topbar__social a i {
  width: 13px; height: 13px;
  stroke: currentColor;
}
.topbar__social a:hover {
  border-color: var(--gold-bright);
  background: var(--gold-bright);
  color: var(--crimson-deep);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4);
}

/* Push site-header down to make room for topbar */
/* Inside masthead, header is a normal-flow element below the topbar */
.masthead .site-header {
  position: relative;
  top: auto;
  transform: none;
}

/* Mobile: hide the topbar entirely */
@media (max-width: 900px) {
  .topbar { display: none; }
  .has-topbar .site-header { top: 0; }
}

/* ---------- HEADER ---------- */
.site-header {
  position: relative;
  height: var(--header-h);
  background: #FBF6F0;
  color: var(--text-primary);
  box-shadow:
    0 1px 0 rgba(20, 22, 30, .08),
    0 14px 30px -18px rgba(20, 10, 10, .22);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
[data-theme="dark"] .site-header {
  background: #1A1417;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .04),
    0 14px 30px -18px rgba(0, 0, 0, .65);
}

/* Always-on gradient hairline at the bottom — the "signature" line */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in oklab, var(--accent) 55%, transparent) 22%,
    var(--accent) 50%,
    color-mix(in oklab, var(--accent-2) 65%, transparent) 78%,
    transparent 100%);
  pointer-events: none;
}

/* Soft inner glow at the bottom edge — sets the header apart from the page */
.site-header::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18px;
  background: radial-gradient(ellipse 900px 18px at 50% 100%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 70%);
  pointer-events: none;
}

.masthead.is-condensed .site-header,
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--rule), 0 18px 38px -24px rgba(20,10,10,.28); }
.site-header.is-hidden { transform: translateY(-110%); }
.site-header .container-wide {
  width: min(1480px, 94vw);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Apply pill button — refined */
.btn-apply {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .5rem .5rem 1.45rem;
  background: var(--accent-gradient);
  color: #FFF6F7 !important;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .03em;
  transition:
    transform .55s var(--ease-out-expo),
    box-shadow .55s var(--ease-out-expo),
    padding .55s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,.18) inset,
    0 10px 22px -12px var(--crimson-glow);
}
.btn-apply::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: -1;
}
.btn-apply:hover::after { animation: btnShine 1.1s cubic-bezier(0.16,1,0.3,1) forwards; }
[data-theme="dark"] .btn-apply { background: var(--accent-gradient-dark); color: #FFF1F2 !important; }
.btn-apply__arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: inline-grid;
  place-items: center;
  transition: transform .55s var(--ease-out-expo), background-color .35s;
}
.btn-apply__arrow svg, .btn-apply__arrow i { width: 14px; height: 14px; transition: transform .55s var(--ease-out-expo); }
.btn-apply:hover {
  padding-left: 1.7rem;
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.22) inset,
    0 20px 38px -16px var(--crimson-glow);
}
.btn-apply:hover .btn-apply__arrow { background: rgba(255,255,255,.28); }
.btn-apply:hover .btn-apply__arrow svg,
.btn-apply:hover .btn-apply__arrow i { transform: translate(2px, -2px); }

/* Brand mark */
.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  transition: transform .55s var(--ease-out-expo);
}
.brand:hover { transform: translateY(-1px); }
.brand-crest {
  position: relative;
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 6px 16px var(--crimson-glow));
  transition: transform .9s var(--ease-out-expo), filter .55s;
}
.brand:hover .brand-crest { transform: rotate(-8deg) scale(1.1); }

/* Pulse ring around the crest */
.brand::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in oklab, var(--accent) 55%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: brandPulse 3.6s ease-out 2.2s infinite;
}
@keyframes brandPulse {
  0%   { transform: translate(-50%, -50%) scale(.85); opacity: .8; }
  70%  { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}
@media (max-width: 768px) {
  .brand::before { left: 20px; width: 40px; height: 40px; }
}

.site-header .brand-name {
  position: relative;
  padding-left: 1.2rem;
  margin-left: .25rem;
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.05;
  font-size: 1.5rem;
  color: var(--text-primary);
  font-variation-settings: "opsz" 36, "wght" 600;
}
/* Vertical divider with crimson gradient */
.site-header .brand-name::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, transparent 0%, color-mix(in oklab, var(--accent) 70%, transparent) 50%, transparent 100%);
}
.site-header .brand-name span {
  display: block;
  font-family: var(--ff-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: .68rem;
  letter-spacing: .18em;
  color: var(--accent);
  margin-top: 4px;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .site-header .brand-name { font-size: 1.2rem; }
  .brand-crest { width: 40px; height: 40px; }
}
/* Tablet + phone (anywhere the hamburger is shown): keep masthead lean —
   brand + theme + hamburger. Apply lives in the hero CTA. */
@media (max-width: 1199px) {
  .site-header .btn-apply { display: none; }
  /* Keep the theme toggle visible alongside the hamburger */
  .header-actions { gap: .35rem; }
  .site-header .header-actions .theme-toggle { width: 38px; height: 38px; }
  .site-header .container-wide { gap: .8rem; width: min(1480px, 94vw); grid-template-columns: 1fr auto; }
}
@media (max-width: 560px) {
  .site-header .brand-name { font-size: .95rem; }
  .site-header .brand-name span { display: none; }
  .brand-crest { width: 34px; height: 34px; }
  .site-header .container-wide { width: min(1480px, 96vw); }
}
/* Tablet sweet spot — keep crest from ballooning to 52px and pushing the header tall */
@media (min-width: 561px) and (max-width: 1199px) {
  .brand-crest { width: 40px; height: 40px; }
  .site-header .brand-name { font-size: 1.15rem; }
}
/* Trim nav padding at the smallest desktop sizes (1200–1320) so 7 items + apply still fit cleanly */
@media (min-width: 1200px) and (max-width: 1320px) {
  .nav a { padding: .55rem .7rem; font-size: .9rem; }
  .btn-apply { padding: .5rem .5rem .5rem 1.2rem; font-size: .82rem; }
  .site-header .container-wide { gap: 1.2rem; }
}

/* Nav with sliding indicator */
.nav {
  justify-self: center;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .3rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-secondary) 85%, transparent);
  border: 1px solid var(--rule);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    0 1px 0 rgba(255,255,255,.4),
    0 8px 18px -12px rgba(20,10,10,.12);
}
[data-theme="dark"] .nav {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 8px 18px -12px rgba(0,0,0,.6);
}
.nav ul {
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;
  z-index: 2;
}
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .55rem clamp(.7rem, 1.2vw, 1.05rem);
  font-family: var(--ff-body);
  font-style: normal;
  font-weight: 500;
  font-size: .92rem;
  letter-spacing: .005em;
  color: var(--text-secondary);
  border-radius: 999px;
  transition: color .35s var(--ease-luxe);
  white-space: nowrap;
}
.nav a:hover, .nav a.is-current { color: #FFF6F6; }
.nav:has(a:hover) a.is-current:not(:hover) { color: var(--text-secondary); }
.nav a::after { content: none; }

/* Sliding pill indicator that follows hover / active */
.nav__indicator {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 0;
  background: var(--accent-gradient);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 8px 22px -10px var(--crimson-glow);
  transform: translateX(0);
  transition:
    transform .55s var(--ease-out-expo),
    width .55s var(--ease-out-expo),
    opacity .35s var(--ease-luxe);
}
.nav__indicator.is-active { opacity: 1; }
[data-theme="dark"] .nav__indicator { background: var(--accent-gradient-dark); }

@media (max-width: 1199px) {
  /* ===== Dashboard-style right-side drawer ===== */
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(360px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: var(--crimson-deep, #6E0F1B);
    border: 0;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform .55s var(--ease-out-expo);
    z-index: 60;
    box-shadow: -20px 0 60px -30px rgba(0, 0, 0, .55);
    color: #FFF;
  }
  .nav.is-open { transform: translateX(0); }

  /* Sticky top bar inside drawer */
  .nav__topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.1rem;
    background: linear-gradient(180deg, #5A0813 0%, var(--crimson-deep, #6E0F1B) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }
  .nav .menu-close {
    position: static;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: #FFF;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: background .25s ease, transform .35s ease;
  }
  .nav .menu-close:hover { background: rgba(255, 255, 255, .12); transform: rotate(90deg); }
  .nav .menu-close i, .nav .menu-close svg { width: 18px; height: 18px; }
  .nav .nav__apply,
  a.nav__apply {
    display: inline-flex;
    align-items: center;
    padding: .55rem 1rem;
    background: #FFF;
    color: var(--crimson-deep, #6E0F1B) !important;
    font-family: var(--ff-body);
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .04em;
    border-radius: 6px;
    text-decoration: none;
    border-left: 0 !important;
    transition: background .25s ease, transform .35s ease, color .25s ease;
  }
  .nav .nav__apply:hover,
  a.nav__apply:hover {
    background: #FFE0A8;
    color: var(--crimson-deep, #6E0F1B) !important;
    padding-left: 1rem;
    transform: translateY(-1px);
  }

  /* Nav links — left aligned, white, dashboard style */
  .nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: .8rem 0;
    margin: 0;
    list-style: none;
    text-align: left;
    align-items: stretch;
    flex: 1;
  }
  .nav ul li { display: block; }
  .nav a {
    display: block;
    font-family: var(--ff-body);
    font-weight: 500;
    font-style: normal;
    font-size: 1.05rem;
    letter-spacing: .01em;
    color: #FFFFFF;
    padding: .85rem 1.5rem;
    border-radius: 0;
    text-decoration: none;
    transition: background .25s ease, padding-left .35s var(--ease-out-expo);
    border-left: 3px solid transparent;
  }
  .nav a:hover,
  .nav a:focus-visible,
  .nav a.is-current {
    background: rgba(255, 255, 255, .07);
    padding-left: 1.8rem;
    border-left-color: #FFE0A8;
    color: #FFF;
  }
  .nav a::after { content: none; }
  .nav__indicator { display: none; }
  .nav__drawer-foot { display: flex !important; }
}

/* Backdrop behind the open drawer */
.nav-backdrop {
  display: none;
}
@media (max-width: 1199px) {
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 16, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s ease;
    z-index: 55;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------- Mobile drawer footer block (contact + theme) ---------- */
.nav__drawer-foot {
  display: none; /* Desktop: hidden — topbar handles it */
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 1.2rem 1.2rem calc(1.4rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: left;
  color: rgba(255, 255, 255, .9);
}
.nav__drawer-status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--ff-body);
  font-size: .82rem;
  color: rgba(255, 255, 255, .85);
  padding: 0 .25rem;
}
.nav__drawer-status .topbar__dot { width: 8px; height: 8px; }
.nav__drawer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-family: var(--ff-body);
  font-size: .9rem;
  width: 100%;
}
.nav__drawer-contact li { display: block; max-width: 100%; }
.nav__drawer-contact a,
.nav__drawer-contact .loc {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .7rem;
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  padding: .55rem .25rem;
  border-radius: 6px;
  transition: background .25s ease, color .25s ease;
  min-height: 40px;
  text-align: left;
  box-sizing: border-box;
}
.nav__drawer-contact a:hover { background: rgba(255, 255, 255, .07); color: #FFE0A8; }
.nav__drawer-contact a span,
.nav__drawer-contact .loc span {
  display: inline-block;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: .85rem;
  max-width: 100%;
}
.nav__drawer-contact a:hover { background: color-mix(in oklab, var(--accent) 8%, transparent); color: var(--accent); }
.nav__drawer-contact i,
.nav__drawer-contact svg {
  width: 16px;
  height: 16px;
  color: #FFE0A8;
  flex-shrink: 0;
}
.nav__drawer-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding-top: .85rem;
  margin-top: .25rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  width: 100%;
}
.nav__drawer-socials {
  display: inline-flex;
  gap: .55rem;
}
.nav__drawer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .04);
  color: #FFF;
  transition: border-color .35s, color .35s, background .35s, transform .35s var(--ease-out-expo);
}
.nav__drawer-socials a:hover {
  border-color: #FFE0A8;
  color: #FFE0A8;
  background: rgba(255, 224, 168, .12);
  transform: translateY(-2px);
}
/* Force SVG inside drawer social links to render visible.
   The inline width="14" attribute combined with grid place-items:center
   was collapsing the SVG to 0×16 in some browsers. */
.nav__drawer-socials a svg,
.nav__drawer-socials i {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  display: inline-block;
  fill: currentColor;
  color: #FFF;
  flex-shrink: 0;
}
.nav__drawer-socials a svg path {
  fill: currentColor;
}
.nav__drawer-theme {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in oklab, var(--text-primary) 18%, transparent);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color .35s, color .35s, transform .35s var(--ease-out-expo);
}
.nav__drawer-theme:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.nav__drawer-theme .moon,
.nav__drawer-theme .sun {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  transition: opacity .45s var(--ease-out-expo), transform .55s var(--ease-out-expo);
}
.nav__drawer-theme .sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.nav__drawer-theme .moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .nav__drawer-theme .moon { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="dark"] .nav__drawer-theme .sun { opacity: 1; transform: rotate(0) scale(1); }

/* ---------- IMAGE-DOMINANT HERO ---------- */
.hero-mag {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  height: 100vh;
  box-sizing: border-box;
  margin-top: 0;
  padding-top: calc(var(--topbar-h) + var(--header-h));
  padding-bottom: 0;
  background-color: var(--cream-light);
  overflow: hidden;
  isolation: isolate;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
[data-theme="dark"] .hero-mag { background-color: var(--bg-primary); }

/* Hero photo — fills the entire hero (extends behind masthead, matching bg) */
.hero-mag__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--cream-light);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
[data-theme="dark"] .hero-mag__bg { background-color: var(--bg-primary); }
/* Slideshow track: each slide overlays the previous, crossfade between them */
.hero-mag__slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-mag__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
.hero-mag__slide.is-active { opacity: 1; }
.hero-mag__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Anchor to the top so faces stay visible; cropping happens at the bottom (legs/floor) */
  object-position: center top;
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: none;
}
/* No special-casing here. Wide images use cover + center-top anchor;
   the photo file itself is sized so that the displayed crop keeps faces visible. */
/* Images stay still — only the crossfade between slides moves */
@media (prefers-reduced-motion: reduce) {
  .hero-mag__slide { transition: opacity .3s; }
}
/* Soft vignette + subtle bottom darken for legibility */
.hero-mag__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0,0,0,.25) 100%),
    linear-gradient(180deg, transparent 0%, transparent 55%, rgba(8,4,6,.30) 80%, rgba(15,5,8,.55) 100%);
  pointer-events: none;
}

/* Red glow rising from the entire bottom edge — spans left to right */
.hero-mag__bloom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80vh;
  z-index: 1;
  pointer-events: none;
  background:
    /* Three overlapping radial blooms across the full width */
    radial-gradient(ellipse 50vw 70vh at 12% 110%,
      rgba(225, 29, 43, .65) 0%,
      rgba(225, 29, 43, .35) 28%,
      transparent 58%),
    radial-gradient(ellipse 55vw 75vh at 50% 110%,
      rgba(255, 38, 56, .85) 0%,
      rgba(225, 29, 43, .55) 22%,
      rgba(225, 29, 43, .25) 45%,
      transparent 65%),
    radial-gradient(ellipse 50vw 70vh at 88% 110%,
      rgba(225, 29, 43, .65) 0%,
      rgba(225, 29, 43, .35) 28%,
      transparent 58%),
    /* Continuous base wash so red is present across the entire bottom width */
    linear-gradient(180deg,
      transparent 0%,
      rgba(225, 29, 43, .08) 40%,
      rgba(225, 29, 43, .28) 70%,
      rgba(180, 15, 30, .55) 95%,
      rgba(140, 10, 25, .70) 100%);
  filter: blur(30px);
}
/* Brighter highlight strip right at the very bottom edge */
.hero-mag__bloom::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -5%;
  height: 25%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 70, 90, .35) 50%,
    rgba(255, 100, 120, .55) 100%);
  filter: blur(40px);
}
[data-theme="dark"] .hero-mag__bloom { mix-blend-mode: screen; }

.hero-mag__container {
  position: relative;
  z-index: 3;
  width: min(1480px, 94vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100vh - var(--topbar-h) - var(--header-h));
  padding: 0 0 clamp(4rem, 9vh, 7rem);
}
@media (max-width: 900px) {
  .hero-mag__container { padding-bottom: clamp(3rem, 8vh, 4.5rem); }
}

/* ---------- OVERLAY TYPE ---------- */
.hero-mag__type {
  display: grid;
  gap: 1.4rem;
  align-content: end;
  color: var(--text-primary);
  max-width: 980px;
}
.hero-mag__type .hero-mag__motto,
.hero-mag__type .hero-mag__deva,
.hero-mag__type .hero-mag__title { color: var(--text-primary); }
.hero-mag__type .hero-mag__motto { color: var(--text-secondary); }
.hero-mag__type .hero-mag__motto em { color: var(--accent); font-style: italic; }
@media (max-width: 900px) {
  .hero-mag__container { padding-bottom: clamp(2.5rem, 8vh, 4rem); }
}

.hero-mag__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--ff-body);
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 500;
}
.hero-mag__eyebrow::before {
  content: "";
  height: 1px; width: 36px;
  background: var(--gold-bright);
  display: inline-block;
}
.hero-mag__eyebrow .deva {
  font-family: var(--ff-deva);
  font-style: normal;
  font-size: .9em;
  letter-spacing: .12em;
  color: var(--accent-navy);
  text-transform: none;
}

.hero-mag__crest {
  width: clamp(120px, 14vw, 180px);
  aspect-ratio: 1 / 1;
  height: auto;
  margin-bottom: clamp(1rem, 2vw, 1.75rem);
  filter:
    drop-shadow(0 8px 24px rgba(0, 0, 0, .55))
    drop-shadow(0 0 30px var(--crimson-glow));
}

.hero-mag__title {
  font-family: var(--ff-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "wght" 300;
  font-size: clamp(3.5rem, 8.5vw, 8.5rem);
  line-height: .88;
  letter-spacing: -.04em;
  margin: 0;
  color: var(--text-primary);
  word-spacing: -.04em;
}
.hero-mag__title .line { display: block; }
.hero-mag__title .line > span { display: inline-block; }
.hero-mag__title .accent {
  font-family: var(--ff-editorial);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, #FF6B7C 0%, #E11D2B 60%, #B40E1E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variation-settings: normal;
  filter: drop-shadow(0 4px 20px rgba(225, 29, 43, 0.45));
}

.hero-mag__deva {
  font-family: var(--ff-deva);
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  color: var(--accent-navy);
  margin: 0;
  letter-spacing: .04em;
}

.hero-mag__motto {
  font-family: var(--ff-editorial);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0;
  max-width: 36ch;
}
.hero-mag__motto em {
  color: var(--accent);
  font-weight: 500;
}

.hero-mag__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.hero-mag__meta {
  display: flex;
  gap: 2.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  margin-top: 2rem;
  font-family: var(--ff-editorial);
  font-style: italic;
  font-size: .92rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.hero-mag__meta-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.hero-mag__meta-label {
  font-family: var(--ff-body);
  font-style: normal;
  font-size: .62rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 500;
}
.hero-mag__meta-val {
  color: var(--text-secondary);
}

/* ============================================================
   HERO MOTION OVERLAY — UI layer over the slideshow
   ============================================================ */
.hero-mag__ui {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  padding: calc(var(--topbar-h) + var(--header-h) + 1.4rem) clamp(1.25rem, 3.5vw, 3rem) clamp(1.4rem, 3vw, 2.4rem);
  display: grid;
  grid-template-areas:
    "crest .       counter"
    ".     .       ."
    "nav   .       scroll";
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  color: #FFF;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
  opacity: 0;
  animation: heroUIFade 1.4s 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
}
.hero-mag__ui > * { pointer-events: auto; }
@keyframes heroUIFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Top-left: brand crest line ---- */
.hero-mag__crest-mark {
  grid-area: crest;
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #FFE9C0;
  justify-self: start;
}
.hero-mag__crest-rule {
  display: inline-block;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #FFE0A8, transparent);
  animation: heroRuleDraw 1.4s 1.6s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes heroRuleDraw {
  from { width: 0; }
  to   { width: 52px; }
}
.hero-mag__crest-label {
  font-family: var(--ff-display);
}

/* ---- Top-right: slide counter ---- */
.hero-mag__counter {
  grid-area: counter;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .92);
  font-variant-numeric: tabular-nums;
}
.hero-mag__counter-current {
  font-size: 1.1rem;
  color: #FFE0A8;
  display: inline-block;
  min-width: 1.4em;
  text-align: right;
  transition: opacity .3s ease;
}
.hero-mag__counter-current.is-changing {
  opacity: 0;
  transform: translateY(-4px);
}
.hero-mag__counter-bar {
  position: relative;
  display: inline-block;
  width: 110px;
  height: 2px;
  background: rgba(255, 255, 255, .25);
  overflow: hidden;
}
.hero-mag__counter-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #FFE0A8, #FFFFFF);
  transform-origin: left center;
  transform: scaleX(0);
}
.hero-mag__counter-fill.is-running {
  animation: heroCounterFill var(--hero-interval, 6000ms) linear forwards;
}
@keyframes heroCounterFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.hero-mag__counter-total {
  font-size: .85rem;
  color: rgba(255, 255, 255, .65);
}

/* ---- Bottom-left: dot navigation ---- */
.hero-mag__nav {
  grid-area: nav;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .8rem;
  background: rgba(20, 20, 30, .28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
}
.hero-mag__dot {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero-mag__dot span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  transition: width .55s var(--ease-out-expo), background .35s ease, transform .35s ease;
}
.hero-mag__dot:hover span { background: rgba(255, 255, 255, .6); transform: scale(1.15); }
.hero-mag__dot.is-active span {
  width: 28px;
  border-radius: 4px;
  background: #FFE0A8;
}

/* ---- Bottom-right: scroll cue ---- */
.hero-mag__scroll {
  grid-area: scroll;
  justify-self: end;
  align-self: end;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: rgba(255, 255, 255, .85);
  font-family: var(--ff-display);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  transition: color .45s ease, transform .55s var(--ease-out-expo);
}
.hero-mag__scroll:hover {
  color: #FFE0A8;
  transform: translateY(3px);
}
.hero-mag__scroll-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.hero-mag__scroll-line {
  display: block;
  width: 1px;
  height: 72px;
  background: rgba(255, 255, 255, .25);
  position: relative;
  overflow: hidden;
}
.hero-mag__scroll-line::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, #FFE0A8, transparent);
  animation: heroScrollPulse 2.4s ease-in-out infinite;
}
@keyframes heroScrollPulse {
  0%   { transform: translateY(0); }
  100% { transform: translateY(200%); }
}

/* ---- Corner ornaments — thin animated tick marks ---- */
.hero-mag__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid #FFE0A8;
  opacity: .8;
  pointer-events: none;
}
.hero-mag__corner--tl { top: calc(var(--topbar-h) + var(--header-h) + .8rem); left: clamp(.85rem, 2.5vw, 2.4rem); border-right: 0; border-bottom: 0; transform-origin: top left; animation: heroCornerDraw 1.2s 1.6s cubic-bezier(.16,1,.3,1) backwards; }
.hero-mag__corner--tr { top: calc(var(--topbar-h) + var(--header-h) + .8rem); right: clamp(.85rem, 2.5vw, 2.4rem); border-left: 0; border-bottom: 0; transform-origin: top right; animation: heroCornerDraw 1.2s 1.7s cubic-bezier(.16,1,.3,1) backwards; }
.hero-mag__corner--bl { bottom: clamp(.85rem, 2.5vw, 2.4rem); left: clamp(.85rem, 2.5vw, 2.4rem); border-right: 0; border-top: 0; transform-origin: bottom left; animation: heroCornerDraw 1.2s 1.8s cubic-bezier(.16,1,.3,1) backwards; }
.hero-mag__corner--br { bottom: clamp(.85rem, 2.5vw, 2.4rem); right: clamp(.85rem, 2.5vw, 2.4rem); border-left: 0; border-top: 0; transform-origin: bottom right; animation: heroCornerDraw 1.2s 1.9s cubic-bezier(.16,1,.3,1) backwards; }
@keyframes heroCornerDraw {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: .8; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mag__ui,
  .hero-mag__crest-rule,
  .hero-mag__corner { animation: none; opacity: 1; }
  .hero-mag__scroll-line::after { animation: none; }
  .hero-mag__counter-fill.is-running { animation: none; transform: scaleX(1); }
  .hero-mag__crest-rule { width: 52px; }
}

@media (max-width: 720px) {
  .hero-mag__ui {
    grid-template-areas:
      "crest counter"
      ".     ."
      "nav   scroll";
    grid-template-columns: 1fr 1fr;
    padding-left: clamp(1rem, 4vw, 1.4rem);
    padding-right: clamp(1rem, 4vw, 1.4rem);
    padding-top: calc(var(--topbar-h) + var(--header-h) + 1rem);
    padding-bottom: clamp(1rem, 3vw, 1.8rem);
  }
  .hero-mag__crest-label { display: none; }
  .hero-mag__counter-bar { width: 60px; }
  .hero-mag__counter-current { font-size: 1rem; }
  .hero-mag__counter-total { font-size: .78rem; }
  .hero-mag__scroll-line { height: 48px; }
  .hero-mag__scroll { gap: .55rem; font-size: .62rem; letter-spacing: .22em; }
  .hero-mag__nav { padding: .42rem .65rem; gap: .4rem; }
  .hero-mag__dot { padding: 5px; }
  .hero-mag__dot span { width: 6px; height: 6px; }
  .hero-mag__dot.is-active span { width: 22px; }
}
@media (max-width: 480px) {
  .hero-mag__corner { width: 16px; height: 16px; }
  .hero-mag__counter-bar { width: 44px; }
  .hero-mag__crest-mark { font-size: .68rem; letter-spacing: .22em; }
  .hero-mag__crest-rule { animation: none; width: 24px; }
}
@media (max-width: 380px) {
  /* Single column UI overlay on tiny phones — hide the brand mark (masthead has it),
     stack counter / dots / scroll vertically, all centered */
  .hero-mag__ui {
    grid-template-areas:
      "counter"
      "."
      "nav"
      "scroll";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto;
    gap: .8rem;
    justify-items: center;
    padding-left: clamp(.75rem, 4vw, 1.4rem);
    padding-right: clamp(.75rem, 4vw, 1.4rem);
  }
  .hero-mag__crest-mark { display: none; }
  .hero-mag__counter { grid-area: counter; justify-self: center; }
  .hero-mag__nav { grid-area: nav; justify-self: center; }
  .hero-mag__scroll {
    grid-area: scroll;
    justify-self: center;
    flex-direction: row;
    gap: .65rem;
    align-self: end;
  }
  .hero-mag__scroll-label { writing-mode: horizontal-tb; transform: none; }
  .hero-mag__scroll-line { width: 32px; height: 1px; }
  .hero-mag__scroll-line::after {
    background: linear-gradient(90deg, transparent, #FFE0A8, transparent);
    animation: heroScrollPulseH 2.4s ease-in-out infinite;
  }
  @keyframes heroScrollPulseH {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }
  .hero-mag__corner--tl, .hero-mag__corner--tr { display: none; }
}

