/* A1 Copy Service
   Type: Besley (headings), Libre Franklin (text). Both self-hosted, SIL OFL 1.1.
   Color: the black and tan of the A1 logo, with white used as paper.
   The folded corner and the overlapping pages come straight from the logo mark. */

@font-face {
  font-family: "Besley";
  src: url("/fonts/besley-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/fonts/libre-franklin-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tan: #be9f76;
  --tan-deep: #6e5531;
  --paper: #ffffff;
  --flap: #e4dccf;
  --ink: #000000;
  --text: #1c1c1c;
  --on-ink: #ffffff;
  --on-ink-soft: #ddd5c8;
  --display: "Besley", "Rockwell", "Georgia", serif;
  --body: "Libre Franklin", "Franklin Gothic Medium", "Segoe UI", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: 1.5rem;
  --fold: 3.5rem;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }

/* The page ground is tan so it shows wherever a corner is folded back */
body {
  margin: 0;
  background: var(--tan);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
}

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

h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); line-height: 1.14; }
h2 { font-size: clamp(1.625rem, 1.25rem + 1.5vw, 2.375rem); line-height: 1.18; }
h3 { font-size: 1.3125rem; line-height: 1.3; }

p, ul, ol, dl { margin: 0; }
p { text-wrap: pretty; }
p + p { margin-top: 1em; }
strong { font-weight: 650; color: inherit; }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.band-paper a, .hero-sheet a { text-decoration-color: var(--tan-deep); }
.band-paper a:hover, .hero-sheet a:hover { text-decoration-color: var(--ink); }
.band-ink a, .site-head a, .site-foot a { text-decoration-color: var(--tan); }
.band-ink a:hover, .site-foot a:hover { text-decoration-color: var(--on-ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.band-ink :focus-visible, .site-head :focus-visible, .site-foot :focus-visible { outline-color: var(--tan); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.nb { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 0.75rem; top: -4rem; z-index: 10; background: var(--paper); color: var(--ink); padding: 0.6rem 0.9rem; border-radius: 4px; font-weight: 650; }
.skip:focus { top: 0.75rem; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--body); font-weight: 650; font-size: 1rem; line-height: 1.2;
  padding: 0.9rem 1.4rem; border: 2px solid var(--ink); border-radius: 4px;
  background: var(--ink); color: var(--on-ink); text-decoration: none;
}
.btn:hover { background: var(--tan); color: var(--ink); }
.band-tan .btn:hover, .page-head .btn:hover { background: var(--paper); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover, .band-tan .btn-line:hover { background: var(--ink); color: var(--on-ink); }
.btn-tan { background: var(--tan); border-color: var(--tan); color: var(--ink); }
.btn-tan:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-small { padding: 0.55rem 0.95rem; font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.center .actions { justify-content: center; }

/* Header: black, so the logo sits on its own ground */
.site-head { background: var(--ink); color: var(--on-ink); }
.head-row { display: flex; align-items: center; gap: 0.75rem 2rem; flex-wrap: wrap; padding-block: 0.85rem; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; margin-right: auto; }
.brand img { width: 2.75rem; height: auto; }
.brand-name { display: block; font-family: var(--display); font-weight: 600; font-size: 1.3125rem; line-height: 1.15; color: var(--on-ink); }
.brand-tag { display: block; font-size: 0.875rem; line-height: 1.3; color: var(--tan); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; padding: 0; }
.site-nav a { display: inline-block; padding-block: 0.5rem; font-weight: 550; text-decoration-color: transparent; }
.site-nav a:hover { text-decoration-color: var(--on-ink); }
.site-nav a[aria-current="page"] { text-decoration-color: var(--tan); text-decoration-thickness: 3px; }
.head-actions { display: flex; align-items: center; gap: 1.1rem; }
.site-head .head-phone { font-weight: 650; white-space: nowrap; text-decoration-color: transparent; padding-block: 0.5rem; }
.site-head .head-phone:hover { text-decoration-color: var(--on-ink); }

/* Bands */
.band { padding-block: clamp(3.5rem, 7vw, 5.75rem); }
.band-paper { background: var(--paper); }
.band-ink { background: var(--ink); color: var(--on-ink-soft); }
.band-ink h2, .band-ink h3, .band-ink strong { color: var(--on-ink); }

/* A folded top-left corner, as on the pages in the logo */
.folded { position: relative; clip-path: polygon(var(--fold) 0, 100% 0, 100% 100%, 0 100%, 0 var(--fold)); }
.folded::before {
  content: ""; position: absolute; left: 0; top: 0; width: var(--fold); height: var(--fold);
  background: var(--flap); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.band.folded { --fold: clamp(3rem, 7vw, 5.5rem); }

.head { text-align: center; max-width: 44rem; margin-inline: auto; margin-bottom: clamp(2rem, 4vw, 3rem); }
.head p { margin-top: 0.9rem; }
.center { text-align: center; }
.center > p { max-width: 42rem; margin-inline: auto; }
.center > h2 + p { margin-top: 1rem; }
.center > .actions { margin-top: 1.75rem; }
.center > .actions + p { margin-top: 1.75rem; }

/* Hero: two overlapping pages, the photo behind and the words in front */
.hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 4.5rem); }
.hero-stack { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.hero-photo { grid-column: 1 / span 6; grid-row: 1; margin: 0; }
.hero-photo img { width: 100%; }
.hero-sheet {
  grid-column: 6 / -1; grid-row: 1; z-index: 1;
  margin-top: clamp(3rem, 9vw, 7.5rem);
  background: var(--paper);
  padding: clamp(1.75rem, 4vw, 3.25rem);
  padding-top: clamp(3.25rem, 6vw, 4.25rem);
}
.hero-sheet .lede { margin-top: 1.15rem; font-size: 1.125rem; }
.hero-sheet .actions { margin-top: 1.6rem; }
.hero-sheet .aside-note { margin-top: 1.4rem; font-size: 0.9375rem; }
.hero-caption { grid-column: 1 / span 5; grid-row: 1; align-self: start; margin-top: calc((min(100vw, var(--wrap)) - 2 * var(--gutter)) / 2 + 0.8rem); font-size: 0.9375rem; }

/* Inner page title */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.page-head .lede { margin: 1rem auto 0; font-size: 1.1875rem; line-height: 1.55; max-width: 40rem; }

/* Form cells: fees and where to send, set out like a paper form */
.form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; background: var(--ink); border: 2px solid var(--ink); }
.form > div { background: var(--paper); padding: 1.2rem 1.5rem 1.5rem; grid-column: span 2; }
.form > .wide { grid-column: span 3; }
.form h3 { font-family: var(--body); font-weight: 650; font-size: 0.9375rem; line-height: 1.4; }
.form .value { margin-top: 0.3rem; font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.form .value.long { font-size: 1.1875rem; }
.form a { text-decoration-color: var(--tan-deep); }
.form p:not(.value) { margin-top: 0.5rem; font-size: 1rem; }
.form address { font-style: normal; }
.form-note { margin-top: 1.5rem; text-align: center; }

/* Two readers */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem clamp(2.5rem, 6vw, 5.5rem); }
.pair h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); }
.pair p { margin-top: 0.9rem; }
.pair ul { margin-top: 1rem; padding-left: 1.15rem; }
.pair li + li { margin-top: 0.4rem; }
.pair li::marker { color: var(--tan); }
.more { margin-top: 1.4rem; font-weight: 650; }

/* The route a request takes. A real sequence, so it is numbered. */
.route { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.route li { counter-increment: step; position: relative; }
.route li::before {
  content: counter(step); display: grid; place-items: center; position: relative; z-index: 1;
  width: 3rem; height: 3rem; border-radius: 50%; background: var(--ink); color: var(--on-ink);
  font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin-bottom: 1rem;
}
.route li:not(:last-child)::after { content: ""; position: absolute; top: calc(1.5rem - 1px); left: 3rem; right: -2rem; height: 2px; background: var(--ink); }
.route h3 { font-size: 1.1875rem; }
.route p { margin-top: 0.45rem; font-size: 1rem; }

/* Services */
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: 2.75rem clamp(2.5rem, 6vw, 5.5rem); }
.offers h3, .offers h2 { font-size: 1.5rem; }
.offers p { margin-top: 0.6rem; }
.offers ul { margin-top: 0.9rem; padding-left: 1.15rem; }
.offers li + li { margin-top: 0.35rem; }

/* Dashboard */
.dash-steps { list-style: none; padding: 0; margin: 2.25rem auto 0; max-width: 54rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2.5rem; counter-reset: d; text-align: left; }
.dash-steps li { counter-increment: d; display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: baseline; color: var(--on-ink); }
.dash-steps li::before { content: counter(d); font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1; color: var(--tan); }
.band-ink.center > .actions { margin-top: 2.25rem; }

/* Questions as a stack of slips */
.slips { display: grid; gap: 0.6rem; max-width: 52rem; margin-inline: auto; }
.slips details { background: var(--paper); }
.slips summary { cursor: pointer; padding: 1.15rem 3.5rem 1.15rem 1.5rem; font-family: var(--display); font-weight: 600; font-size: 1.1875rem; line-height: 1.35; color: var(--ink); list-style: none; position: relative; }
.slips summary::-webkit-details-marker { display: none; }
.slips summary::after { content: "+"; position: absolute; right: 1.4rem; top: 0.95rem; font-family: var(--body); font-weight: 400; font-size: 1.625rem; line-height: 1; }
.slips details[open] summary::after { content: "\2212"; }
.slips .answer { padding: 0 1.5rem 1.5rem; }
.slips a { text-decoration-color: var(--tan-deep); }
.slips address, .qa address { font-style: normal; margin-top: 1em; }
.slips-more { margin-top: 1.75rem; text-align: center; font-weight: 650; }

/* Questions written out in full */
.qa { max-width: 46rem; margin-inline: auto; }
.qa article + article { margin-top: 3rem; }
.qa h2 { font-size: 1.5rem; line-height: 1.3; }
.qa h2 + div { margin-top: 0.85rem; }

/* Prose pages */
.prose { max-width: 44rem; margin-inline: auto; }
.prose h2 { font-size: 1.4375rem; margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h2 + p, .prose h2 + ul { margin-top: 0.75rem; }
.prose ul { padding-left: 1.25rem; margin-top: 0.75rem; }
.prose li + li { margin-top: 0.4rem; }
.prose p + ul, .prose ul + p { margin-top: 0.9rem; }
.prose .updated { font-size: 0.9375rem; color: #4a4640; }

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem clamp(2.5rem, 6vw, 5rem); align-items: start; }
.split .prose { margin-inline: 0; }
.portrait { margin: 0; }
.portrait figcaption { margin-top: 0.75rem; font-size: 0.9375rem; color: #4a4640; }

/* Footer */
.site-foot { background: var(--ink); color: var(--on-ink-soft); padding-block: 3.5rem 2rem; font-size: 1rem; }
.site-foot a { color: var(--on-ink); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) auto auto auto; gap: 2.5rem 3.5rem; }
.foot-brand { display: flex; gap: 1rem; align-items: flex-start; }
.foot-brand img { width: 3.25rem; flex: none; }
.foot-name { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--on-ink); line-height: 1.2; }
.foot-mission { margin-top: 0.5rem; max-width: 22rem; }
.foot-cause { margin-top: 1.25rem; max-width: 24rem; font-size: 0.9375rem; }
.site-foot h2 { font-family: var(--body); font-weight: 650; font-size: 1rem; color: var(--tan); margin-bottom: 0.6rem; }
.site-foot ul { list-style: none; padding: 0; }
.site-foot li + li { margin-top: 0.35rem; }
.site-foot address { font-style: normal; }
.site-foot address + ul { margin-top: 0.35rem; }
.foot-base { margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid #3a3731; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; font-size: 0.9375rem; }
.foot-base ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; }
.foot-base li + li { margin-top: 0; }

/* Small screens */
@media (max-width: 60rem) {
  .hero-stack { display: block; }
  .hero-photo { max-width: 30rem; }
  .hero-sheet { margin: -3.5rem 0 0 clamp(1rem, 8vw, 4rem); position: relative; }
  .hero-caption { margin-top: 1rem; margin-left: clamp(1rem, 8vw, 4rem); }
  .route { grid-template-columns: 1fr 1fr; row-gap: 2.25rem; }
  .route li:nth-child(2)::after { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .portrait { max-width: 28rem; }
  .site-nav { order: 3; flex-basis: 100%; }
  .form > div { grid-column: span 3; }
  .form > div:last-child:nth-child(odd) { grid-column: span 6; }
}
@media (max-width: 44rem) {
  :root { --gutter: 1.25rem; --fold: 2.75rem; }
  body { font-size: 1rem; }
  .pair, .offers { grid-template-columns: minmax(0, 1fr); }
  .route { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
  .route li { display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; }
  .route li::before { grid-row: span 2; margin-bottom: 0; }
  .route li::after { display: none; }
  .route h3 { align-self: end; }
  .dash-steps { grid-template-columns: minmax(0, 1fr); max-width: 22rem; }
  .form > div, .form > .wide { grid-column: span 6; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .head-actions .btn { display: none; }
  .site-nav ul { gap: 0 1.1rem; }
  .site-nav a { font-size: 0.9375rem; padding-block: 0.65rem; }
  .hero-sheet { margin-left: 0.75rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, a { transition: background-color 0.12s ease, color 0.12s ease, text-decoration-color 0.12s ease; }
}

@media print {
  body { background: #fff; }
  .site-nav, .head-actions, .skip, .actions { display: none; }
  .site-head, .site-foot, .band-ink { background: none; color: #000; }
  .site-head *, .site-foot *, .band-ink * { color: #000; }
  .folded { clip-path: none; }
  .folded::before { display: none; }
}

.clipped { clip-path: polygon(var(--fold) 0, 100% 0, 100% 100%, 0 100%, 0 var(--fold)); }
