/* ==========================================================================
   connect.css
   Styles for the Connect pages: Connect, Contact, Sitemap, Recreation.

   Contents
     1. Shared: accent marks
     2. Connect: link boxes
     3. Contact
     4. Sitemap
     5. Recreation: quote, definitions, film list
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Shared: accent marks (the red ">" and "/" on the old site)
   -------------------------------------------------------------------------- */

.mark {
  font-weight: 700;
  color: var(--accent);
}


/* --------------------------------------------------------------------------
   2. Connect: link boxes (same boxed style as the section shortcuts)
   -------------------------------------------------------------------------- */

.connect-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: .75rem;
  max-width: var(--content-max);
  margin: 0;
  padding: 0;
  list-style: none;
}

.connect-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: .85rem 1.1rem;
  font-family: var(--heading);
  font-size: inherit;                  /* same size as the reading text */
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: transparent;             /* light outline only, as the shortcut boxes */
  border: var(--rule);
  transition: background-color .15s ease, border-color .15s ease;
}

.connect-links a::after {
  content: "\2192";                    /* → */
  color: var(--ink-soft);
}

.connect-links a:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.connect-or {
  margin: 1.25rem 0 .75rem;
  color: var(--ink);
}


/* --------------------------------------------------------------------------
   3. Contact: address left, email and phone right
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));   /* side by side, each as wide as its text (narrower if space is short) */
  align-items: start;
  gap: 2rem clamp(3rem, 8vw, 6rem);
  max-width: var(--content-max);
}

.contact-address {
  font-style: normal;                  /* browsers italicise <address> by default */
}

.contact-address strong {
  font-family: var(--heading);
  font-weight: 700;
  letter-spacing: .02em;
}

.contact-lines {
  margin: 0;
}

@media (max-width: 640px) {
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* --------------------------------------------------------------------------
   4. Sitemap
   -------------------------------------------------------------------------- */

.sitemap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);   /* structure | quick links */
  gap: 0 clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}

@media (max-width: 760px) {
  .sitemap-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Site structure: quiet rows like the menu, each with a small arrow */
.site-tree,
.site-tree ul,
.quick-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-tree a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--tap);
  font-family: var(--heading);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: var(--rule);
}

.site-tree a::after {
  content: "\2192";                    /* → */
  font-weight: 400;
  color: var(--ink-soft);
  transition: transform .15s ease;
}

.site-tree a:hover {
  color: var(--accent);
}

.site-tree a:hover::after {
  color: var(--accent);
  transform: translateX(3px);
}

/* Pages under Connect: indented, a little quieter */
.site-tree ul a {
  padding-left: 1.25rem;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-soft);
}

/* Quick links: small headings, then hairline rows */
.quick-title {                          /* style: small heading, base.css */
  margin: var(--heading-above) 0 var(--heading-below);
}

.sitemap-section .quick-title:first-of-type {
  margin-top: 0;
}

.quick-list li {
  padding: .6rem 0;
  color: var(--ink);
  border-bottom: var(--rule);
}

/* "2022 >" … the years in their own column, lined up. The column is as wide
   as the longest year (e.g. "2024-25 >"), shared by all rows (subgrid);
   browsers without subgrid use a fixed width instead. */
.quick-list .quick-dated {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  column-gap: .75rem;
}

@supports (grid-template-columns: subgrid) {
  .quick-list:has(.quick-dated) {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .quick-list:has(.quick-dated) > li {
    grid-column: 1 / -1;
  }

  .quick-list .quick-dated {
    grid-template-columns: subgrid;
  }
}

.quick-year {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}


/* --------------------------------------------------------------------------
   5. Recreation
   -------------------------------------------------------------------------- */

.rec-quote {
  max-width: var(--content-max);
  margin: 0 0 2rem;
  padding-left: 1.25rem;
  border-left: var(--entry-title-bar);  /* same blue bar as the entry headings */
}

.rec-quote blockquote {
  margin: 0;
  font-family: var(--heading);
  font-size: var(--fs-heading);
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
}

.rec-quote blockquote em {
  font-style: normal;                  /* upright, like the rest of the site */
}

.rec-quote figcaption {
  margin-top: .4rem;
  color: var(--ink-soft);
}

.rec-definitions {
  max-width: var(--measure);
  color: var(--ink);
}

.rec-definitions p {
  margin: 0;
}

.rec-definitions p + p {
  margin-top: .9rem;                   /* space between the two definitions */
}

.rec-definitions strong {
  color: var(--ink);
}

.rec-invitation {
  max-width: var(--measure);
  margin: 1.5rem 0 2rem;
}

/* Film list */
.film-table {
  width: 100%;
  max-width: var(--content-max);
  border-collapse: collapse;
  font-size: inherit;                  /* same size as the reading text */
}

.film-table th {
  padding: .5rem .75rem .5rem 0;
  font-family: var(--heading);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .02em;
  text-align: left;
  color: var(--ink-soft);
  border-bottom: var(--rule-strong);
}

.film-table td {
  padding: .55rem .75rem .55rem 0;
  vertical-align: top;
  border-bottom: var(--rule);
}

.film-table td:first-child {
  color: var(--ink);
}

.film-table td:nth-child(2) {
  color: var(--ink);
}

.film-table th:last-child,
.film-table td:last-child {
  width: 4rem;
  padding-right: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

/* Phones: each film becomes a small stacked card (film / director · year) */
@media (max-width: 640px) {
  .film-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .film-table,
  .film-table tbody,
  .film-table tr,
  .film-table td {
    display: block;
    width: auto;
  }

  .film-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .1rem 1rem;
    padding: .65rem 0;
    border-bottom: var(--rule);
  }

  .film-table td {
    padding: 0;
    border: 0;
  }

  .film-table td:first-child {
    grid-column: 1 / -1;
    font-weight: 600;
  }

  .film-table td:last-child {
    width: auto;
    text-align: right;
  }
}
