/* SVR Management LLC
   Approved palette: warm ivory, charcoal, antique gold.
   Approved type: Cinzel Semibold (headings), Georgia (text). */

:root {
  --ivory: #f7f3e9;
  --charcoal: #2a2926;
  --gold: #a8894e;
  --gold-rule: #cbb78e;
  --serif: Georgia, "Times New Roman", Times, serif;
  --display: "Cinzel", Georgia, serif;
  --site-max: 1254px;
  --sheet-max: 900px;
  --gutter: 24px;
  --nav-h: 64px;
  --artwork-gap: 14px;
  --artwork-clearance: 48px;
  --bracket-offset: 10px;
  --bracket-arm: 36px;
  --bracket-weight: 2px;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Always reserve room for the scrollbar, so pages short enough to fit the
   screen (like Request Consideration) line up with the longer ones and the
   menu and frame do not jump sideways when switching pages. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 400;
  padding: 8px 16px;
  background: var(--charcoal);
  color: var(--ivory);
  font-size: 16px;
}
.skip-link:focus { top: 8px; color: var(--ivory); }

.container {
  width: 100%;
  max-width: calc(var(--site-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Navigation (discreet) ---------- */

.site-header { background: var(--ivory); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-h);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 6px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-burger,
.nav-panel-header,
.nav-backdrop { display: none; }

/* ---------- Page 1: eagle artwork ---------- */

/* The eagle is the whole of page 1, so it scales to fit the screen in both
   directions and never asks for a vertical scroll. Its own proportions are
   kept (1254 x 940): whichever runs out first, width or height, sets the size.
   It sits at the top of the screen with --artwork-gap of clear space above it
   and at least as much left below. That gap is the 14px the bordered sheet on
   pages 2 to 4 uses, so the artwork starts level with where their frame does. */

body[data-page="home"] #main {
  padding-top: var(--artwork-gap);
  padding-bottom: var(--artwork-gap);
}

/* Three caps, smallest wins: the column width, the artwork's own full size,
   and the height left on screen converted to a width through its 1254 x 940
   proportions. Capping the width (not the image's height) is what keeps the
   proportions exact, whichever cap applies. --artwork-clearance is held back
   because the height the browser reports can exceed what is really visible:
   a 17" Windows laptop in Chrome lost about 40px, the height of a taskbar. */
.artwork {
  width: min(100%, var(--site-max), calc((100vh - var(--nav-h) - var(--artwork-gap) * 2 - var(--artwork-clearance)) * 1254 / 940));
  width: min(100%, var(--site-max), calc((100svh - var(--nav-h) - var(--artwork-gap) * 2 - var(--artwork-clearance)) * 1254 / 940));
  margin: 0 auto;
}
.artwork img { width: 100%; height: auto; }

/* ---------- Pages 2 to 4: bordered sheet ---------- */

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: var(--sheet-max);
  min-height: calc(100vh - var(--nav-h) - 62px);
  min-height: calc(100svh - var(--nav-h) - 62px);
  margin: 14px auto 48px;
  padding: 72px 64px 40px;
  border: 2px solid var(--gold);
}

@supports (mask-size: 1px) or (-webkit-mask-size: 1px) {
  /* Gold corner brackets: one outset frame, masked down to its four corners.
     --bracket-offset is how far it sits outside the sheet border, --bracket-arm
     the length of each arm. Both must stay smaller than --gutter so the brackets
     never reach the viewport edge. */
  .sheet::before {
    content: "";
    position: absolute;
    inset: calc(var(--bracket-offset) * -1);
    border: var(--bracket-weight) solid var(--gold);
    pointer-events: none;
    -webkit-mask:
      linear-gradient(#000 0 0) top left,
      linear-gradient(#000 0 0) top right,
      linear-gradient(#000 0 0) bottom left,
      linear-gradient(#000 0 0) bottom right;
    -webkit-mask-size: var(--bracket-arm) var(--bracket-arm);
    -webkit-mask-repeat: no-repeat;
    mask:
      linear-gradient(#000 0 0) top left,
      linear-gradient(#000 0 0) top right,
      linear-gradient(#000 0 0) bottom left,
      linear-gradient(#000 0 0) bottom right;
    mask-size: var(--bracket-arm) var(--bracket-arm);
    mask-repeat: no-repeat;
  }
}

.sheet-column {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.page-head { text-align: center; }

.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 35px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.page-subtitle {
  margin: 12px 0 0;
  font-size: 22px;
  color: var(--gold);
}

.page-rule {
  width: 88%;
  height: 0;
  margin: 28px auto 0;
  border: 0;
  border-top: 1px solid var(--gold-rule);
}

/* Page 2 introduction: taglines and the Chapter 489 statement above the gold rule */
.page-tagline {
  margin: 20px 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-wrap: balance;
}
.page-credentials { margin-top: 12px; color: var(--gold); }

.page-statute {
  max-width: 640px;
  margin: 32px auto 0;
  font-size: 16px;
  text-wrap: balance;
}

/* Generous, balanced air around the divider on page 2 */
body[data-page="overview"] .page-rule { margin-top: 40px; }

/* Equal gap from the gold rule to the first line of content on every page */
.page-body { margin-top: 48px; }

.block + .block { margin-top: 36px; }

.block h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20.5px;
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.step-num { margin-right: 0.6em; }

.block p { margin: 0; }
.block p + p { margin-top: 12px; }

.nowrap { white-space: nowrap; }

/* Pages 2 and 3 footer */
.sheet-footer {
  margin-top: auto;
  padding-top: 64px;
  text-align: center;
  font-size: 16px;
}
.sheet-footer hr {
  width: 74%;
  height: 0;
  margin: 0 auto 16px;
  border: 0;
  border-top: 1px solid var(--gold-rule);
}
.sheet-footer p { margin: 0; letter-spacing: 0.02em; }
.sheet-footer .sep { margin: 0 0.5em; }

/* Page 4 */
.invite { text-align: center; }
.invite p {
  max-width: 700px;
  margin: 0 auto;
  text-wrap: balance;
}
.invite p + p { margin-top: 24px; }

.contact {
  font-style: normal;
  margin-top: 48px;
  text-align: center;
  font-size: 21px;
  line-height: 1.2;
}
.contact-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
.contact p { margin: 0; }

.disclosure {
  max-width: 520px;
  margin: 40px auto 0;
  text-align: center;
  font-size: 16px;
  text-wrap: balance;
}

.copyright p { margin: 0; }
.copyright p + p { margin-top: 4px; }
.copyright {
  margin: auto 0 0;
  padding-top: 64px;
  text-align: center;
  font-size: 16px;
}

/* Home: the copyright line sits just under the eagle artwork */
body[data-page="home"] .copyright {
  padding-top: 16px;
  font-size: 13px;
  color: #6b6b6b;
}

/* ---------- Tablet and mobile ---------- */

@media (max-width: 1024px) {
  :root { --nav-h: 56px; }

  .nav-inner { justify-content: flex-end; }

  .nav-burger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: var(--nav-h);
    padding: 0;
    background: none;
    border: 0;
    color: var(--charcoal);
    font-family: var(--display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
  }
  /* Whole-pixel bars so all three render at the same thickness on every screen */
  .nav-burger-icon { display: flex; flex-direction: column; justify-content: space-between; width: 22px; height: 13px; margin-top: 1px; }
  .nav-burger-icon span { display: block; height: 1px; background: currentColor; }

  .nav-panel {
    position: fixed;
    top: 0; right: 0;
    z-index: 250;
    display: flex;
    flex-direction: column;
    width: min(86vw, 340px);
    height: 100vh;
    height: 100dvh;
    background: var(--ivory);
    border-left: 1.5px solid var(--gold);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 240ms ease, visibility 0s linear 240ms;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.nav-open .nav-panel {
    transform: translateX(0);
    visibility: visible;
    transition: transform 240ms ease;
  }

  /* Dragging the window across 1024px swaps the panel from inline links to a
     hidden slide-out. Without this the browser would animate that swap and the
     panel would flick open and shut on its own. main.js adds .nav-resizing
     while the width is moving; it must stay after the two rules above. */
  body.nav-resizing .nav-panel { transition: none; }

  .nav-panel-header {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
  }
  .nav-panel-close {
    width: 40px; height: 40px;
    padding: 8px;
    background: none;
    border: 0;
    color: var(--charcoal);
    cursor: pointer;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 24px;
  }
  .nav-links li { border-bottom: 1px solid var(--gold-rule); }
  .nav-links li:first-child { border-top: 1px solid var(--gold-rule); }
  .nav-links a {
    display: block;
    padding: 18px 0;
    font-size: 15px;
    border-bottom: 0;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 240;
    background: rgba(42, 41, 38, 0.45);
  }
  body.nav-open .nav-backdrop { display: block; }
  body.nav-open { overflow: hidden; }

  .sheet { padding: 56px 40px 32px; }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --bracket-offset: 7px;
    --bracket-arm: 24px;
    --bracket-weight: 1.5px;
  }

  body { font-size: 18px; }

  .sheet {
    margin-bottom: 32px;
    padding: 40px 20px 24px;
    border-width: 1.5px;
  }

  .page-head h1 { font-size: 25px; }
  .page-subtitle { font-size: 19px; margin-top: 8px; }
  .page-tagline { font-size: 13px; margin-top: 16px; }
  .page-credentials { margin-top: 8px; }
  .page-statute { margin-top: 24px; }
  .page-rule { width: 100%; margin-top: 20px; }
  body[data-page="overview"] .page-rule { margin-top: 28px; }
  .page-body { margin-top: 32px; }

  .block + .block { margin-top: 28px; }
  .block h2 { font-size: 18px; }

  .invite p + p { margin-top: 20px; }
  .contact { margin-top: 36px; font-size: 19px; }
  .contact-name { font-size: 21px; }
  .disclosure { margin-top: 32px; }

  .sheet-footer { padding-top: 48px; }
  .sheet-footer hr { width: 100%; }
  .sheet-footer .sep { display: none; }
  .sheet-footer .footer-item { display: block; }
  .copyright { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-panel,
  body.nav-open .nav-panel { transition: none; }
}
