/* Page frame — masthead, slim bar, drawer, sections, inner page head, footer.
 * Carried over from mockup B; the masthead and footer are the same on every page. */

/* ============ MASTHEAD ============ */
.mast { position: relative; z-index: 40; background: linear-gradient(var(--surface-0), var(--surface-1)); border-bottom: 1px solid var(--hair); }
.mast-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-top: 26px; padding-bottom: 16px; }
.mast-left { display: flex; align-items: center; gap: 18px; }
.mast-right { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; place-items: center; border: 1px solid var(--hair-2); transition: border-color .2s, background-color .2s; }
.burger:hover { border-color: var(--hair-gold); background: var(--gold-tint); }
.burger .icon { width: 20px; height: 20px; }
.wordmark { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wm-sub { margin-top: 8px; font: 500 10px/1 var(--font-body); letter-spacing: .42em; margin-right: -.42em; text-transform: uppercase; color: var(--color-text-2); }
.wm-s { font: 500 20px/1 var(--font-head); letter-spacing: .3em; white-space: nowrap; }

.rubric { border-top: 1px solid var(--hair); }
.rubric ul { margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; }
.rubric li + li { border-left: 1px solid var(--hair-2); }
.rubric a { display: block; padding: 14px 26px; font: 500 12.5px/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--color-text-2); position: relative; transition: color .2s; }
.rubric a::after { content: ""; position: absolute; left: 26px; right: 26px; bottom: 8px; height: 1px; background: var(--color-gold); transform: scaleX(0); transition: transform .35s var(--ease-out); }
.rubric a:hover, .rubric a[aria-current] { color: var(--color-text); }
.rubric a:hover::after, .rubric a[aria-current]::after { transform: scaleX(1); }
.mast-strip { display: none; }

.acct { display: inline-flex; align-items: center; gap: 8px; }
.acct__name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }

/* the wordmark image (brand art: letters + rule with the arch) */
.brand-wm { display: block; height: auto; }
.brand-wm--mast { width: clamp(240px, 30vw, 380px); }
.wm-s .brand-wm { width: 150px; }
.foot .wm-s .brand-wm { width: 220px; }
.wordmark .wm-sub { margin-top: 10px; }

/* slim bar — the collapsed masthead */
.slim { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header); transform: translateY(-105%); transition: transform .45s var(--ease-out);
  background: color-mix(in srgb, var(--surface-0) 78%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--hair); box-shadow: 0 10px 30px -18px rgba(5,6,9,.8); }
.slim.is-on { transform: none; }
.slim .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; height: 64px; }
.slim .rubric { border: 0; }
.slim .rubric a { padding: 12px 16px; font-size: 11.5px; letter-spacing: .16em; }
.slim .rubric a::after { left: 16px; right: 16px; bottom: 5px; }
.slim .burger { display: none; }

/* drawer (mobile menu) */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); }
.drawer[hidden] { display: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(10,11,14,.6); opacity: 0; transition: opacity .35s; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; left: 0; bottom: 0; width: min(86vw, 360px); background: var(--surface-1); border-right: 1px solid var(--hair-gold-2);
  transform: translateX(-100%); transition: transform .45s var(--ease-out); display: flex; flex-direction: column; padding: 20px 22px 28px; overflow: auto; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__panel::before { content: ""; position: absolute; inset: auto 0 0 0; height: 220px; background: var(--lattice); opacity: .09; -webkit-mask: linear-gradient(transparent, #000); mask: linear-gradient(transparent, #000); pointer-events: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.drawer__top .burger { display: grid; }
.drawer nav li { border-bottom: 1px solid var(--hair); }
.drawer nav a { display: flex; align-items: baseline; gap: 16px; padding: 16px 4px; font: 500 22px/1.1 var(--font-head); letter-spacing: .06em; }
.drawer nav a small { font: 500 11px/1 var(--font-head); color: var(--color-gold); width: 26px; letter-spacing: .1em; }
.drawer nav a[aria-current] { color: var(--color-gold); }
.drawer__cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; position: relative; }
.drawer .rg { margin-top: auto; padding-top: 24px; position: relative; }

/* ============ SECTIONS ============ */
.sec { padding: var(--sec) 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 600 11px/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--color-gold); }
.eyebrow em { font: 500 14px/1 var(--font-head); font-style: normal; letter-spacing: .1em; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--hair-gold); }
.h2 { font: 500 var(--fs-h2)/1.1 var(--font-head); letter-spacing: .02em; margin-top: 16px; }
.lede { color: var(--color-text-2); margin-top: 16px; font-size: var(--fs-lede); max-width: 60ch; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.sec-head .lede { max-width: 46ch; font-size: 15px; margin-top: 0; }
.edge-lattice { position: absolute; left: 0; right: 0; height: 72px; background: var(--lattice) center/48px 72px; opacity: .11; pointer-events: none; }
.edge-lattice.top { top: 0; -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent); }
.edge-lattice.bot { bottom: 0; -webkit-mask: linear-gradient(transparent, #000); mask: linear-gradient(transparent, #000); }

/* ============ INNER PAGE HEAD — the hero frame, smaller, over a wide photo ============ */
.page-head { position: relative; overflow: hidden; isolation: isolate; background: var(--surface-0); }
.page-head__bg { position: absolute; inset: 0; z-index: -2; }
.page-head__bg picture, .page-head__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head__bg img { object-position: var(--pos, 70% 50%); }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(17,19,24,.95) 0%, rgba(17,19,24,.8) 40%, rgba(17,19,24,.25) 75%),
  linear-gradient(0deg, rgba(17,19,24,1) 0%, rgba(17,19,24,0) 45%); }
.page-head .wrap { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(48px, 6vw, 80px); }
.page-head .frame { position: relative; width: min(720px, 100%); padding: 72px 40px 36px; }
.page-head h1 { font: 500 clamp(32px, 4vw, 54px)/1.08 var(--font-head); letter-spacing: .015em; }
.page-head .sub { margin-top: 16px; color: var(--color-text-2); font-size: var(--fs-lede); max-width: 56ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--color-text-2); margin-bottom: 14px; letter-spacing: .04em; }
.crumbs a { color: var(--color-text-2); text-decoration: none; }
.crumbs a:hover { color: var(--color-gold); }
.crumbs span[aria-hidden] { color: var(--hair-gold); }

/* arch frame — shared by the hero slides and the inner page head */
.frame-bg { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 72%, transparent), color-mix(in srgb, var(--surface-0) 86%, transparent));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-mask: var(--ogee-head) top/100% 72px no-repeat, linear-gradient(#000,#000) bottom/100% calc(100% - 71px) no-repeat;
  mask: var(--ogee-head) top/100% 72px no-repeat, linear-gradient(#000,#000) bottom/100% calc(100% - 71px) no-repeat; }
.frame-head { position: absolute; left: 0; top: 0; width: 100%; height: 72px; overflow: visible; pointer-events: none; }
.frame-head path { fill: none; stroke: var(--hair-gold); stroke-width: 1; vector-effect: non-scaling-stroke; }
.frame-body { position: absolute; left: 0; right: 0; top: 71px; bottom: 0; border: 1px solid var(--hair-gold); border-top: 0; pointer-events: none; }
.frame-body::before { content: ""; position: absolute; inset: 0 9px 9px; border: 1px solid var(--hair-gold-2); border-top: 0; }
.frame-apex { position: absolute; left: 50%; top: -9px; width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg); border: 1px solid var(--color-gold); background: var(--surface-0); }
.kicker { display: flex; align-items: center; gap: 12px; font: 600 11px/1 var(--font-body); letter-spacing: .32em; text-transform: uppercase; color: var(--color-gold); margin-bottom: 18px; }
.kicker em { font: 500 13px/1 var(--font-head); font-style: normal; letter-spacing: .12em; }
.kicker::after { content: ""; width: 40px; height: 1px; background: var(--hair-gold); }

/* the first section after the page head does not need a full section gap */
.page-head + .sec, .page-head + section.sec { padding-top: clamp(40px, 5vw, 64px); }

/* ============ FOOTER ============ */
.foot { border-top: 1px solid var(--hair); background: var(--surface-1); padding: 56px 0 32px; position: relative; }
.foot-top { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.foot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.foot .wm-s { font-size: 24px; }
.foot__about p { color: var(--color-text-2); font-size: 14px; margin-top: 14px; max-width: 46ch; }
.foot h2 { margin: 0 0 14px; font: 600 11px/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--color-gold); }
.foot ul { margin: 0; padding: 0; display: grid; gap: 2px; }
.foot ul a { color: var(--color-text-2); font-size: 14px; display: inline-block; padding: 6px 0; transition: color .2s; text-decoration: none; }
.foot ul a:hover { color: var(--color-text); }
.foot-data { margin-top: 40px; padding: 24px; border: 1px solid var(--hair); border-radius: var(--radius-lg); background: var(--surface-0); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 28px; }
.foot-data dt { font: 600 10.5px/1.2 var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--color-gold); margin-bottom: 6px; }
.foot-data dd { margin: 0; font-size: 13.5px; color: var(--color-text-2); }
.foot-data dd a { color: var(--color-text); }
.foot-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.foot-logos .pay { height: 40px; padding: 8px 12px; border-radius: 10px; background: #fff; display: grid; place-items: center; }
.foot-logos .pay img { height: 22px; width: auto; max-width: 84px; object-fit: contain; }
.foot-logos .age { width: 40px; height: 40px; }
.foot-bottom { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 12.5px; color: var(--color-text-2); }
.foot-bottom button { color: var(--color-text-2); text-decoration: underline; text-underline-offset: 3px; min-height: 24px; }
.foot-bottom button:hover { color: var(--color-gold); }

.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface-2) 90%, transparent); border: 1px solid var(--hair-gold); color: var(--color-gold); box-shadow: var(--shadow-2);
  transition: transform .25s var(--ease-spring), background-color .2s; }
.to-top:hover { transform: translateY(-3px); background: var(--gold-tint); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
  .rubric a { padding: 14px 16px; letter-spacing: .16em; }
  .rubric a::after { left: 16px; right: 16px; }
  .slim .rubric a { padding: 12px 10px; letter-spacing: .1em; }
}
@media (max-width: 1100px) {
  .foot-data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .foot-data { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .slim .rubric { display: none; }
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .mast-row { grid-template-columns: auto 1fr auto; padding-top: 12px; padding-bottom: 10px; gap: 10px; }
  .mast-left .rg, .mast-right .btn-text { display: none; }
  /* a returning guest still sees Login: icon button, name kept for screen readers */
  .mast-right .btn-login { display: inline-flex; width: 44px; min-height: 44px; padding: 0; }
  .btn-login__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .burger { display: grid; }
  .brand-wm--mast { width: 160px; }
  .wm-sub { display: none; }
  .mast .rubric { display: none; }
  .mast-strip { display: flex; justify-content: center; border-top: 1px solid var(--hair); padding: 8px 0; }
  .mast-right { gap: 2px; }
  .mast-right .btn { min-height: 44px; padding: 0 14px; }
  .acct__name { display: none; }
  .slim .wrap { height: 60px; grid-template-columns: 44px 1fr auto; gap: 10px; }
  .slim .burger { display: grid; }
  .slim .wm-s { justify-self: center; }
  .slim .wm-s .brand-wm { width: 130px; }
  .slim .mast-right .btn-text { display: none; }
  .page-head .frame { padding: 60px 20px 26px; }
  .page-head::before { background: linear-gradient(0deg, rgba(17,19,24,1) 0%, rgba(17,19,24,.88) 55%, rgba(17,19,24,.45) 100%); }
  .page-head .frame-bg { -webkit-mask: var(--ogee-head) top/100% 56px no-repeat, linear-gradient(#000,#000) bottom/100% calc(100% - 55px) no-repeat; mask: var(--ogee-head) top/100% 56px no-repeat, linear-gradient(#000,#000) bottom/100% calc(100% - 55px) no-repeat; }
  .page-head .frame-head { height: 56px; }
  .page-head .frame-body { top: 55px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-grid > :last-child { grid-column: 1 / -1; }
  .foot-data { padding: 18px; }
}
@media (max-width: 389px) {
  .mast-row { gap: 4px; }
  .mast .burger, .mast-right .btn-login { width: 40px; min-height: 40px; height: 40px; }
  .brand-wm--mast { width: 120px; }
  .mast-right .btn { padding: 0 10px; font-size: 13px; min-height: 40px; }
}
