/* Welcome screen: brand animation, then the three ways in. Always the dark (reverse) brand. */
.welcome-page { --w-navy: #071c35; --w-teal: #00bfa3; --w-green: #12c990;
  background: radial-gradient(120% 90% at 50% 0%, #0c2a4a 0%, var(--w-navy) 55%, #040f1e 100%); color: #e8f0f5; min-height: 100vh; overflow-x: hidden; }
.welcome { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: clamp(28px, 5vh, 56px); padding: clamp(28px, 6vh, 72px) 20px 40px; max-width: 1080px; margin: 0 auto; }

.welcome-glow { position: fixed; inset: auto 0 0 0; height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 60% at 50% 100%, color-mix(in srgb, var(--w-teal) 22%, transparent), transparent 70%);
  opacity: 0; animation: wGlow 2.4s ease-out 0.2s forwards; }

/* ---------------------------------------------------------------- logo intro */
.intro { position: relative; z-index: 1; display: grid; justify-items: center; gap: 14px; text-align: center; }
.intro-mark { position: relative; width: min(78vw, 460px); aspect-ratio: 978 / 222; }
.intro-wordmark { position: absolute; inset: 0; width: 100%; height: 100%;
  clip-path: inset(0 100% 0 0); animation: wReveal 0.85s cubic-bezier(.7,0,.2,1) 0.95s forwards; }
/* a light sweep across the wordmark once it is in */
.intro-mark::after { content: ""; position: absolute; inset: -10% -5%; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  background-size: 250% 100%; background-position: 120% 0; mix-blend-mode: soft-light;
  animation: wShine 1.1s ease-in-out 1.9s forwards; }

/* The check badge rolls in, settles exactly on the wordmark's own check (same grid, size and colours), ticks,
   and stays there while the wordmark wipes in underneath; then it fades out with nothing moving, so the
   hand-over is seamless. Transforms are in the SVG's own units around the circle's centre. */
.intro-badge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.intro-badge .badge { transform-box: view-box; transform-origin: 653px 142px; opacity: 0;
  animation: wBadgeIn 0.75s cubic-bezier(.2,.85,.25,1.08) 0.1s forwards, wBadgeOut 0.3s linear 1.65s forwards; }
.intro-badge .speed rect { fill: var(--w-green); transform-box: fill-box; transform-origin: right center;
  transform: scaleX(0); animation: wSpeed 0.85s ease-out forwards; }
.intro-badge .speed rect:nth-child(1) { animation-delay: 0.22s; }
.intro-badge .speed rect:nth-child(2) { animation-delay: 0.15s; }
.intro-badge .speed rect:nth-child(3) { animation-delay: 0.29s; }
.intro-badge .tick { stroke-dasharray: 98; stroke-dashoffset: 98; animation: wTick 0.42s ease-out 0.62s forwards; }

.intro-tagline { margin: 0; font-weight: 600; font-size: clamp(0.72rem, 2.4vw, 0.95rem); color: #c9d6e2;
  letter-spacing: 1.4em; padding-left: 1.4em; opacity: 0; animation: wTagline 0.9s ease-out 1.6s forwards; }
.intro-firm { margin: 4px 0 0; color: #a2b4c6; font-size: 0.98rem; opacity: 0; animation: wFade 0.6s ease-out 2s forwards; }
.intro-firm strong { color: #fff; }
.intro-firm img { display: block; max-height: 44px; max-width: 220px; margin: 10px auto 0; object-fit: contain; }

/* ---------------------------------------------------------------- the three doors */
.doors { position: relative; z-index: 1; width: 100%; display: grid; gap: 18px; justify-items: center; }
.doors-title { margin: 0; font-size: clamp(1.15rem, 3.4vw, 1.5rem); font-weight: 650; color: #fff; text-align: center;
  opacity: 0; animation: wRise 0.6s ease-out 2.15s forwards; }
.door-grid { width: 100%; display: grid; gap: 14px; justify-content: center; grid-template-columns: repeat(auto-fit, minmax(260px, 380px)); }
.door { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; padding: 20px;
  border-radius: 18px; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.11); box-shadow: 0 10px 30px -18px rgba(0,0,0,.7);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  opacity: 0; animation: wRise 0.6s ease-out forwards; }
.door:nth-child(1) { animation-delay: 2.3s; }
.door:nth-child(2) { animation-delay: 2.42s; }
.door[hidden] { display: none; }
.door:hover, .door:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--w-teal) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--w-teal) 16%, transparent), rgba(255,255,255,.03)); }
.door:focus-visible { outline: 3px solid var(--w-teal); outline-offset: 3px; }
.door-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--w-green), var(--w-teal)); box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--w-teal) 70%, transparent); }
.door-icon svg { width: 26px; height: 26px; fill: none; stroke: #04253a; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.door-text { display: grid; gap: 4px; }
.door-text strong { font-size: 1.08rem; color: #fff; }
.door-text span { color: #a9bccd; font-size: 0.92rem; line-height: 1.45; }
.door-go { font-size: 1.25rem; color: var(--w-teal); transition: transform .18s ease; align-self: center; }
.door:hover .door-go { transform: translateX(4px); }

.welcome-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: #8ea3b8; margin: 6px 0 0;
  opacity: 0; animation: wFade 0.6s ease-out 2.7s forwards; }
.welcome-foot a { color: #c9d6e2; }
.foot-links { display: inline-flex; gap: 10px; white-space: nowrap; }
.welcome-foot .staff-link { color: #8ea3b8; text-decoration-color: rgba(142,163,184,.45); }

.intro-skip { position: fixed; right: 16px; bottom: 16px; z-index: 2; background: rgba(255,255,255,.08); color: #c9d6e2;
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 6px 14px; cursor: pointer;
  animation: wFadeOut 0.3s ease 2.6s forwards; }

/* Skipped, already seen this visit, or the person prefers less motion: show the finished screen at once. */
.welcome-page.no-intro *, .welcome-page.no-intro *::after, .welcome-page.no-intro { animation: none !important; }
.welcome-page.no-intro .intro-wordmark { clip-path: none; }
.welcome-page.no-intro .intro-badge, .welcome-page.no-intro .intro-skip { display: none; }
.welcome-page.no-intro :is(.welcome-glow, .intro-tagline, .intro-firm, .doors-title, .door, .welcome-foot) { opacity: 1; }
.welcome-page.no-intro .intro-tagline { letter-spacing: .42em; padding-left: .42em; }
@media (prefers-reduced-motion: reduce) {
  .welcome-page *, .welcome-page *::after { animation: none !important; transition: none !important; }
  .intro-wordmark { clip-path: none; }
  .intro-badge, .intro-skip { display: none; }
  :is(.welcome-glow, .intro-tagline, .intro-firm, .doors-title, .door, .welcome-foot) { opacity: 1; }
  .intro-tagline { letter-spacing: .42em; padding-left: .42em; }
}

@keyframes wGlow { to { opacity: 1; } }
@keyframes wBadgeIn { 0% { opacity: 0; transform: translateX(-450px) scale(1.3); } 45% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes wBadgeOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: none; } }
@keyframes wSpeed { 0% { transform: scaleX(0); opacity: 1; } 55% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(0.35); opacity: 0; } }
@keyframes wTick { to { stroke-dashoffset: 0; } }
@keyframes wReveal { to { clip-path: inset(0 0 0 0); } }
@keyframes wShine { 0% { opacity: 0; background-position: 120% 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; background-position: -20% 0; } }  /* ends fully gone: no haze left on the logo */
@keyframes wTagline { from { opacity: 0; letter-spacing: 1.4em; padding-left: 1.4em; } to { opacity: 1; letter-spacing: .42em; padding-left: .42em; } }
@keyframes wFade { to { opacity: 1; } }
@keyframes wFadeOut { to { opacity: 0; visibility: hidden; } }
@keyframes wRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .welcome { justify-content: flex-start; padding-top: 48px; }
  .door { padding: 16px; }
  .door-go { display: none; }
  .door { grid-template-columns: auto 1fr; }
}
