/* ============================================================
   P1 shared section design system — Projects & Photography
   Depends on styles-production.css tokens & primitives.
   Nothing here re-declares tokens; sections extend prod-*.
   ============================================================ */

/* ---------- Shared page intro (section hero) ---------- */
.sec-intro {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--line-strong);
}

.sec-intro h1 {
  max-width: 940px;
  margin: 22px 0 0;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 600;
}

.sec-intro h1 span {
  display: block;
  color: var(--text-soft);
}

.sec-intro .sec-lede {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.sec-intro .prod-eyebrow {
  margin-bottom: 0;
}

/* ---------- Section head (reuse prod-section-head pattern) ---------- */
.sec-section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line-strong);
}

.sec-section:last-of-type {
  border-bottom: 0;
}

.sec-section-head {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
}

.sec-section-head h2 {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 550;
}

.sec-section-head p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

.sec-section-desc {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Projects: grouped technical index ---------- */
.sec-category {
  margin-top: 0;
}

.sec-category + .sec-category {
  margin-top: 72px;
}

.sec-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.sec-project-card {
  position: relative;
  min-height: 300px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.sec-project-card:nth-child(even) {
  border-right: 0;
}

.sec-project-card:hover {
  background: var(--panel);
}

.sec-project-index {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.sec-project-body {
  max-width: 580px;
  margin-top: auto;
  padding-top: 48px;
}

.sec-project-body h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -0.045em;
  font-weight: 550;
}

.sec-project-body p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
}

.sec-project-stack {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sec-project-stack span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
}

.sec-project-arrow {
  position: absolute;
  right: 28px;
  bottom: 28px;
  color: var(--text-faint);
  font-size: 18px;
}

/* Empty category guard (kept for safety when a category empties) */
.sec-empty {
  padding: 28px 0;
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
}

/* ---------- Photography: image-first album cards ---------- */
/* Extends the homepage .prod-photo-card language but lets album
   cards carry editorial meta below/over the image. */
.sec-photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.sec-photo-card {
  position: relative;
  display: block;
  min-width: 0;
}

.sec-photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  aspect-ratio: 4 / 5;
}

.sec-photo-card[data-size="wide"] {
  grid-column: span 4;
}

.sec-photo-card[data-size="wide"] .sec-photo-frame {
  aspect-ratio: 16 / 10;
}

.sec-photo-card[data-size="standard"] {
  grid-column: span 2;
}

.sec-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sec-photo-card:hover .sec-photo-frame img {
  transform: scale(1.03);
}

.sec-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.42), transparent 48%);
  pointer-events: none;
}

.sec-photo-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  color: #fff;
}

.sec-photo-overlay .sec-photo-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.sec-photo-overlay h3 {
  margin: 7px 0 0;
  color: #fff;
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.sec-photo-overlay p {
  margin: 6px 0 0;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.5;
}

.sec-photo-meta {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* Fallback tile when an album has no cover image */
.sec-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(
      600px 200px at 20% -10%,
      color-mix(in oklab, var(--accent) 14%, transparent),
      transparent 60%
    ),
    var(--panel);
}

.sec-photo-fallback span {
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.sec-photo-fallback strong {
  color: var(--text);
  font-size: 20px;
  letter-spacing: -0.04em;
  font-weight: 550;
}

/* Album detail: image-first gallery */
.sec-album-head {
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--line-strong);
}

.sec-album-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sec-album-back:hover {
  color: var(--text);
}

.sec-album-head h1 {
  max-width: 900px;
  margin: 26px 0 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 600;
}

.sec-album-facts {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sec-album-blurb {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.65;
}

.sec-gallery {
  padding: 56px 0 96px;
}

.sec-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.sec-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  aspect-ratio: 3 / 2;
}

.sec-gallery-item:nth-child(4n + 1) {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.sec-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sec-gallery-item:hover img {
  transform: scale(1.02);
}

.sec-gallery-item .sec-photo-scrim {
  opacity: 0;
  transition: opacity 200ms ease;
}

.sec-gallery-item:hover .sec-photo-scrim {
  opacity: 1;
}

.sec-gallery-cta {
  position: absolute;
  left: 20px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 200ms ease;
}

.sec-gallery-item:hover .sec-gallery-cta {
  opacity: 1;
}

.sec-gallery-empty {
  padding: 72px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
  color: var(--text-faint);
}

.sec-gallery-empty p {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text-soft);
}

.sec-gallery-empty small {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .sec-intro {
    padding: 72px 0 56px;
  }

  .sec-section {
    padding: 64px 0;
  }

  .sec-category-grid {
    grid-template-columns: 1fr;
  }

  .sec-project-card,
  .sec-project-card:nth-child(even) {
    min-height: 240px;
    border-right: 0;
    padding: 24px;
  }

  .sec-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .sec-photo-card[data-size="wide"] {
    grid-column: span 2;
  }

  .sec-photo-card[data-size="standard"] {
    grid-column: span 1;
  }

  .sec-gallery-grid {
    gap: 16px;
  }
}

@media (max-width: 680px) {
  .sec-intro {
    padding: 56px 0 44px;
  }

  .sec-section {
    padding: 56px 0;
  }

  .sec-section-head {
    align-items: start;
    flex-direction: column;
    margin-bottom: 30px;
  }

  .sec-photo-grid {
    grid-template-columns: 1fr;
  }

  .sec-photo-card[data-size="wide"],
  .sec-photo-card[data-size="standard"] {
    grid-column: auto;
  }

  .sec-gallery-grid {
    grid-template-columns: 1fr;
  }

  .sec-gallery-item,
  .sec-gallery-item:nth-child(4n + 1) {
    grid-column: auto;
    aspect-ratio: 4 / 3;
  }
}

/* ============================================================
   About & Contact page components (design-consistency pass)
   Extends prod-* / sec-* primitives; no token re-declaration.
   ============================================================ */

/* ---------- About: two-column background copy ---------- */
.sec-about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  border-top: 1px solid var(--line-strong);
  padding-top: 40px;
}

.sec-about-grid p {
  margin: 0;
  max-width: 560px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- About/Contact: textual technology groupings ---------- */
.sec-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.sec-tech-group {
  min-width: 0;
  padding: 28px 28px 34px 0;
  border-bottom: 1px solid var(--line-strong);
}

.sec-tech-group:nth-child(even) {
  padding-left: 28px;
  border-left: 1px solid var(--line-strong);
}

.sec-tech-label {
  display: block;
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sec-tech-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sec-tech-tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 13px;
}

/* ---------- Contact: full-width contact rows ---------- */
.sec-contact-rows {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.sec-contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 30px 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: background 180ms ease;
}

.sec-contact-row:hover {
  background: var(--panel);
}

.sec-contact-main {
  display: flex;
  align-items: baseline;
  gap: 28px;
  min-width: 0;
}

.sec-contact-index {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
}

.sec-contact-copy h3 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 550;
  letter-spacing: -0.045em;
}

.sec-contact-copy span {
  display: block;
  margin-top: 8px;
  color: var(--text-faint);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.sec-contact-arrow {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 20px;
  transition: color 160ms ease, transform 160ms ease;
}

.sec-contact-row:hover .sec-contact-arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* ---------- Responsive (mirrors sec-* breakpoints) ---------- */
@media (max-width: 980px) {
  .sec-about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sec-tech-grid {
    grid-template-columns: 1fr;
  }

  .sec-tech-group:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .sec-contact-main {
    gap: 18px;
  }
}

@media (max-width: 680px) {
  .sec-tech-group {
    padding: 22px 0 28px 0;
  }

  .sec-contact-row {
    padding: 24px 2px;
  }

  .sec-contact-main {
    align-items: flex-start;
    gap: 14px;
  }

  .sec-contact-copy h3 {
    font-size: 22px;
  }
}