/* pages.css: the reading pages (mission, terms).

   It is loaded after /assets/main.css, which already brings the colours,
   the type, the header, the buttons, the questions and the footer. This
   file only adds what a page of text needs.

   Order of this file:
     1. Page head (label, big title)
     2. Bands (a heading on the left, text on the right)
     3. Text
     4. Mission: the big line, past work
     5. Terms and privacy: the contents list, the legal text, the table
     6. Not found
     7. Top bar, FAQ, past work */


/* ── 1. Page head ────────────────────────────────────────────────────────── */

.page { padding-top: var(--header-h); }

.page-head { padding-block: clamp(4.5rem, 14vh, 9rem) clamp(3rem, 9vh, 5.5rem); }
.page-head .label { color: var(--coral); }
.page-head__title {
  max-width: 11em;
  margin-top: 1.5rem;
  font-size: clamp(2.75rem, 1.5rem + 5.2vw, 6rem);
  line-height: 1;
  letter-spacing: -.03em;
}
.page-head__note { margin-top: 1.75rem; font-size: var(--fs-small); }


/* ── 2. Bands ────────────────────────────────────────────────────────────── */

.band { padding-block: clamp(3.5rem, 10vh, 6.5rem); border-top: 1px solid var(--line); }
.band__title { font-size: clamp(1.875rem, 1.35rem + 1.8vw, 3rem); }
.band__body { margin-top: 1.75rem; }
.band__body .actions { margin-top: 2rem; }
.band .qa { margin-top: 0; }

@media (min-width: 60rem) {
  .band__grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: var(--col-gap);
    align-items: start;
  }
  .band__body { margin-top: .4rem; }
}


/* ── 3. Text ─────────────────────────────────────────────────────────────── */

.prose { max-width: 38em; }
.prose > * + * { margin-top: 1.25rem; }
.prose strong, .legal strong { color: var(--text); font-weight: 600; }
.prose a, .legal a, .work-pair p a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}


/* ── 4. Mission ──────────────────────────────────────────────────────────── */

/* The one big line. */
.quote {
  max-width: 17em;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.quote + .prose { margin-top: 2rem; }

/* Past work: two client sites side by side, each in a drawn browser window. */
.work-pair { display: grid; gap: 3.5rem 2rem; margin-top: clamp(2rem, 6vh, 3.5rem); }
.work-pair .browser { box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .45); }
.work-pair img { width: 100%; }
.work-pair figcaption { margin-top: 1.5rem; }
.work-pair figcaption p { max-width: 30em; }
.work-pair .arrow-link { margin-top: .5rem; }
@media (min-width: 48rem) {
  .work-pair { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}


/* ── 5. Terms ────────────────────────────────────────────────────────────── */

/* The contents list sits beside the text on a wide screen and stays in
   view. On a phone it is left out; the page is one column. */
.toc { display: none; }
.legal-band { padding-block: clamp(3rem, 8vh, 5rem) clamp(5rem, 14vh, 9rem); border-top: 1px solid var(--line); }

.legal { max-width: 40em; }
.legal h2 {
  margin-top: 3.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -.015em;
}
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal p, .legal ul { margin-top: 1.15rem; }
.legal ul { display: grid; gap: .9rem; padding-left: 1.25rem; border-left: 1px solid var(--line); }
/* The two paragraphs the law expects to stand out. */
.legal .key { color: var(--text); font-size: .9375rem; line-height: 1.65; letter-spacing: .01em; }

@media (min-width: 60rem) {
  .legal-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: var(--col-gap);
    align-items: start;
  }
  .toc { display: block; position: sticky; top: calc(var(--header-h) + 2.5rem); }
  .toc ol { margin-top: 1rem; }
  .toc a {
    display: block;
    padding: .4rem 0;
    font-size: var(--fs-small);
    text-decoration: none;
    transition: color .25s ease;
  }
}
@media (hover: hover) { .toc a:hover { color: var(--text); } }

/* The one table (privacy, Section 5). On a phone it scrolls sideways inside
   its own box, so the page itself never does. */
.tablewrap { margin-top: 1.5rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.legal table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: var(--fs-small); line-height: 1.5; }
.legal th, .legal td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { color: var(--text); font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.legal td:first-child { color: var(--text); white-space: nowrap; }
.legal tbody tr:last-child td { border-bottom: 0; }


/* ── 6. Not found ────────────────────────────────────────────────────────── */

/* One screen tall: the words sit in the middle and the short footer stays
   at the bottom of the window. */
.lost-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.lost { display: flex; flex: 1; align-items: center; padding-block: calc(var(--header-h) + 3rem) 3rem; }
.lost__grid { width: min(100% - 2 * var(--gutter), var(--wrap)); }
.lost__code { color: var(--coral); }
.lost__lead { margin-top: 1.5rem; }
.lost__actions { margin-top: 2.25rem; }
.lost__links { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; margin-top: 2rem; }
.lost__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: color .25s ease;
}
@media (hover: hover) { .lost__links a:hover { color: var(--text); } }
.lost__mark { display: none; }
.lost-page .footer { padding-block: 1.5rem; }
.lost__small { margin-top: 0; }
@media (min-width: 60rem) {
  .lost__grid { display: flex; align-items: center; justify-content: space-between; gap: var(--col-gap); }
  .lost__mark { display: block; width: auto; height: min(46vh, 22rem); margin-right: 8%; }
}


/* ── 7. Top bar, FAQ, past work ──────────────────────────────────────────── */

/* The link for the page you are on is lit. */
.nav a[aria-current="page"] { color: var(--text); }

/* FAQ: the list of questions in one readable column. */
.faq { max-width: 54rem; }

/* Past work: one row per website. The picture and the words sit side by
   side on a wide screen, and every other row swaps sides. */
.site-row { padding-block: clamp(3.5rem, 10vh, 6.5rem); border-top: 1px solid var(--line); }
.site-row__grid { display: grid; gap: 2rem; }
.site-row .browser { box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .45); }
.site-row img { width: 100%; }
.site-row__text p { max-width: 30em; margin-top: 1.25rem; }
.site-row__text .arrow-link { margin-top: 1rem; }
@media (min-width: 60rem) {
  .site-row__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--col-gap);
    align-items: center;
  }
  .site-row--flip .site-row__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .site-row--flip .browser { order: 2; }
}
