/* The site layout system: two widths, one header, one footer, and the responsive base
   every marketing page shares. Loaded before any page stylesheet.
     --page     the container the header, footer, hero and wide sections align to
     --measure  the prose width, always inside a .page
   Nothing else on the marketing site may define a header or footer. */
:root { --page: 1140px; --measure: 46rem; --gutter: 22px; --ease: cubic-bezier(.2,.7,.2,1); --curtain: cubic-bezier(.77,0,.18,1); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }
[hidden] { display: none !important; }        /* must beat every display rule below */
.page { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
@media (max-width: 560px) { :root { --gutter: 18px; } }

/* ---------- header ---------- */
.site-head { background: var(--red, #e31837); border-bottom: 2px solid var(--stroke, #171717); position: sticky; top: 0; z-index: 60; color: #fff; }
.site-head-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; }
.site-head .brand { display: flex; align-items: center; flex: 0 0 auto; }
.site-head .brand img { height: 30px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 16px; flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.site-links { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; min-width: 0; }
.site-links > a, .mega-btn { color: #fff; text-decoration: none; font: 700 14px var(--font-sans, Geist, Arial); padding: 10px 11px; min-height: 44px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; position: relative; background: none; border: 0; cursor: pointer; }
.site-links > a::after, .mega-btn::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 6px; height: 2px; background: #fff; transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.site-links > a:hover::after, .site-links > a[aria-current]::after, .mega-btn:hover::after, .mega-btn[aria-current]::after, .mega.open .mega-btn::after { transform: scaleX(1); transform-origin: left; }
.mega-btn .caret { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.mega.open .mega-btn .caret { transform: rotate(180deg); }
.site-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.site-actions .lnk { color: #fff; text-decoration: none; font: 700 14px var(--font-sans, Geist, Arial); padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.btn-cta { background: #fff; color: var(--red, #e31837); text-decoration: none; font: 700 14px var(--font-sans, Geist, Arial); padding: 11px 18px; min-height: 44px; display: inline-flex; align-items: center; border: 2px solid #fff; white-space: nowrap; }
.btn-cta:hover { color: #fff; border-color: var(--ink, #171717); }
/* switcher, on red */
.site-head nav.lang { display: inline-flex; align-items: center; border: 2px solid rgba(255,255,255,.7); font: 600 12.5px var(--font-sans, Geist, Arial); }
.site-head nav.lang a, .site-head nav.lang span { padding: 6px 10px; min-height: 36px; display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.site-head nav.lang span[aria-current] { background: #fff; color: var(--red, #e31837); }
.site-head nav.lang a + span, .site-head nav.lang span + a { border-left: 2px solid rgba(255,255,255,.7); }

/* the three bars */
.menu-btn { display: none; background: none; border: 2px solid #fff; width: 46px; height: 44px; padding: 0; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; margin-left: auto; }
.menu-btn span { display: block; width: 22px; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* under 1024px the nav becomes a panel under the bar; under 560 it fills the screen */
@media (max-width: 1024px) {
  .menu-btn { display: flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--red, #e31837); border-bottom: 2px solid var(--stroke, #171717); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 18px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .site-nav.open { display: flex; }
  .site-links { flex-direction: column; align-items: stretch; gap: 0; }
  .site-links > a, .mega-btn { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.22); font-size: 16px; width: 100%; justify-content: space-between; }
  .site-links > a::after, .mega-btn::after { display: none; }
  .site-links > a:hover, .site-links > a[aria-current] { background: rgba(0,0,0,.12); }
  .mega { width: 100%; }
  .mega-panel { display: none; padding: 4px 0 8px; }
  .mega.open .mega-panel { display: block; }
  .mega-intro { display: none; }
  .mega-item { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 11px 4px 11px 12px; border-bottom: 1px solid rgba(255,255,255,.14); }
  .mega-item .ico { width: 22px; height: 22px; flex: 0 0 auto; color: #fff; }
  .mega-item-t { display: flex; flex-direction: column; min-width: 0; }
  .mega-item-t b { font: 700 16px var(--font-sans, Geist, Arial); }
  .mega-item-t b .bn { font-weight: 500; opacity: .8; margin-left: 4px; }
  .mega-item-t span:last-child { font-size: 13.5px; opacity: .8; line-height: 1.4; }
  .mega-item .arr { display: none; }
  .site-actions { flex-wrap: wrap; gap: 10px; padding-top: 14px; }
  .site-actions .btn-cta, .site-actions .lnk { flex: 1 1 140px; justify-content: center; }
  body.nav-open { overflow: hidden; }
}

/* ---------- footer ---------- */
.site-foot { background: var(--ink, #171717); color: rgba(255,255,255,.72); margin-top: 64px; }
.site-foot-in { padding-top: 46px; padding-bottom: 40px; }
.site-foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.16); }
.site-foot h3 { color: #fff; font: 700 12.5px var(--font-sans, Geist, Arial); letter-spacing: .09em; text-transform: uppercase; margin: 0 0 12px; }
.site-foot-cols a { display: block; color: rgba(255,255,255,.8); text-decoration: none; font-size: 15px; padding: 6px 0; min-height: 36px; }
.site-foot-cols a:hover { color: #fff; text-decoration: underline; }
.site-foot-bottom { padding-top: 26px; }
.site-foot-bottom img { height: 30px; width: auto; display: block; margin-bottom: 12px; }
.site-foot-bottom p { margin: 0 0 8px; font-size: 14.5px; }
.site-foot-bottom .fine { font-size: 12.5px; color: rgba(255,255,255,.5); line-height: 1.6; }
.site-foot-bottom .fine a { color: rgba(255,255,255,.7); }
@media (max-width: 760px) { .site-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .site-foot-cols { grid-template-columns: 1fr; } }

/* ---------- responsive base for content ---------- */
table { max-width: 100%; }
.table-scroll, .wrapscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
pre, code { white-space: pre-wrap; word-break: break-word; }

/* ---------- the Practice curtain (desktop) ---------- */
@media (min-width: 1025px) {
  .mega { position: static; }
  .mega-panel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; color: var(--ink, #171717); border-bottom: 2px solid var(--stroke, #171717);
                clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .5s var(--curtain), visibility 0s linear .5s; }
  .mega.open .mega-panel { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .55s var(--curtain), visibility 0s; }
  .mega-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 40px; padding-top: 34px; padding-bottom: 38px; }
  .mega-intro { border-right: 2px solid var(--stroke, #171717); padding-right: 36px; }
  .mega-eyebrow { margin: 0 0 8px; font: 700 12px var(--font-sans, Geist, Arial); letter-spacing: .1em; text-transform: uppercase; color: var(--red, #e31837); }
  .mega-h { margin: 0 0 10px; font: 700 24px/1.2 var(--font-sans, Geist, Arial); letter-spacing: -.01em; color: var(--ink, #171717); }
  .mega-p { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: #404040; }
  .mega-intro .btn-cta { background: var(--red, #e31837); color: #fff; border-color: var(--stroke, #171717); }
  .mega-items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
  .mega-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 44px 14px 12px; color: var(--ink, #171717); text-decoration: none; border: 2px solid transparent; position: relative; }
  .mega-item:hover, .mega-item[aria-current] { border-color: var(--stroke, #171717); }
  .mega-item .ico { width: 26px; height: 26px; flex: 0 0 auto; color: var(--red, #e31837); margin-top: 2px; }
  .mega-item-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .mega-item-t b { font: 700 16px var(--font-sans, Geist, Arial); }
  .mega-item-t b .bn { font-weight: 500; color: var(--purple, #5900c1); margin-left: 4px; }
  .mega-item-t span:last-child { font-size: 13.5px; line-height: 1.45; color: #525252; }
  .mega-item .arr { position: absolute; right: 12px; top: 16px; opacity: 0; transform: translateX(-6px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .mega-item:hover .arr { opacity: 1; transform: none; }
  /* the items rise in after the curtain lands */
  .mega-in > * { opacity: 0; transform: translateY(10px); transition: opacity .35s var(--ease) .05s, transform .35s var(--ease) .05s; }
  .mega.open .mega-in > * { opacity: 1; transform: none; }
  .mega.open .mega-in > .mega-items { transition-delay: .18s; }
  /* everything under the curtain goes soft */
  body > :not(header):not(script) { transition: filter .4s var(--ease); }
  body.mega-open > :not(header):not(script) { filter: blur(6px); }
}

/* ---------- motion ---------- */
/* Cross-document view transitions: the header holds still, the page under it blurs out
   and the next one blurs in. Browsers without support simply navigate. */
@view-transition { navigation: auto; }
.site-head { view-transition-name: site-head; }
::view-transition-old(root) { animation: vt-out .26s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }
::view-transition-group(site-head) { animation-duration: 0s; }
@keyframes vt-out { to { opacity: 0; filter: blur(14px); transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; filter: blur(14px); transform: translateY(12px); } }

/* Buttons: the fill sweeps in from the left and leaves to the right; the arrow's shaft
   draws itself and the head moves on. --fill is the colour the sweep brings. */
.btn, .btn-cta, .go { position: relative; isolation: isolate; overflow: hidden; --fill: var(--ink, #171717);
  transition: color .28s var(--ease), border-color .28s var(--ease); }
.btn::before, .btn-cta::before, .go::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill);
  transform: scaleX(0); transform-origin: right; transition: transform .38s var(--curtain); }
.btn:hover::before, .btn-cta:hover::before, .go:hover::before, .btn:focus-visible::before, .btn-cta:focus-visible::before { transform: scaleX(1); transform-origin: left; }
.arr { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.arr-shaft { stroke-dasharray: 15; stroke-dashoffset: 9; transition: stroke-dashoffset .35s var(--ease); }
.arr-head { transition: transform .35s var(--ease); }
:is(.btn, .btn-cta, .mega-item, a):hover .arr-shaft { stroke-dashoffset: 0; }
:is(.btn, .btn-cta, .mega-item, a):hover .arr-head { transform: translateX(3px); }
/* buttons that still spell the arrow as text */
.btn::after { transition: transform .35s var(--ease); }
.btn:hover::after { transform: translateX(5px); }

/* Prose links: the underline grows from the left */
main p a:not(.btn), main li a:not(.btn), .site-foot-cols a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-size: 0% 2px; background-position: 0 100%; transition: background-size .3s var(--ease); }
main p a:not(.btn):hover, main li a:not(.btn):hover, .site-foot-cols a:hover { background-size: 100% 2px; text-decoration: none; }

/* Cards: a lift and a hard shadow, no scaling */
a.card, .plan, .cards > a { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
a.card:hover, .plan:hover, .cards > a:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--stroke, #171717); }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after, ::view-transition-old(*), ::view-transition-new(*) { animation-duration: 0s !important; transition-duration: 0s !important; }
}
