/* ============================================================
   Projects page (Phase 6-C — final main page build)
   Hero (bone) → Featured row (2 large) → Grid (6 cards) →
   Final CTA → Footer chrome.
   Two creative touches: running PROJECT 00N / 008 counter (fixed
   top-right) and alternating clip-path reveal on grid cards
   (odd → LTR, even → RTL). No 3D, no ScrollTrigger pinning.
   ============================================================ */

main { padding-block-start: 0; }

/* ============================================================
   SECTION 1 — HERO (bone, brief)
   ============================================================ */

.projects-hero {
  position: relative;
  min-height: 60vh;
  min-height: 60svh;
  background: var(--c-bone);
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(120px, 14vw, 200px) clamp(80px, 8vw, 120px);
  padding-inline: clamp(24px, 5vw, 96px);
  display: flex;
  align-items: center;
}

.projects-hero__inner {
  max-width: 1200px;
  margin-inline: auto;
  inline-size: 100%;
}

.projects-hero .eyebrow {
  color: rgba(18, 63, 109, 0.60);
  margin-block-end: 32px;
}

.projects-hero__title {
  font-family: var(--ff-display);
  font-variation-settings: var(--fvar-display);
  font-size: clamp(56px, 8vw, 144px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--c-text-strong);
  margin: 0;
  max-width: 16ch;
}

.projects-hero__sub {
  font-family: var(--ff-sans);
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--c-text);
  max-width: 56ch;
  margin-block-start: 32px;
}

.brand-corner--projects-hero {
  --bc-w: clamp(180px, 18vw, 320px);
  --bc-h: clamp(64px, 9vw, 200px);
  z-index: 1;
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 70% 100%);
}

@media (max-width: 768px) {
  .brand-corner--projects-hero {
    --bc-w: clamp(120px, 32vw, 200px);
    --bc-h: clamp(40px, 8vw, 70px);
  }
}

.js .projects-hero__title[data-mask] .mask__inner { transform: translateY(100%); }
.js .projects-hero .eyebrow,
.js .projects-hero__sub { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .js .projects-hero__title[data-mask] .mask__inner { transform: none; }
  .js .projects-hero .eyebrow,
  .js .projects-hero__sub { opacity: 1; }
}

/* ============================================================
   SECTION 2 — FEATURED ROW (2 large tiles)
   ============================================================ */

.projects-featured {
  background: var(--c-bone);
  padding-block: clamp(80px, 8vw, 160px);
  padding-inline: clamp(24px, 5vw, 96px);
}

.projects-featured__inner {
  max-width: 1400px;
  margin-inline: auto;
}

.projects-featured__header {
  margin-block-end: clamp(48px, 5vw, 80px);
  max-width: 720px;
}

.projects-featured__header .eyebrow {
  color: rgba(18, 63, 109, 0.60);
  margin: 0 0 16px;
}

.projects-featured__title {
  font-family: var(--ff-display);
  font-variation-settings: var(--fvar-display);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-text-strong);
  margin: 0;
}

.projects-featured__grid {
  display: grid;
  gap: clamp(32px, 4vw, 64px);
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .projects-featured__grid { grid-template-columns: 1fr 1fr; }
}

.projects-featured__video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c-line);
}

.projects-featured__video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
}

.project-featured {
  display: block;
  text-decoration: none;
  color: var(--c-text-strong);
  cursor: pointer;
}

.project-featured__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-block-end: 24px;
  background: var(--c-line);
}

.project-featured__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.project-featured:hover .project-featured__image,
.project-featured:focus-visible .project-featured__image {
  transform: scale(1.05);
}

.project-featured__meta {
  position: relative;
  padding-block-start: 8px;
}

.project-featured__category {
  font-family: var(--ff-sans);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(18, 63, 109, 0.65);
  margin: 0 0 12px;
}

.project-featured__title {
  font-family: var(--ff-display);
  font-variation-settings: var(--fvar-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--c-text-strong);
  margin: 0 0 8px;
}

.project-featured__location {
  font-family: var(--ff-sans);
  font-size: clamp(14px, 1.1vw, 17px);
  color: var(--c-text);
  margin: 0;
}

.project-featured__arrow {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 0;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--c-orange);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-featured:hover .project-featured__arrow {
  transform: translateX(8px);
}

.project-featured:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 8px;
}

.js .project-featured { opacity: 0; transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  .js .project-featured { opacity: 1; transform: none; }
  .project-featured__image,
  .project-featured__arrow { transition-duration: 0ms; }
  .project-featured:hover .project-featured__image { transform: none; }
  .project-featured:hover .project-featured__arrow { transform: none; }
}

/* ============================================================
   SECTION 3 — PORTFOLIO GRID (6 cards)
   Alternating clip-path reveal — odd cards LTR, even cards RTL
   (initial clip-path set per-card by initProjectsGrid()).
   ============================================================ */

.projects-grid {
  background: var(--c-bone);
  padding-block: var(--section-py);
  padding-inline: clamp(24px, 5vw, 96px);
  border-block-start: 1px solid var(--c-line);
}

.projects-grid__inner {
  max-width: 1400px;
  margin-inline: auto;
}

.projects-grid__header {
  margin-block-end: clamp(48px, 5vw, 80px);
  max-width: 720px;
}

.projects-grid__header .eyebrow {
  color: rgba(18, 63, 109, 0.60);
  margin: 0 0 16px;
}

.projects-grid__title {
  font-family: var(--ff-display);
  font-variation-settings: var(--fvar-display);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-text-strong);
  margin: 0;
}

.projects-grid__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: clamp(32px, 4vw, 64px);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .projects-grid__list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .projects-grid__list { grid-template-columns: repeat(3, 1fr); }
}

.project-card__link {
  display: block;
  text-decoration: none;
  color: var(--c-text-strong);
  cursor: pointer;
}

.project-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-block-end: 20px;
  background: var(--c-line);
}

.project-card__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.project-card__link:hover .project-card__image,
.project-card__link:focus-visible .project-card__image {
  transform: scale(1.05);
}

.project-card__meta {
  padding-block-start: 4px;
}

.project-card__category {
  font-family: var(--ff-sans);
  font-size: clamp(11px, 0.85vw, 12px);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(18, 63, 109, 0.65);
  margin: 0 0 8px;
}

.project-card__title {
  font-family: var(--ff-display);
  font-variation-settings: var(--fvar-heading);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--c-text-strong);
  margin: 0 0 6px;
}

.project-card__location {
  font-family: var(--ff-sans);
  font-size: clamp(13px, 1vw, 15px);
  color: var(--c-text);
  margin: 0;
}

.project-card__link:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .project-card__image { transition-duration: 0ms; }
  .project-card__link:hover .project-card__image { transform: none; }
}

/* ============================================================
   FINAL CTA — duplicated verbatim from home-sections.css
   (same approach as About / Services). The existing
   initFinalCta() picks this up automatically.
   ============================================================ */

.final-cta {
  position: relative;
  background: var(--c-navy);
  color: var(--c-bone);
  padding-block: var(--section-py);
  padding-inline: clamp(24px, 5vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

.final-cta__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
}

.final-cta__bg-orb {
  display: block;
  inline-size: clamp(400px, 60vw, 900px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(247, 148, 29, 0.10) 0%,
    rgba(247, 148, 29, 0.04) 40%,
    transparent 75%);
  filter: blur(20px);
  will-change: transform;
}

.final-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.final-cta__layer-2 {
  position: relative;
  inline-size: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

.final-cta__eyebrow {
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}
.final-cta__eyebrow::before { background: currentColor; }

.final-cta__heading {
  font-family: var(--ff-display);
  font-variation-settings: var(--fvar-display);
  font-size: clamp(56px, 8vw, 144px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--c-bone);
  text-align: center;
  margin-block: var(--sp-3) 0;
  max-inline-size: 14ch;
}

.final-cta__sub {
  font-family: var(--ff-sans);
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.5;
  color: rgba(241, 242, 242, 0.85);
  max-inline-size: 50ch;
  text-align: center;
  margin-block-start: var(--sp-4);
}

.final-cta__btn {
  margin-block-start: var(--sp-5);
  transform: translate3d(var(--btn-mag-x), var(--btn-mag-y), 0);
  transition: transform var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.js .final-cta__heading[data-mask] .mask__inner { transform: translateY(100%); }
.js .final-cta__eyebrow,
.js .final-cta__sub,
.js .final-cta__btn { opacity: 0; }
.js .final-cta__bg-orb { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .js .final-cta__heading[data-mask] .mask__inner { transform: none; }
  .js .final-cta__eyebrow,
  .js .final-cta__sub,
  .js .final-cta__btn { opacity: 1; }
  .js .final-cta__bg-orb { opacity: 1; }
}
