/* pages.css: page-level styles, in the `pages` cascade layer (the layer order is declared in tokens.css).
   For now it holds only what belongs to the shell: the boot splash, and the not-found / load-error page.

   ADDING A SCREEN: put its styles in a partial and import it HERE, above everything else, for example

     @import url('/css/pages/auth.css') layer(pages);
     @import url('/css/pages/claim-editor.css') layer(pages);

   @import rules must come before every other rule in this file (only comments may precede them), and
   `layer(pages)` places the partial in the right layer, so the partial itself needs no @layer wrapper.
   Partials follow the same rules as every other stylesheet: tokens only, no raw values, and no transition
   or animation (motion lives in motion.css). */

@import url('/css/pages/auth-admin.css') layer(pages);
@import url('/css/pages/claims.css') layer(pages);
@import url('/css/pages/review.css') layer(pages);

@layer pages {
  /* Boot splash: the markup is in index.html, so it shows before any JavaScript runs (README §12.8). */
  .boot {
    display: grid;
    place-content: center;
    gap: var(--spacing-3);
    justify-items: center;
    min-height: var(--viewport-height);
    padding: var(--spacing-6);
    background: var(--color-bg);
    text-align: center;
  }
  .boot__name {
    color: var(--color-text-muted);
    font-weight: var(--weight-medium);
  }
  .boot__bar {
    position: relative;
    width: var(--boot-bar-width);
    height: var(--timer-height);
    overflow: hidden;
    background: var(--color-border);
  }
  .boot__bar::after {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 40%;
    background: var(--color-accent);
  }
  /* Reduced motion: the line stands still, so it is the whole line (README §12.8: "static when reduced motion is
     on"); a still 40 % segment would read as a progress bar stuck at 40 %. (motion.css stops its movement; the
     width is set here, in the layer that sets the moving segment's width.) */
  @media (prefers-reduced-motion: reduce) {
    .boot__bar::after {
      width: 100%;
    }
  }
  [data-motion='reduced'] .boot__bar::after {
    width: 100%;
  }

  /* Whole-page states: 404, a view that failed to load, the app failing to start.
     Logo mark (32 px, linking to /), a title, one sentence, one or two actions. */
  .state-page {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
    width: 100%;
    padding: var(--spacing-12) var(--spacing-4);
    text-align: center;
  }
  .state-page--full {
    min-height: var(--viewport-height);
  }
  .state-page__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--control-height);
    min-height: var(--control-height);
    margin-block-end: var(--spacing-2);
  }
  .state-page__title {
    font-size: var(--text-xl);
    line-height: var(--leading-xl);
    font-weight: var(--weight-semibold);
  }
  .state-page__message {
    max-width: var(--panel-max);
    color: var(--color-text-muted);
  }
  .state-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-3);
    margin-block-start: var(--spacing-3);
  }
  .state-page__meta {
    color: var(--color-text-subtle);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: var(--leading-xs);
  }
  @media (min-width: 768px) {
    .state-page__title {
      font-size: var(--text-2xl);
      line-height: var(--leading-2xl);
    }
  }
}
