/* ==========================================================================
   Site header and footer (Views/Partials/Shared/Header.cshtml and Footer.cshtml)
   Loaded on every page by Views/Layout.cshtml, in the old design and the 2026 redesign alike.
   Everything is scoped to .pc-chrome (the header, the phone menu and the footer) with its own
   pc- class names and colour tokens, so the old design's styles and variables never reach it
   and it never changes theirs. Behaviour: scripts/shared/header.js.
   ========================================================================== */
.pc-chrome {
  --pc-red: #E00E19;
  --pc-red-hover: #C40B15;
  --pc-navy: #01131D;
  --pc-bg: #F3F4F5;
  --pc-surface-2: #E9EBED;
  --pc-ink: #01131D;
  --pc-muted: #56636E;
  --pc-line: rgba(1, 19, 29, .10);
  --pc-line-strong: rgba(1, 19, 29, .20);
  --pc-accent-text: #C40B15;
  --pc-header-bg: rgba(243, 244, 245, .82);
  --pc-radius: 10px;
  --pc-ease: cubic-bezier(.16, 1, .3, 1);
  --pc-gutter: 28px;
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* Dark only where the page supports it: redesigned pages set data-theme on <html> */
:root[data-theme="dark"] .pc-chrome {
  --pc-bg: #01131D;
  --pc-surface-2: #0D2635;
  --pc-ink: #ECECEC;
  --pc-muted: #98A6B1;
  --pc-line: rgba(236, 236, 236, .10);
  --pc-line-strong: rgba(236, 236, 236, .22);
  --pc-accent-text: #FF5C64;
  --pc-header-bg: rgba(1, 19, 29, .8);
}
.pc-chrome *, .pc-chrome *::before, .pc-chrome *::after { box-sizing: border-box; }
.pc-chrome img, .pc-chrome svg { display: block; max-width: 100%; }
.pc-chrome h4, .pc-chrome p { margin: 0; }
.pc-chrome a { text-decoration: none; }
.pc-chrome :focus-visible { outline: 2px solid var(--pc-red); outline-offset: 3px; border-radius: 6px; }
.pc-wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pc-gutter); }

/* ---------- Buttons ---------- */
.pc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 38px; padding: 0 14px; border-radius: var(--pc-radius);
  border: 1px solid transparent; font-family: inherit; font-weight: 600; font-size: 13.5px; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--pc-ease), border-color .2s var(--pc-ease), color .2s var(--pc-ease), transform .2s var(--pc-ease);
}
.pc-btn:active { transform: translateY(1px) scale(.985); }
.pc-btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.pc-btn-primary { background: var(--pc-red); color: #fff; }
.pc-btn-primary:hover { background: var(--pc-red-hover); color: #fff; }
.pc-btn-ghost { background: transparent; border-color: var(--pc-line-strong); color: var(--pc-ink); }
.pc-btn-ghost:hover { border-color: var(--pc-ink); color: var(--pc-ink); }
.pc-icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; flex: none; padding: 0; cursor: pointer;
  border-radius: var(--pc-radius); border: 1px solid var(--pc-line); background: transparent; color: var(--pc-ink);
  transition: border-color .2s, background-color .2s;
}
.pc-icon-btn:hover { border-color: var(--pc-line-strong); background: var(--pc-surface-2); }
.pc-icon-btn i { font-size: 19px; }

/* ---------- Header ---------- */
.pc-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--pc-header-bg); color: var(--pc-ink);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--pc-line);
}
.pc-header-inner { height: 68px; display: flex; align-items: center; gap: 28px; transition: filter .6s var(--pc-ease), opacity .6s var(--pc-ease); }
/* Once the page is scrolled the navbar fades to grayscale; hover or focus brings the colour back */
.pc-header.is-scrolled .pc-header-inner { filter: grayscale(1); opacity: .9; }
.pc-header.is-scrolled:hover .pc-header-inner,
.pc-header.is-scrolled:focus-within .pc-header-inner { filter: none; opacity: 1; }

/* Floating over a full-bleed hero: no background at the top, see-through glass once scrolled */
.pc-header.over-hero {
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background-color .45s var(--pc-ease), border-color .45s var(--pc-ease), -webkit-backdrop-filter .45s var(--pc-ease), backdrop-filter .45s var(--pc-ease);
}
/* Over a light photo the navbar keeps dark text, even in dark mode */
.pc-header.over-hero:not(.is-scrolled):not(.menu-open) {
  --pc-ink: #01131D; --pc-muted: #2E3B45; --pc-line: rgba(1, 19, 29, .14); --pc-line-strong: rgba(1, 19, 29, .24); --pc-surface-2: rgba(255, 255, 255, .45); --pc-accent-text: #C40B15;
}
.pc-header.over-hero:not(.is-scrolled):not(.menu-open) .pc-icon-btn,
.pc-header.over-hero:not(.is-scrolled):not(.menu-open) .pc-btn-ghost { background: rgba(255, 255, 255, .35); }
.pc-header.over-hero.is-scrolled {
  background: rgba(243, 244, 245, .5); border-bottom-color: rgba(1, 19, 29, .08);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
}
:root[data-theme="dark"] .pc-header.over-hero.is-scrolled { background: rgba(1, 19, 29, .5); border-bottom-color: rgba(236, 236, 236, .08); }
.pc-header.over-hero.menu-open { background: var(--pc-bg); border-bottom-color: var(--pc-line); }

.pc-brand { display: flex; align-items: center; gap: 11px; color: var(--pc-ink); flex: none; }
/* Old-design pages have a bare a:hover rule (0,1,1) that would out-rank .pc-brand; keep the brand colour */
.pc-chrome a.pc-brand:hover { color: var(--pc-ink); text-decoration: none; }
.pc-footer a.pc-brand:hover { color: #ECECEC; }
.pc-brand img { width: 36px; height: 36px; object-fit: contain; }
.pc-brand-word { font-weight: 700; font-size: 17px; letter-spacing: -.02em; line-height: 1; }
.pc-brand-word span { color: var(--pc-accent-text); }
.pc-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.pc-nav a {
  position: relative; padding: 9px 13px; border-radius: var(--pc-radius);
  color: var(--pc-muted); font-size: 14.5px; font-weight: 500; white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.pc-nav a:hover { color: var(--pc-ink); background: var(--pc-surface-2); }
.pc-nav a[aria-current="page"] { color: var(--pc-ink); }
.pc-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: -15px; height: 2px; background: var(--pc-red); border-radius: 2px;
}
.pc-header-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.pc-menu-toggle { display: none; }

/* Phone menu */
.pc-mobile-nav { display: none; }

/* ---------- Footer ---------- */
.pc-footer { background: var(--pc-navy); color: #C9D1D7; margin-top: 104px; }
.pc-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(var(--pc-columns, 3), 1fr); gap: 40px; padding: 64px 0 40px; }
.pc-footer-brand p { margin-top: 16px; font-size: 14.5px; color: #98A6B1; max-width: 34ch; }
.pc-footer .pc-brand { color: #ECECEC; }
.pc-footer .pc-brand-word span { color: #FF5C64; }
.pc-footer h4 { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6F808C; font-weight: 500; }
.pc-footer ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.pc-footer a { color: #C9D1D7; font-size: 14.5px; }
.pc-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pc-socials { display: flex; gap: 8px; margin-top: 22px; }
.pc-socials a { width: 40px; height: 40px; border-radius: var(--pc-radius); border: 1px solid rgba(236, 236, 236, .16); display: grid; place-items: center; font-size: 19px; }
.pc-socials a:hover { border-color: #FF5C64; color: #fff; background: rgba(224, 14, 25, .2); text-decoration: none; }
.pc-footer-bottom { border-top: 1px solid rgba(236, 236, 236, .1); padding: 22px 0 30px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #6F808C; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pc-footer-grid { grid-template-columns: 1fr 1fr; }
  .pc-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .pc-chrome { --pc-gutter: 20px; }
  .pc-nav, .pc-header-actions .pc-desk { display: none; }
  .pc-menu-toggle { display: inline-grid; }
  .pc-mobile-nav {
    display: block; position: fixed; inset: 68px 0 0; z-index: 39; background: var(--pc-bg); color: var(--pc-ink);
    padding: 20px var(--pc-gutter) 40px; overflow-y: auto;
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s var(--pc-ease), transform .2s var(--pc-ease);
  }
  .pc-mobile-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .pc-mobile-nav .pc-m-link { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--pc-ink); border-bottom: 1px solid var(--pc-line); }
  .pc-mobile-nav .pc-m-actions { display: grid; gap: 10px; margin-top: 26px; }
}
@media (max-width: 640px) {
  .pc-chrome { --pc-gutter: 16px; }
  .pc-brand-word { font-size: 16px; }
  .pc-footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-chrome *, .pc-chrome *::before, .pc-chrome *::after { transition-duration: .01ms !important; }
}
