/*PHZ full stack static site: shared styles for the front page and the
  protected-area pages.

  The background art lives in the shared file store:
    /phz-wallpaper.png              desktop (3840x2160, 16:9)
    /phz-background-mobile_720.png  mobile (350x719, 9:16 portrait)
  Every background rule has a solid navy fallback color that matches the
  art, so the pages render correctly in dev where the store images are
  not on disk.

  WCAG 2.1 AA readability (1.4.3 contrast):
    - the 45% black scrim over the art keeps white text at 5.2:1 or
      better even over the brightest orange pixels of the logo;
    - the solid #0b1622 sections keep white text at about 18:1;
    - the TLP:CLEAR badge uses white on #006400, about 7.4:1.*/

:root {
  --background: #0b1622;
  --text: #ffffff;
  --border: rgba(255, 255, 255, 0.2);
  --tlp-clear: #006400;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--background);
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  line-height: 1.6;
}

/*Hero: the wallpaper art carries the PHZ wordmark. The ::after scrim
  keeps everything readable over the art (see WCAG note above).*/
.hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  background-color: var(--background);
  background-image: url("/phz-wallpaper.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
}

@media (max-width: 767px) {
  .hero {
    background-image: url("/phz-background-mobile_720.png");
  }
}

/*TLP classification badge, fixed to the top-right corner of the viewport
  so it stays visible while scrolling. On mobile it shrinks and respects
  the device safe area (notch, browser chrome).*/
.tlp-badge {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background-color: var(--tlp-clear);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.tlp-badge .tlp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text);
}

@media (max-width: 767px) {
  .tlp-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
}

/*Content sits on the solid navy that extends the wallpaper art.*/
main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 1.25rem + 2.5vw, 2.75rem);
  line-height: 1.2;
}

h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/*File store directories: one column on mobile, two from 640px up.*/
.directory-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .directory-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.directory-list a {
  display: block;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.directory-list a:hover,
.directory-list a:focus {
  text-decoration: underline;
}

.directory-list a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

footer {
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  text-align: center;
}

footer a {
  color: var(--text);
}
