/* The Tap line: three statements and Our businesses, between the hero
   and Locations. The sections are written from tapline.json by the build; the line
   itself is drawn by line.js (for tapline.js) in one SVG behind the content. */

.tapline {
  --tl-gut: 72px;
  --tl-gap: 40px;
  --tl-ghost: rgba(20, 33, 61, 0.08);
  --tl-chip: #F0ECE5;
  --tl-shadow: rgba(20, 33, 61, 0.1);
  --tl-warm-1: #E9E1D3;
  --tl-warm-2: #D9CDB9;
  position: relative;
  z-index: 2;   /* above Locations, so the line's last dot sits on its top edge */
  background: var(--paper);
  color: var(--navy);
}

.tapline > section {
  position: relative;
  z-index: 1;
}

/* The line itself is drawn by line.js (styles in line.css), in a box inside the Tap line
   (.tline.tapline__line), under its sections. */

/* Statements: gutter for the line, the words, a photo */

.tl-st__inner {
  display: grid;
  grid-template-columns: var(--tl-gut) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--tl-gap);
  align-items: center;
  min-height: 88vh;
  padding-top: 40px;
  padding-bottom: 40px;
}

.tl-gut {
  align-self: stretch;
}

.tl-st__title {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

/* Each word lights up as the statement comes into view. Only while tapline.js runs. */
.tl-w {
  transition: opacity 0.2s ease;
}

.tl-js .tl-w {
  opacity: 0.16;
}

.tl-js .tl-w.is-on {
  opacity: 1;
}

.tl-st__line {
  max-width: 40ch;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Photos. A slot with no photo yet is a plain warm panel of the same shape. */

.tl-photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--tl-warm-1), var(--tl-warm-2));
}

.tl-photo--tall {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 540px;
  justify-self: end;
  border-radius: 18px;
}

.tl-photo--wide {
  aspect-ratio: 16 / 9;
}

.tl-photo picture,
.tl-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.tl-photo img {
  object-fit: cover;
}

/* Our businesses: two staggered columns, the line down the gap between them */

.tl-biz {
  padding: 80px 0 var(--section);
}

.tl-biz__head {
  display: grid;
  grid-template-columns: var(--tl-gut) minmax(0, 1fr);
  gap: var(--tl-gap);
}

.tl-biz__title {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.tl-biz__line {
  max-width: 56ch;
  margin: 0;
  font-size: 18px;
  color: var(--ink-soft);
}

.tl-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  column-gap: 180px;
  row-gap: 28px;
  margin: 120px 0 0;
  padding: 0;
  list-style: none;
}

.tl-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 30px var(--tl-shadow);
  transition: opacity 0.5s ease;
}

.tl-card:nth-child(odd) {
  grid-column: 1;
}

.tl-card:nth-child(even) {
  grid-column: 2;
  margin-top: 90px;
}

/* Until the line's branch reaches it, the card's photo is faded and grey; the words stay at full
   contrast throughout (WCAG 1.4.3: dimming the whole card took its text below 4.5:1, accessibility
   review, 11 November 2026). Only while tapline.js runs. */
.tl-js .tl-card .tl-photo {
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.tl-js .tl-card:not(.is-on) .tl-photo {
  opacity: 0.35;
  filter: grayscale(1);
}

.tl-card__body {
  padding: 18px 20px 20px;
}

.tl-card__label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-deep);
}

.tl-card__title {
  margin: 2px 0 6px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

/* Tom's headline under the card's title (9 November 2026). */
.tl-card__head {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
}

.tl-card__text a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tl-card__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.tl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tl-chips li {
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--tl-chip);
  font-size: 14px;
}

/* Leaving the hero: the Tap line slides up over it like a curtain (fx.js) */

.tx-sticky main > .tapline {
  z-index: 2;
}

/* The line's box follows the rounded top edge, so its cover never shows square corners. */
.tx-curtain .tapline__line {
  border-radius: 28px 28px 0 0;
}

.tx-curtain .tapline {
  margin-top: -28px;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -22px 60px rgba(20, 33, 61, 0.2);
}

@media (max-width: 1040px) {
  .tl-cards {
    column-gap: 120px;
  }
}

/* Phones: the line keeps to the left margin, with everything indented from it */
@media (max-width: 759px) {
  .tapline {
    --tl-gut: 36px;
    --tl-gap: 18px;
  }

  .tl-st__inner {
    grid-template-columns: var(--tl-gut) minmax(0, 1fr);
    min-height: 0;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .tl-photo--tall {
    grid-column: 2;
    max-width: none;
    aspect-ratio: 4 / 3;
  }

  .tl-cards {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 22px;
    margin-top: 60px;
    padding-left: 54px;
  }

  .tl-card:nth-child(odd),
  .tl-card:nth-child(even) {
    grid-column: 1;
    margin-top: 0;
  }

  .tx-curtain .tapline__line {
    border-radius: 20px 20px 0 0;
  }

  .tx-curtain .tapline {
    margin-top: -20px;
    border-radius: 20px 20px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-w,
  .tl-card {
    transition: none;
  }

}
