/* The legal pages wear the homepage's header and footer: the same wordmark, links and button in
   the same place (index.html's header, v2.css .nav and .btn, hero-b.css's phone rules) and the
   same one-line footer (page.css .foot). Their own class names keep styles.css's .nav and
   .footer rules off this chrome, and nothing here reaches the legal text between the two.
   Loaded after styles.css. */
:root {
  --chrome-c1: #FDFAF2;          /* the homepage's cream field, top */
  --chrome-c2: #FAEEDA;          /* desti tan: the field's bottom, and the legal pages' ground */
  --chrome-mid: color-mix(in srgb, #FDFAF2 78%, #FAEEDA);  /* where the header meets the title band */
  --chrome-ink: #1A1A2E;
  --chrome-olive: #6B8A2A;       /* the download button's locked fill */
  --chrome-olive-press: #567122;
  --chrome-sub: #5A6275;
  --chrome-rule: rgba(26, 26, 46, .14);
  --chrome-text: "Outfit", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chrome-gutter: clamp(20px, 4.2vw, 64px);
  --chrome-ease: cubic-bezier(.2, .8, .2, 1);
}

/* The header is 84px and stays pinned, so a heading the table of contents jumps to lands below
   it with some air (styles.css's 84px was sized for the old 72px header). */
html { scroll-padding-top: 100px; }

/* ---------- the header: on the homepage's grid, pinned, and opaque once the page moves ---------- */
.chrome-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
  padding: 0 max(var(--chrome-gutter), calc((100% - 1240px) / 2));
  letter-spacing: normal;
  -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;  /* the homepage's text rendering, not styles.css's */
  background: linear-gradient(180deg, var(--chrome-c1), var(--chrome-mid));
  /* 1px of top padding matches the bottom border (which carries the pinned rule), so the items sit
     where the homepage's do; a border there would draw in High Contrast */
  padding-top: 1px; border-bottom: 1px solid transparent;
  transition: border-color .3s var(--chrome-ease);
}
/* the page's own script adds is-stuck once it scrolls; prose then passes under a solid band */
.chrome-nav.is-stuck { background: var(--chrome-c1); border-bottom-color: var(--chrome-rule); }
.chrome-nav__mark img { height: 30px; width: auto; }
.chrome-nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.chrome-nav__links a:not(.chrome-btn) { font: 500 1.0625rem/1 var(--chrome-text); text-decoration: none; color: var(--chrome-ink); padding: 12px 0; }

/* the olive button, at the homepage's small size (v2.css .btn and .btn--sm) */
.chrome-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  background: var(--chrome-olive); color: var(--chrome-c2);
  font: 700 1.1875rem/1.1 var(--chrome-text); text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--chrome-ease), transform 160ms var(--chrome-ease);
}
@media (hover: hover) { .chrome-btn:hover { background: var(--chrome-olive-press); } }
.chrome-btn:active { transform: scale(.98); }

/* A phone keeps the wordmark and the button: the homepage hides its whole nav there because its
   hero button and dock carry the download, and a legal page has neither. */
@media (max-width: 760px) {
  .chrome-nav { height: 64px; }
  .chrome-nav__mark img { height: 24px; }
  .chrome-nav__links a:not(.chrome-btn) { display: none; }
}

/* ---------- the title band: the rest of the homepage's cream field, then the page's tan ---------- */
.legal-hero { background: linear-gradient(180deg, var(--chrome-mid), var(--chrome-c2)); }

/* ---------- the footer: the homepage's one line (page.css .foot), without the demo's photo credit ---------- */
.chrome-foot { padding: 30px 0 40px; border-top: 1px solid var(--chrome-rule); letter-spacing: normal; -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
.chrome-foot__wrap {
  width: min(1240px, 100% - 2 * var(--chrome-gutter)); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px;
}
.chrome-foot nav { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.chrome-foot nav a { padding: 8px 0; color: var(--chrome-ink); text-decoration: none; font: 500 1rem/1 var(--chrome-text); }
.chrome-foot nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.chrome-foot p { margin: 0; font: 400 .9375rem/1.4 var(--chrome-text); color: var(--chrome-sub); }

/* High Contrast drops the gradients and the fills; the button and the pinned header keep an edge. */
@media (forced-colors: active) {
  .chrome-btn { border: 1px solid CanvasText; }
  .chrome-nav { border-bottom-color: Canvas; }  /* no rule until the page moves, as on screen */
  .chrome-nav.is-stuck { border-bottom-color: CanvasText; }
}

/* Paper gets the legal text only (styles.css's print rule names the old .nav and .footer). */
@media print { .chrome-nav, .chrome-foot { display: none !important; } }

/* styles.css opts these pages in to cross-page transitions; the homepage does not, so a move to it
   aborted the transition with a page error. Off here, which also ends the cross-fade between two
   legal pages (styles.css's wordmark transition name has no element to carry any more). */
@view-transition { navigation: none; }
