/* ============================================================
   Enduro Field Portal — base.css
   Shared tokens + reset + type. Pulls from PORTAL_DESIGN_CONTRACT.md
   (canonical: 01_BRAND_LIBRARY/BRAND_SYSTEM.md). Square corners by default.
   ============================================================ */

:root {
  /* Colour — mirror of BRAND_SYSTEM.md (canonical lives there) */
  --red:        #E43338;
  --red-bright: #EE2737;
  --red-dark:   #C42A2F;
  --yellow:     #E3FF17;   /* accent only — never a primary fill */
  --black:      #101820;
  --navy:       #073544;
  --off-white:  #F4ECE2;
  --sand:       #EBE7E0;
  --white:      #FFFFFF;
  --surface:    #141414;

  /* Text */
  --ink:        #101820;
  --ink-mid:    rgba(16,24,32,0.68);
  --ink-dim:    rgba(16,24,32,0.45);
  --ink-faint:  rgba(16,24,32,0.20);

  /* Layout */
  --max:        1200px;

  /* Easing (from BRAND_SYSTEM.md) */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.55, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0;            /* square is the default — round only on request */
}

html, body {
  font-family: 'Inter', Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headline / display */
.h-display {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }


/* ============================================================
   PAGE-TO-PAGE TRANSITION  (cross-document View Transitions)
   Copied VERBATIM from the website (assets/nav.css lines 14-29) — a quick
   0.2s opacity crossfade on the page body while the TOP NAV is held STATIC
   (no flash) via its view-transition-name. This block lives in BOTH base.css
   (the home launcher) AND portal.css (the forms): cross-document VT needs the
   rule on the page you LEAVE and the page you LAND on, so the destination
   document's CSS owns the ::view-transition pseudo-elements. Gives the same
   quick flash on home↔form, browser back/forward, and (via startViewTransition
   in wizard.js) every in-page wizard step change. Scoped to the Portal.
   ============================================================ */
@view-transition { navigation: auto; }
/* The portal TOP NAV (Enduro logo + "Back to portal") holds STATIC — never
   fades. Its element carries view-transition-name:portal-nav (portal.css §9B);
   this instant-duration guard keeps that group from animating in ANY
   transition (mirrors the website's nav-active-ink instant trick). NOTE: the
   home LAUNCHER has no portal-nav bar (different layout), so on the home↔form
   boundary the form nav simply appears INSTANTLY (no fade = no flash) while the
   body crossfades; the static-nav HOLD applies to form↔form + in-page steps. */
::view-transition-group(portal-nav),
::view-transition-old(portal-nav),
::view-transition-new(portal-nav) { animation-duration: 0s; animation-delay: 0s; }
::view-transition-old(root) { animation: vt-fade-out 0.2s ease both; }
::view-transition-new(root) { animation: vt-fade-in  0.2s ease both; }
@keyframes vt-fade-out { to   { opacity: 0; } }
@keyframes vt-fade-in  { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
