/* The site header, the same one every page of the merged site wears (copied from the merged site's site.css,
   menus-2026-11-03/site-2026-11-05). Its tokens live on the header itself, so nothing else on the homepage moves. */
.top, .drawer {
  --gut: 48px; --logo: "Space Grotesk", sans-serif; --ease: cubic-bezier(.2,.7,.2,1);
  font-family: "Noto Sans Thai", "Inter", sans-serif; font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
[data-theme="light"] .top { --sky: #231F20; }
[data-theme="dark"] .top { --sky: #FFFFFF; }
/* The homepage sky is blue in both modes, so the words on it stay white until the bar turns solid. */
.home .top { --sky: #FFFFFF; }
.top a, .drawer a { color: inherit; text-decoration: none; }
.top :focus-visible, .drawer :focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 0; }
.drawer :focus-visible { outline-color: #FF6A60; }

.top{position:fixed;inset:0 0 auto 0;z-index:50;height:88px;padding:0 var(--gut);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px;color:var(--sky);pointer-events:none}
.top>*{pointer-events:auto;transition:transform .35s var(--ease)}
.top::before{content:"";position:absolute;left:0;right:0;top:0;height:64px;z-index:-1;background:var(--bg);box-shadow:0 1px 0 var(--line);opacity:0;pointer-events:none;transition:opacity .3s}
html[data-scrolled] .top::before{opacity:.96}
html[data-scrolled] .top>*{transform:translateY(-12px)}
html[data-scrolled] .top{color:var(--ink)}
html[data-scrolled][data-over] .top{color:#fff}
html[data-scrolled][data-over] .top::before{background:#1A1A2E;box-shadow:0 1px 0 rgba(255,255,255,.14)}
.top .brand,.drawer .brand{display:inline-flex;align-items:center;gap:13px;justify-self:start;min-height:44px}
.top .seal,.drawer .seal{flex:none;width:48px;height:48px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px rgba(35,31,32,.14);display:flex;align-items:center;justify-content:center;overflow:hidden;transition:transform .35s var(--ease)}
.top .seal svg,.drawer .seal svg{width:96%;height:96%}
html[data-scrolled] .top .seal{transform:scale(.84)}
.top .bw,.drawer .bw{display:block;font:700 15px/1.05 var(--logo);letter-spacing:.16em;white-space:nowrap}
.top .bs{display:block;font:500 12.5px/1.2 "Inter",sans-serif;margin-top:4px;white-space:nowrap}
.top .bs span{display:inline-block}
.mainnav ul{display:flex;gap:30px;font-size:16px;font-weight:500}
.mainnav a{display:block;padding:8px 0;white-space:nowrap;position:relative}
.mainnav a::after{content:"";position:absolute;left:0;right:0;bottom:2px;height:2px;background:var(--red);transform:scaleX(0);transform-origin:0 50%;transition:transform .35s var(--ease)}
.mainnav a:hover::after,.mainnav a[aria-current]::after{transform:scaleX(1)}
.mainnav a[aria-current]{font-weight:600}
.tools{justify-self:end;display:flex;align-items:center;gap:6px;font:600 13.5px "Inter",sans-serif}
.top .tool,.drawer .tool{min-width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center}
.top .tool svg,.drawer .tool svg{width:20px;height:20px;display:block}
.top .lang{display:inline-flex;align-items:center;margin:0 4px}
.top .lang span,.top .lang button,.top .lang a{min-width:40px;height:30px;display:inline-flex;align-items:center;justify-content:center;font:inherit}
.top .lang span{box-shadow:0 0 0 1.5px var(--red);border-radius:999px}
.top .burger{display:none}
.top .tool svg.theme-ic{display:none}
html[data-mode=system] .top .tool svg.ic-system,html[data-mode=light] .top .tool svg.ic-light,html[data-mode=dark] .top .tool svg.ic-dark{display:block}
.drawer{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;padding:20px var(--gut) 32px;background:#1A1A2E;color:#fff}
.drawer::backdrop{background:#1A1A2E}
.drawer-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}
.drawer li a{display:block;padding:16px 0;font-size:26px;font-weight:600;border-top:1px solid rgba(255,255,255,.18)}
.drawer li a[aria-current]{box-shadow:inset 3px 0 0 var(--red);padding-left:14px}

/* the emblem finds north, then rests */
@keyframes seek{0%{transform:rotate(-62deg)}55%{transform:rotate(14deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0)}}
.e-ring{transform-box:view-box;transform-origin:124px 118px}
.ready .top .e-ring{animation:seek 1.7s var(--ease) both}

@media (max-width:1240px){
  .top,.drawer{--gut:32px}
  .top{grid-template-columns:1fr auto}
  .mainnav{display:none}
  .top .burger{display:inline-flex}
}
@media (max-width:768px){
  .top,.drawer{--gut:16px}
  .top{height:64px}
  html[data-scrolled] .top>*{transform:none}
  html[data-scrolled] .top .seal{transform:none}
  .top .seal,.drawer .seal{width:40px;height:40px}
  .top .bw,.drawer .bw{font-size:13.5px;letter-spacing:.12em}
  .top .bs{font-size:12px}
  .tools .tool-search,.top .lang{display:none}
}
@media (max-width:374px){
  .top .bs{display:none}
}
@media (prefers-reduced-motion:reduce){
  .ready .top .e-ring{animation:none}
}
/* Day and night (owner, 17 Nov 2026): the button fades the whole page over 1.5 s through a short dusk, like the time of day
   changing (proto.js adds html.vt-theme). The old page stays whole and warms toward dusk while the new one fades in over it. */
@keyframes omf-dusk-out{from{filter:none}to{filter:sepia(.3) saturate(1.15) brightness(.88)}}
@keyframes omf-dusk-in{from{opacity:0;filter:sepia(.3) saturate(1.15) brightness(.88)}to{opacity:1;filter:none}}
html.vt-theme::view-transition-group(*){animation-duration:1.5s;animation-timing-function:cubic-bezier(.45,0,.55,1)}
html.vt-theme::view-transition-old(root){animation:omf-dusk-out 1.5s cubic-bezier(.45,0,.55,1) both;mix-blend-mode:normal}
html.vt-theme::view-transition-new(root){animation:omf-dusk-in 1.5s cubic-bezier(.45,0,.55,1) both;mix-blend-mode:normal}
html.theme-fade,html.theme-fade *,html.theme-fade *::before,html.theme-fade *::after{transition:background-color 1.5s cubic-bezier(.45,0,.55,1),color 1.5s cubic-bezier(.45,0,.55,1),border-color 1.5s cubic-bezier(.45,0,.55,1),fill 1.5s cubic-bezier(.45,0,.55,1),stroke 1.5s cubic-bezier(.45,0,.55,1)!important}
@media (prefers-reduced-motion:reduce){html.vt-theme::view-transition-old(root),html.vt-theme::view-transition-new(root){animation:none!important}}
