/* Views: the router's other pages (#roi-calculator, #open-source, #vektor-slice, #privacy, #fulfillment). Each
   shows alone under the notch with the footer below it. The head's view gate marks the asked-for view before
   first paint; js/router.js keeps it and the hidden attributes in step. The policies are long-form text at
   reading width; Open Source is a card per project, and Vektor Slice is that project's page (vektor-slice.css). */
html[data-active-view]:not([data-active-view="home"]) #home { display: none; }
html[data-active-view="roi-calculator"] #roi-calculator-view,
html[data-active-view="open-source"] #open-source-view,
html[data-active-view="vektor-slice"] #vektor-slice-view,
html[data-active-view="privacy"] #privacy-view,
html[data-active-view="fulfillment"] #fulfillment-view { display: block; }

/* The view transition (js/router.js, owner 07.11: "1 Fade"): the browser pictures the page before and after a
   change of view; the old picture fades away lifting a little, then the new one rises into place, the site's
   own fade-up, on the white page. The notch is pictured apart and holds still on top. The two pictures cover
   each other plainly, never blended. */
.nav { view-transition-name: site-nav; }
::view-transition-group(site-nav), ::view-transition-new(site-nav) { animation: none; }
::view-transition-old(site-nav) { display: none; }
::view-transition { background: var(--bg); }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
html.is-switching::view-transition-old(root) { animation: vt-fade-out 240ms cubic-bezier(0.4, 0, 1, 1) both; }
html.is-switching::view-transition-new(root) { animation: vt-fade-in 680ms var(--ease-out) 160ms both; }
@keyframes vt-fade-out { to { opacity: 0; transform: translateY(-16px); } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(32px); } }

/* the nav link of the view on screen reads black, as on the old site (a project's page counts as Open Source) */
html[data-active-view="open-source"] .nav a[href="#open-source"],
html[data-active-view="vektor-slice"] .nav a[href="#open-source"],
html[data-active-view="roi-calculator"] .nav a[href="#roi-calculator"] { color: var(--fg); }

/* an anchored section lands just under the pinned notch, whether the router or the browser scrolls to it */
#home > section[id] { scroll-margin-top: 64px; }

/* room for the pinned notch above the first section of a view */
.view-top { padding-top: calc(clamp(80px, 10vw, 128px) + 64px); }

/* policies */
.policy-wrap { max-width: calc(760px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.policy-wrap h1 {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: var(--t-headline);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--fg);
}
.policy-date { margin-top: 16px; font-size: var(--t-label); color: var(--fg-soft); }
.policy-lead { margin-top: 40px; font-size: 20px; line-height: 1.6; color: var(--fg); text-wrap: pretty; }
.policy-block { margin-top: 48px; }
.policy-block h2 { font-family: var(--f-head); font-weight: 500; font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; color: var(--fg); }
.policy-block p { margin-top: 14px; line-height: 1.7; color: var(--fg-soft); }
.policy-wrap a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color var(--hover) ease, text-decoration-color var(--hover) ease; }
.policy-wrap a:hover { color: var(--accent-words); text-decoration-color: currentColor; }

@media (max-width: 640px) {
  .policy-lead { font-size: var(--t-lead); }
  .policy-block h2 { font-size: 22px; }
}
