/* ==========================================================================
   HD Signature Projects — Project Page Styles
   Uses site CSS tokens so dark mode is automatic.
   All four project templates import this file.
   ========================================================================== */

/* ── Project Hero ─────────────────────────────────────────────────────────── */

.project-hero {
  height: 420px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--color-black-50) 100%);
}

/* ── Layout Variants ──────────────────────────────────────────────────────── */

/* Simple: content + sidebar CTA */
.project-layout {
  display: grid;
  grid-template-columns: 1fr 264px;
  gap: 4rem;
  padding-top: 3rem;
  padding-bottom: 5rem;
  align-items: start;
}

/* Case Study: full-width content */
.project-layout--full {
  display: block;
  max-width: 820px;
  margin: 0 auto;
  padding-top: 3rem;
  padding-bottom: 5rem;
}

/* Work Example: content + meta sidebar */
.project-layout--two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding-top: 3rem;
  padding-bottom: 5rem;
  align-items: start;
}

/* Portfolio: gallery-first */
.project-layout--portfolio {
  padding-top: 2rem;
  padding-bottom: 5rem;
}

/* ── Project Header ───────────────────────────────────────────────────────── */

.project-header {
  margin-bottom: 2.5rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.project-summary {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 680px;
}

/* ── Project Meta Bar ─────────────────────────────────────────────────────── */

.project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.project-meta__location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.project-meta__location svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-signature);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-meta__date {
  color: var(--color-text-muted);
}

/* ── Badges (service + project types) ─────────────────────────────────────── */

.project-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.project-badge--service {
  background: var(--color-signature-5);
  color: var(--color-signature);
  border: 1px solid var(--color-signature-10);
}

.project-badge--type {
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-light);
}

/* ── Content Body ─────────────────────────────────────────────────────────── */

.project-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
}

.project-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.project-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.project-content p {
  margin-bottom: 1.25rem;
}

.project-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ── CTA Sidebar ──────────────────────────────────────────────────────────── */

.project-sidebar__cta {
  position: sticky;
  top: 120px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.project-sidebar__cta h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.project-sidebar__cta p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.btn-cta-project {
  display: block;
  padding: 0.75rem 1.5rem;
  background: var(--color-signature);
  color: var(--color-white);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-cta-project:hover {
  background: var(--color-signature-dark);
  transform: translateY(-1px);
}

.btn-cta-project-secondary {
  display: block;
  padding: 0.5rem 1rem;
  margin-top: 0.75rem;
  color: var(--color-signature);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.btn-cta-project-secondary:hover {
  background: var(--color-signature-5);
}

/* ── Meta Sidebar (work-example template) ─────────────────────────────────── */

.project-meta-sidebar {
  position: sticky;
  top: 120px;
}

.project-meta-sidebar__section {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.project-meta-sidebar__title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.project-meta-sidebar__value {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.5;
}

/* ── Gallery Grid ─────────────────────────────────────────────────────────── */

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.project-gallery__item {
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/3;
}

.project-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-gallery__item:hover img {
  transform: scale(1.03);
}

.project-gallery__item a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Hub Page Styles ──────────────────────────────────────────────────────── */

.projects-hub-hero {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-light);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.projects-hub-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.projects-hub-hero p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filter bar */
.projects-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1.5rem 0 0.5rem;
}

.projects-filter-bar__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.projects-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--color-border-light);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.projects-filter-btn:hover {
  border-color: var(--color-signature);
  color: var(--color-signature);
}

.projects-filter-btn.is-active {
  background: var(--color-signature);
  border-color: var(--color-signature);
  color: var(--color-white);
}

/* Project cards grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  padding: 2rem 0 4rem;
}

.project-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--color-black-8);
}

.project-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card__image img {
  transform: scale(1.04);
}

.project-card__image--placeholder {
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.project-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.project-card__badges {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.project-card__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.project-card__title a {
  color: inherit;
  text-decoration: none;
}

.project-card__title a:hover {
  color: var(--color-signature);
}

.project-card__summary {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.project-card__location {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.project-card__location svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-signature);
  fill: none;
  stroke-width: 2;
}

/* Empty state */
.projects-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
}

.projects-empty p {
  font-size: 1.0625rem;
}

/* Draft/archived badge on hub */
.project-card__status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
}

.project-card__image {
  position: relative;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .project-layout,
  .project-layout--two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-hero {
    height: 280px;
  }

  .project-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-sidebar__cta,
  .project-meta-sidebar {
    position: static;
  }
}
