/* Marketing header + footer: <x-site.header /> and <x-site.footer />.
   Self-contained so any page can use them. Everything is scoped under .sc-header / .sc-footer and
   themed by the --sc-* tokens below (home-v2 palette); a host page may override any of them.
   Fonts are inherited from the page. */
.sc-header, .sc-footer {
  --sc-accent: #ED2024; --sc-accent-fill: #D91C20; --sc-accent-ink: #C8161A; --sc-accent-soft: #FFE9E9;
  --sc-bg: #FFFFFF; --sc-bg-2: #ECEFF0; --sc-bg-3: #F7F8F8;
  --sc-text: #15191B; --sc-muted: #4F585C; --sc-subtle: #667074; --sc-line: #E2E6E8; --sc-line-2: #CDD4D7;
  --sc-shadow-lg: 0 2px 4px rgba(20,43,47,.05), 0 30px 70px -20px rgba(20,43,47,.28);
  --sc-ease: cubic-bezier(.16,1,.3,1);
  --sc-wrap: 1320px;
  font-family: inherit;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.sc-header, .sc-footer) {
  --sc-accent: #DC3333; --sc-accent-ink: #FF9494; --sc-accent-soft: rgba(220,51,51,.18);
  --sc-bg: #1E1E1E; --sc-bg-2: #262626; --sc-bg-3: #222222;
  --sc-text: #EDEDED; --sc-muted: #A3A3A3; --sc-subtle: #9A9A9A; --sc-line: #313131; --sc-line-2: #3A3A3A;
  --sc-shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 30px 70px -20px rgba(0,0,0,.7);
} }
:root[data-theme="dark"] :is(.sc-header, .sc-footer) {
  --sc-accent: #DC3333; --sc-accent-ink: #FF9494; --sc-accent-soft: rgba(220,51,51,.18);
  --sc-bg: #1E1E1E; --sc-bg-2: #262626; --sc-bg-3: #222222;
  --sc-text: #EDEDED; --sc-muted: #A3A3A3; --sc-subtle: #9A9A9A; --sc-line: #313131; --sc-line-2: #3A3A3A;
  --sc-shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 30px 70px -20px rgba(0,0,0,.7);
}
:is(.sc-header, .sc-footer) *, :is(.sc-header, .sc-footer) *::before { box-sizing: border-box; }
:is(.sc-header, .sc-footer) ul { list-style: none; margin: 0; padding: 0; }
:is(.sc-header, .sc-footer) p { margin: 0; }
:is(.sc-header, .sc-footer) svg { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:is(.sc-header, .sc-footer) :is(a, button):focus-visible { outline: 3px solid var(--sc-accent); outline-offset: 3px; }

/* Logo: light/dark SVG pair */
.sc-logo { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.sc-logo img { height: 34px; width: auto; display: block; }
.sc-logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sc-logo-light { display: none !important; } :root:not([data-theme="light"]) .sc-logo-dark { display: block !important; } }
:root[data-theme="dark"] .sc-logo-light { display: none !important; }
:root[data-theme="dark"] .sc-logo-dark { display: block !important; }

/* Buttons */
.sc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: .9rem; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .25s var(--sc-ease), background .2s; }
.sc-btn:hover { transform: translateY(-2px); }
.sc-btn-primary { background: var(--sc-accent-fill); color: #fff; box-shadow: 0 8px 20px -8px rgba(237,32,36,.55); }
.sc-btn-primary:hover { background: #D41B1F; }
.sc-btn-light { background: var(--sc-bg); color: var(--sc-text); box-shadow: inset 0 0 0 1px var(--sc-line-2); }
.sc-btn-light.sc-login { box-shadow: inset 0 0 0 1.5px var(--sc-text); }

/* Header bar */
.sc-header { position: sticky; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 50; max-width: var(--sc-wrap); margin-inline: auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.sc-bar { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 60px; padding: .45rem .45rem .45rem 1.2rem; border-radius: 999px; background: color-mix(in srgb, var(--sc-bg) 82%, transparent); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: inset 0 0 0 1px var(--sc-line), 0 10px 30px -10px rgba(20,43,47,.18); }
.sc-nav { margin-inline: auto; }
.sc-links { display: flex; gap: .1rem; }
.sc-nl { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; padding: 0 .65rem; border: 0; border-radius: 999px; background: none; cursor: pointer; text-decoration: none; white-space: nowrap; font-family: inherit; font-weight: 600; font-size: .93rem; line-height: 1; color: var(--sc-muted); transition: color .2s, background .2s; }
.sc-nl:hover, .sc-dd.is-open > .sc-nl { color: var(--sc-text); background: var(--sc-bg-2); }
.sc-chev { font-size: .9rem; transition: transform .25s var(--sc-ease); }
.sc-dd.is-open > .sc-nl .sc-chev { transform: rotate(180deg); }
.sc-globe { font-size: 1rem; }
.sc-globe .sc-spin { transform-box: fill-box; transform-origin: center; animation: sc-spin 3s linear infinite; }
.sc-globe .sc-spin-b { animation-delay: -1.5s; }
@keyframes sc-spin { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(0); } }
.sc-flag { width: 1.1rem; height: 1.1rem; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px var(--sc-line); }
.sc-actions { display: flex; align-items: center; gap: .5rem; flex: none; }

/* Mega menus: centred under the bar; the region menu hangs off its own button */
.sc-mega { position: absolute; top: calc(100% + 12px); left: 50%; z-index: 60; width: max-content; max-width: 100%; background: var(--sc-bg); border-radius: 20px; overflow: hidden; box-shadow: var(--sc-shadow-lg), inset 0 0 0 1px var(--sc-line); opacity: 0; visibility: hidden; translate: -50% 8px; transition: opacity .18s, translate .25s var(--sc-ease), visibility .18s; }
.sc-mega::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; }
.sc-dd.is-open > .sc-mega { opacity: 1; visibility: visible; translate: -50% 0; }
.sc-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(200px, 1fr)); gap: 1.2rem 1.6rem; padding: 1.3rem 1.4rem 1.1rem; }
.sc-mh { margin: 0 0 .4rem; padding: 0 .55rem .6rem; border-bottom: 1px solid var(--sc-line); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sc-subtle); }
.sc-mi { display: flex; align-items: center; min-height: 40px; padding: .35rem .55rem; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--sc-text); transition: background .15s, color .15s; }
.sc-mi:hover { background: var(--sc-accent-soft); color: var(--sc-accent-ink); }
.sc-mi[aria-current="page"] { color: var(--sc-accent-ink); }
.sc-all { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.95rem; border-top: 1px solid var(--sc-line); background: var(--sc-bg-3); text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--sc-accent-ink); transition: background .15s; }
.sc-all:hover { background: var(--sc-accent-soft); }
.sc-region { position: relative; }
.sc-region .sc-mega { min-width: 180px; padding: .5rem; }
.sc-region-list .sc-mi { gap: .55rem; }
.sc-drawer-extra { display: none; }
.sc-burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sc-bg-2); color: var(--sc-text); place-items: center; cursor: pointer; font-size: 1.2rem; }

@media (hover: hover) and (min-width: 1281px) {
  .sc-dd:hover > .sc-mega { opacity: 1; visibility: visible; translate: -50% 0; }
  .sc-dd:hover > .sc-nl .sc-chev { transform: rotate(180deg); }
}

/* Between the full bar and the drawer: drop the demo button first. */

/* Drawer: the same <nav> drops below the bar as a scrolling panel with accordion menus. */
@media (max-width: 1280px) {
  .sc-bar { justify-content: space-between; }
  .sc-burger { display: grid; }
  .sc-region { display: none; }
  .sc-nav { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; padding: .6rem; border-radius: 24px; background: var(--sc-bg); box-shadow: var(--sc-shadow-lg), inset 0 0 0 1px var(--sc-line); }
  .sc-header.is-menu-open .sc-nav { display: block; }
  .sc-links { flex-direction: column; }
  .sc-nl { display: flex; width: 100%; font-size: 1rem; color: var(--sc-text); }
  .sc-dd .sc-chev { margin-left: auto; }
  .sc-mega, .sc-region .sc-mega { position: static; display: none; width: auto; max-width: none; opacity: 1; visibility: visible; translate: none; border-radius: 0; box-shadow: none; overflow: visible; background: none; }
  .sc-mega::before { content: none; }
  .sc-dd.is-open > .sc-mega { display: block; translate: none; }
  .sc-cols { grid-template-columns: 1fr; gap: .4rem; padding: .2rem 0 .6rem .3rem; }
  .sc-mh { margin: .5rem .55rem .1rem; padding: 0; border: 0; font-size: .72rem; }
  .sc-mi { min-height: 44px; }
  .sc-all { padding: .6rem .85rem; border: 0; background: none; border-radius: 10px; }
  .sc-drawer-extra { display: block; margin-top: .4rem; padding-top: .6rem; border-top: 1px solid var(--sc-line); }
  .sc-drawer-extra .sc-region-list { display: flex; flex-wrap: wrap; gap: .2rem; }
  .sc-drawer-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; }
}
@media (max-width: 560px) { .sc-login { display: none; } }
@media (max-width: 420px) {
  .sc-bar { padding-left: 1rem; }
  .sc-header .sc-logo img { height: 26px; }
  .sc-actions .sc-btn-primary { padding: 0 .9rem; font-size: .85rem; }
  .sc-drawer-ctas { grid-template-columns: 1fr; }
}
@media (max-width: 359px) { .sc-actions .sc-btn-primary { display: none; } }

/* Footer */
.sc-footer { max-width: var(--sc-wrap); margin-inline: auto; padding: 3.5rem max(16px, env(safe-area-inset-right, 0px)) 3rem max(16px, env(safe-area-inset-left, 0px)); font-size: .9rem; color: var(--sc-muted); }
.sc-foot { display: grid; grid-template-columns: minmax(220px, 1.3fr) 4fr; gap: 2.5rem; }
.sc-brand .sc-logo { margin-bottom: .75rem; }
.sc-brand .sc-logo img { height: 42px; }
.sc-brand p { max-width: 30ch; line-height: 1.6; }
.sc-brand address { display: grid; margin-top: .9rem; font-style: normal; }
.sc-footer a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; transition: color .15s; }
.sc-brand address a { min-height: 36px; }
.sc-footer a:hover { color: var(--sc-text); }
.sc-fcols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.5rem; }
.sc-fh { margin-bottom: .5rem; font-weight: 700; font-size: .85rem; color: var(--sc-text); }
.sc-fcols a { line-height: 1.3; }
.sc-legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--sc-line); }
.sc-regions { display: flex; gap: 1.1rem; }
.sc-regions a[aria-current="page"] { color: var(--sc-text); font-weight: 700; }
@media (max-width: 1100px) { .sc-foot { grid-template-columns: 1fr; } .sc-brand p { max-width: 60ch; } .sc-fcols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sc-fcols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .sc-btn:hover { transform: none; }
  .sc-mega, .sc-chev, .sc-btn { transition: none; }
  .sc-globe .sc-spin { animation: none; }
}
