/* ==========================================================================
   Shared blocks: container, label, title, text, button, section-head
   ========================================================================== */

/* container */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* label: small mono eyebrow, e.g. [ The Club ] */
.label {
  display: inline-block;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.label--on-dark {
  color: var(--text-on-dark-muted);
}

.label--accent {
  color: var(--accent);
}

/* title */
.title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text-heading);
  text-wrap: balance;
}

.title--display { --title-size: var(--fs-display); font-size: var(--title-size); line-height: 0.98; }
.title--h1 { --title-size: var(--fs-h1); font-size: var(--title-size); }
.title--h2 { --title-size: var(--fs-h2); font-size: var(--title-size); }
.title--h3 { --title-size: var(--fs-h3); font-size: var(--title-size); line-height: 1.12; }
.title--h4 { --title-size: var(--fs-h4); font-size: var(--title-size); line-height: 1.2; letter-spacing: -0.01em; }

/* UPPERCASE headings: capitals are wider, so the size is reduced to keep
   the same visual weight and to fit long words on phones */
.title--caps {
  font-size: calc(var(--title-size, var(--fs-h2)) * 0.82);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.title--on-dark {
  color: var(--text-on-dark);
}

.title__accent {
  color: var(--accent);
}

/* text */
.text {
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-body);
  max-width: 34rem;
}

.text--lead {
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.55;
}

.text--small {
  font-size: var(--fs-small);
}

.text--on-dark {
  color: var(--text-on-dark-muted);
}

/* button (from template, rebuilt) */
.button {
  --button-bg: var(--color-ivory);
  --button-fg: var(--color-teal);
  --button-hover-bg: var(--color-copper);
  --button-hover-fg: var(--color-ivory);
  --button-border: transparent;

  display: inline-flex;
  align-items: stretch;
  gap: 0.25rem;
  width: max-content;
  max-width: 100%;
  text-decoration: none;
  cursor: pointer;
}

.button--dark {
  --button-bg: var(--color-teal);
  --button-fg: var(--color-ivory);
  --button-hover-bg: var(--color-copper);
  --button-hover-fg: var(--color-ivory);
}

.button--ghost {
  --button-bg: transparent;
  --button-fg: var(--color-ivory);
  --button-hover-bg: var(--color-ivory);
  --button-hover-fg: var(--color-teal);
  --button-border: rgba(246, 245, 242, 0.45);
}

.button--ghost-dark {
  --button-bg: transparent;
  --button-fg: var(--color-teal);
  --button-hover-bg: var(--color-teal);
  --button-hover-fg: var(--color-ivory);
  --button-border: var(--line);
}

.button__label,
.button__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--button-border);
  color: var(--button-fg);
  isolation: isolate;
  transition: color 350ms var(--ease-out);
}

.button__label {
  padding: 0 1.5rem;
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.button__icon {
  width: 3.25rem;
  flex-shrink: 0;
}

.button__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.button__label::before,
.button__icon::before,
.button__label::after,
.button__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.button__label::after,
.button__icon::after {
  background-color: var(--button-bg);
  transition: transform 400ms var(--ease-out);
  z-index: -2;
}

.button__label::before,
.button__icon::before {
  background-color: var(--button-hover-bg);
  transform: translateY(101%);
  transition: transform 400ms var(--ease-out);
  z-index: -1;
}

@media (hover: hover) {
  .button:hover .button__label,
  .button:hover .button__icon {
    color: var(--button-hover-fg);
  }

  .button:hover .button__label::before,
  .button:hover .button__icon::before {
    transform: translateY(0);
  }

  .button:hover .button__label::after,
  .button:hover .button__icon::after {
    transform: scale(0.92);
  }
}

.button:focus-visible {
  outline: none;
}

.button:focus-visible .button__label,
.button:focus-visible .button__icon {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* section-head: label + title + short text, used by most sections */
.section-head {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.section-head__text {
  max-width: 30rem;
}

@media (min-width: 1000px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
    column-gap: var(--space-xl);
  }

  .section-head--split .section-head__label {
    grid-column: 1 / -1;
  }

  .section-head--split .section-head__text {
    justify-self: end;
  }
}
