/* ═══════════════════════════════════════
   Projects Archive Page
═══════════════════════════════════════ */

.ap-dd-page {
  background: var(--dovetail-bg);
  color: var(--dovetail-dark);
}

.ap-dd-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

/* ── Hero banner ── */
.ap-dd-hero {
  min-height: 50vh;
  background: var(--dovetail-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ap-dd-hero h1 {
  margin: 0 !important;
  color: var(--dovetail-white) !important;
  font-size: clamp(36px, 6vw, 64px) !important;
  line-height: 0.95 !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

.ap-dd-hero-line1 {
  display: block;
  font-family: "Cal Sans", sans-serif !important;
  font-weight: 400 !important;
}

.ap-dd-hero-line2 {
  font-size: clamp(26px, 3vw, 36px) !important;
  display: block;
  font-family: "Old Standard TT", serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  margin-top: -50px;
}

/* ── Grid section ── */
.ap-dd-list-section {
  padding: 90px 0;
}

.ap-dd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Card ── */
.ap-dd-card {
  position: relative;
  width: 100%;
  min-height: 480px;
  overflow: hidden;
}

/* Whole card is the link */
.ap-dd-card-link {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  min-height: inherit;
  text-decoration: none !important;
  position: relative;
}

/* First card spans full row */
.ap-dd-card--hero {
  grid-column: 1 / -1;
  min-height: 620px;
}

/* ── Background image ── */
.ap-dd-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.ap-dd-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.ap-dd-card-link:hover .ap-dd-card-bg img {
  transform: scale(1.05);
}

/* ── Overlay ── */
.ap-dd-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0.22),
    rgba(0, 0, 0, 0.04)
  );
  transition: background 0.35s ease;
}

/* Darker overlay + golden title on hover */
.ap-dd-card-link:hover .ap-dd-card-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88),
    rgba(0, 0, 0, 0.45),
    rgba(0, 0, 0, 0.15)
  );
}

/* ── Card content ── */
.ap-dd-card-content {
  position: relative;
  z-index: 2;
  padding: 44px;
  max-width: 780px;
  width: 100%;
}

.ap-dd-card--hero .ap-dd-card-content {
  max-width: 860px;
}

.ap-dd-card-content h2 {
  margin: 0 0 12px !important;
  color: var(--dovetail-white) !important;
  font-size: clamp(26px, 3vw, 52px) !important;
  line-height: 1.05 !important;
  font-weight: 500 !important;
  font-style: normal !important;
  transition: color 0.25s ease !important;
}

.ap-dd-card--hero .ap-dd-card-content h2 {
  font-size: clamp(36px, 4.5vw, 72px) !important;
}

/* Golden title on hover */
.ap-dd-card-link:hover .ap-dd-card-content h2 {
  color: var(--dovetail-green-200) !important;
}

/* Status pill above the title */
.ap-dd-status {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  color: var(--dovetail-white);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(2px);
}

/* Meta block: scope / description / architect — spacing handled
   here so the gap before the button stays consistent no matter
   which fields are filled in */
.ap-dd-meta {
  margin: 0 0 26px;
}

.ap-dd-meta > p {
  margin: 0 0 8px !important;
}

.ap-dd-meta > p:last-child {
  margin-bottom: 0 !important;
}

/* Type · Location line (gold accent, sits above scope) */
.ap-dd-tagline {
  color: var(--dovetail-green-200) !important;
  font-size: 13px !important;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ap-dd-address {
  display: block;
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  letter-spacing: 0.03em;
  font-style: normal;
}

.ap-dd-desc {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  max-width: 560px;
}

.ap-dd-architect {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 13.5px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ap-dd-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  background: var(--dovetail-white);
  color: var(--dovetail-dark) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--dovetail-white);
  transition: all 0.25s ease;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.25s ease, color 0.25s ease;
}

.ap-dd-card-link:hover .ap-dd-btn {
  opacity: 1;
  transform: translateY(0);
}

.ap-dd-card-link:hover .ap-dd-btn:hover {
  background: transparent;
  color: var(--dovetail-white) !important;
}

.ap-dd-no-projects {
  grid-column: 1 / -1;
  font-size: 18px;
  color: var(--dovetail-dark);
}

/* ── Tablet: 1024px ── */
@media (max-width: 1024px) {
  .ap-dd-container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .ap-dd-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .ap-dd-card {
    min-height: 400px;
  }

  .ap-dd-card--hero {
    min-height: 520px;
  }

  .ap-dd-card-content {
    padding: 32px;
  }

  /* Always show button on touch devices */
  .ap-dd-btn {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile: 767px ── */
@media (max-width: 767px) {
  .ap-dd-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ap-dd-hero {
    min-height: 42vh;
  }
  .ap-dd-hero-line2 {
    margin-top: -28px;
  }

  .ap-dd-list-section {
    padding: 56px 0;
  }

  .ap-dd-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ap-dd-card,
  .ap-dd-card--hero {
    min-height: 360px;
  }

  .ap-dd-card-content,
  .ap-dd-card--hero .ap-dd-card-content {
    padding: 24px;
    max-width: 100%;
  }

  .ap-dd-address {
    font-size: 14px !important;
  }

  .ap-dd-tagline {
    font-size: 11.5px !important;
  }

  .ap-dd-desc {
    font-size: 13.5px !important;
  }

  .ap-dd-architect {
    font-size: 12px !important;
  }

  .ap-dd-meta {
    margin-bottom: 20px;
  }

  .ap-dd-status {
    font-size: 11px;
    padding: 4px 11px;
    margin-bottom: 10px;
  }

  .ap-dd-btn {
    padding: 11px 22px;
    font-size: 13px;
    opacity: 1;
    transform: translateY(0);
  }
}
