/* ==========================================================================
   Leme to Pontal Swimming Association
   content.css : the text pages, the pilot rows and the contact page.
   Everything shared (prose, document rows, photo grid, forms, buttons) lives
   in site.css; only what is specific to these pages is below.
   ========================================================================== */

/* --- The inner page frame -------------------------------------------------
   The breadcrumb and the page title bring their own top spacing, so the page
   only has to close the bottom. */

.text-page {
  padding-bottom: var(--s9);
}

/* A section heading inside a page, one step under the h1. */

.subhead {
  font-size: 1.5rem;
  margin: var(--s7) 0 var(--s4);
}

.subhead-flush {
  margin-top: 0;
}

/* --- Text beside a photo --------------------------------------------------
   The photo is an object with edges, never a background. It comes first in
   the source so that it sits above the text on a narrow screen, and is placed
   into the second column on a wide one. */

.text-layout {
  display: grid;
  gap: var(--s6);
}

.page-figure {
  margin: 0;
  max-width: 520px;
}

.page-figure img {
  border-radius: var(--r-surface);
}

.page-figure figcaption {
  margin-top: var(--s3);
}

@media (min-width: 1024px) {
  .text-layout {
    grid-template-columns: minmax(0, 68ch) minmax(220px, 400px);
    align-items: start;
    gap: var(--s7);
  }

  .text-layout > .prose {
    grid-column: 1;
    grid-row: 1;
  }

  .text-layout > .page-figure {
    grid-column: 2;
    grid-row: 1;
  }
}

/* --- Prose details --------------------------------------------------------
   The stored texts open with a heading often enough that the first one must
   not push the page open, and a list item can hold more than one paragraph
   when the text continues a bullet on the next line. */

.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}

.prose li p {
  margin: 0 0 var(--s3);
}

.prose li p:last-child {
  margin-bottom: 0;
}

/* --- Pilots ---------------------------------------------------------------
   One row per pilot: the first photo, the pilot name and the boat. */

.pilot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--tide);
  max-width: 68ch;
}

.pilot-row {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--tide);
  text-decoration: none;
}

.pilot-thumb {
  width: 88px;
  height: 88px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-surface);
  background: var(--tide);
}

.pilot-thumb-empty {
  display: block;
}

.pilot-text {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  min-width: 0;
}

.pilot-name {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--tide);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--step) ease;
}

.pilot-row:hover .pilot-name {
  text-decoration-color: var(--ink);
}

.pilot-boat {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate);
}

/* --- Contact --------------------------------------------------------------
   The form leads, the details and the photo sit beside it. */

.contact-grid {
  display: grid;
  gap: var(--s7);
}

.form-note {
  margin: 0 0 var(--s5);
}

.contact-list {
  list-style: none;
  margin: 0 0 var(--s5);
  padding: 0;
}

.contact-list li {
  margin-bottom: var(--s2);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    align-items: start;
  }
}
