/* ═══════════════════════════════════════════════════
   Shared components — components.css
   Loaded site-wide. One source of truth for the button
   system, the CTA banner, and the scroll reveal.
═══════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════
   Button system
   .dd-btn                 ink on light surfaces
   .dd-btn--light          white, for dark surfaces
   .dd-btn--outline        hairline, for light surfaces
   .dd-btn--outline-light  hairline, for dark surfaces
═══════════════════════════════════════════════════ */

.dd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  background: var(--dovetail-dark);
  border: 1px solid var(--dovetail-dark);
  color: var(--dovetail-white);
  font-family: "Roboto", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.dd-btn:hover {
  background: var(--dovetail-accent);
  border-color: var(--dovetail-accent);
  color: var(--dovetail-dark);
}

.dd-btn:focus-visible {
  outline: 2px solid var(--dovetail-accent);
  outline-offset: 3px;
}

.dd-btn--light {
  background: var(--dovetail-white);
  border-color: var(--dovetail-white);
  color: var(--dovetail-dark);
}

.dd-btn--light:hover {
  background: var(--dovetail-accent);
  border-color: var(--dovetail-accent);
  color: var(--dovetail-dark);
}

.dd-btn--outline {
  background: transparent;
  border-color: var(--dovetail-dark);
  color: var(--dovetail-dark);
}

.dd-btn--outline:hover {
  background: var(--dovetail-dark);
  border-color: var(--dovetail-dark);
  color: var(--dovetail-white);
}

.dd-btn--outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--dovetail-white);
}

.dd-btn--outline-light:hover {
  background: var(--dovetail-white);
  border-color: var(--dovetail-white);
  color: var(--dovetail-dark);
}

/* ═══════════════════════════════════════════════════
   CTA banner (parts/cta-banner.php)
═══════════════════════════════════════════════════ */

.dd-cta {
  background: var(--dovetail-green-800);
  text-align: center;
  padding: clamp(80px, 10vw, 130px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dd-cta-eyebrow {
  margin: 0 0 20px;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dovetail-green-200);
}

.dd-cta-heading {
  margin: 0 0 40px;
  font-family: "Cal Sans", sans-serif;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 600;
  color: var(--dovetail-white);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.dd-cta-heading em {
  font-family: "Old Standard TT", serif;
  font-style: italic;
  font-weight: 400;
}

/* Subheading — serif italic, the monograph counterpoint to the Cal heading */
.dd-cta-sub {
  margin: -10px 0 42px;
  max-width: 52ch;
  font-family: "Old Standard TT", serif;
  font-style: italic;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  text-wrap: pretty;
}

.dd-cta-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .dd-cta-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
  }
}

/* ═══════════════════════════════════════════════════
   Scroll reveal (assets/js/reveal.js)
   Mark any element with data-reveal to opt in.
   data-reveal="custom" gets the .dd-reveal / .is-in
   classes but no generic animation — the page's own CSS
   defines the effect (e.g. staggered children).
   Progressive enhancement: everything is visible by
   default; JS adds .dd-reveal only when it can animate.
═══════════════════════════════════════════════════ */

.dd-reveal:not([data-reveal="custom"]) {
  opacity: 0;
  transform: translateY(32px);
  will-change: opacity, transform;
}

.dd-reveal.is-in:not([data-reveal="custom"]) {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .dd-reveal:not([data-reveal="custom"]) {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .dd-btn {
    transition: none;
  }
}
