:root {
  --project-cream: #fafaf8;
  --project-gold: #ecc368;
  --project-gold-dark: #c69a52;
  --project-gold-light: #f2ddb4;
  --project-purple-dark: #120719;
  --project-purple: #500082;
  --project-ink: #120719;
  --project-muted: #6c6470;
}

* {
  box-sizing: border-box;
}

body.page-projects {
  margin: 0;
  background: #ffffff;
  color: var(--project-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.page-projects header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 28px 50px;
}

.page-projects header nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-projects header nav a {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
}

.page-projects header nav a[aria-current="page"] {
  color: var(--project-gold);
}

.projects-hero {
  position: relative;
  min-height: 802px;
  overflow: hidden;
}

.projects-hero > picture {
  display: contents;
}

.projects-hero > picture > img,
.projects-hero > img,
.projects-image-break img,
.project-card > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-hero > picture > img,
.projects-hero > img {
  position: absolute;
  inset: 0;
}

.projects-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.31);
}

.projects-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(1326px, calc(100% - 100px));
  min-height: 802px;
  margin: 0 auto;
  padding-bottom: 84px;
  color: #ffffff;
}

.projects-hero__content > * {
  max-width: 552px;
}

.eyebrow {
  margin: 0;
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.projects-hero__eyebrow {
  color: #ffffff;
}

.rule {
  display: block;
  width: 40px;
  height: 1px;
}

.projects-hero__rule {
  margin-top: 15px;
  background: #ffffff;
}

.projects-hero h1 {
  max-width: 720px;
  margin: 28px 0 0;
  color: #ffffff;
  font-family: "Canela Deck", "Lora", Georgia, "Times New Roman", serif;
  font-size: 80px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.5px;
}

.projects-hero__text {
  max-width: 552px;
  margin: 26px 0 0;
  color: #ffffff;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
}

.projects-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 280px;
  min-height: 40px;
  margin-top: 32px;
  padding: 12px 24px;
  background: linear-gradient(90deg, var(--project-gold-dark), var(--project-gold-light));
  color: #ffffff;
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.selected-projects {
  background: var(--project-cream);
  padding: 119px 0 100px;
}

.selected-projects__header,
.projects-grid {
  width: min(1200px, calc(100% - 80px));
  margin: 0 auto;
}

.selected-projects__eyebrow {
  color: var(--project-gold);
}

.selected-projects__rule {
  margin-top: 15px;
  background: var(--project-gold);
}

.selected-projects h2 {
  margin: 35px 0 66px -5px;
  background: linear-gradient(90deg, var(--project-purple-dark) 14%, var(--project-purple) 93%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "Canela Deck", "Lora", Georgia, "Times New Roman", serif;
  font-size: 96px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 40px;
}

.project-card {
  position: relative;
  display: block;
  min-height: 440px;
  overflow: hidden;
  background: var(--project-cream);
  border: 1px solid #e8e8e8;
  color: inherit;
  text-decoration: none;
}

.project-card[href]:focus-visible {
  outline: 2px solid var(--project-gold);
  outline-offset: 4px;
}

.project-card--full {
  grid-column: span 6;
  height: 640px;
}

.project-card--half {
  grid-column: span 3;
  height: 500px;
}

.project-card--wide {
  grid-column: span 4;
  height: 520px;
}

.project-card--narrow,
.project-card--third {
  grid-column: span 2;
  height: 520px;
}

.project-card--third {
  height: 440px;
}

.project-card--final {
  height: 540px;
}

.project-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(108, 108, 108, 0) 67%, #181818 100%);
}

.project-card__content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  color: #ffffff;
}

.project-card__number {
  margin: 0 0 14px;
  color: #c9a961;
  font-family: "Playfair Display", "Lora", Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1;
}

.project-card h3 {
  margin: 0;
  color: inherit;
  font-family: "Canela Deck", "Lora", Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

.project-card__content > p:last-child {
  margin: 8px 0 0;
  color: inherit;
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  font-size: 10px;
  line-height: 1.25;
  text-transform: uppercase;
}

.project-card__mark {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 15px;
  height: 15px;
}

.project-card__mark::before,
.project-card__mark::after {
  position: absolute;
  content: "";
  background: #c9a961;
}

.project-card__mark::before {
  top: 0;
  right: 0;
  width: 14px;
  height: 1px;
}

.project-card__mark::after {
  top: 0;
  right: 0;
  width: 1px;
  height: 14px;
}

.projects-cta {
  background: linear-gradient(90deg, var(--project-purple-dark) 14%, var(--project-purple) 93%);
  color: #ffffff;
}

.projects-cta__inner {
  width: min(1200px, calc(100% - 80px));
  min-height: 420px;
  margin: 0 auto;
  padding: 73px 0 80px;
}

.projects-cta h2 {
  margin: 0;
  color: #ffffff;
  font-family: "Canela Deck", "Lora", Georgia, "Times New Roman", serif;
  font-size: 56px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
}

.projects-cta h2 span {
  background: linear-gradient(90deg, var(--project-gold-dark), var(--project-gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.projects-cta p {
  width: min(399px, 100%);
  margin: 24px 0 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
}

.projects-button--gold {
  min-width: 300px;
  min-height: 60px;
  margin-top: 31px;
  letter-spacing: 3.6px;
}

.projects-image-break {
  height: 687px;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .page-projects header {
    padding: 24px 32px;
  }

  .page-projects header nav ul {
    gap: 22px;
  }

  .projects-hero {
    min-height: 720px;
  }

  .projects-hero__content {
    width: calc(100% - 80px);
    min-height: 720px;
    padding-bottom: 72px;
  }

  .projects-hero h1,
  .selected-projects h2 {
    font-size: 76px;
  }

  .selected-projects {
    padding-top: 92px;
  }

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

  .project-card--full,
  .project-card--wide,
  .project-card--final {
    grid-column: span 2;
  }

  .project-card--half,
  .project-card--narrow,
  .project-card--third {
    grid-column: span 1;
  }

  .project-card--full {
    height: 540px;
  }

  .project-card--half,
  .project-card--wide,
  .project-card--narrow {
    height: 440px;
  }

  .project-card--third {
    height: 390px;
  }
}

@media (max-width: 760px) {
  .page-projects header {
    padding: 20px 24px;
  }

  .page-projects header nav ul {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px 18px;
  }

  .page-projects header nav a {
    font-size: 11px;
    letter-spacing: 1.4px;
  }

  .projects-hero {
    min-height: 640px;
  }

  .projects-hero__content {
    width: calc(100% - 48px);
    min-height: 640px;
    padding-bottom: 60px;
  }

  .projects-hero h1,
  .selected-projects h2 {
    font-size: 58px;
  }

  .projects-hero__text {
    font-size: 16px;
    line-height: 23px;
  }

  .selected-projects {
    padding: 72px 0 72px;
  }

  .selected-projects__header,
  .projects-grid,
  .projects-cta__inner {
    width: min(100% - 48px, 1200px);
  }

  .selected-projects h2 {
    margin-bottom: 42px;
  }

  .projects-grid {
    gap: 24px;
  }

  .projects-cta h2 {
    font-size: 42px;
  }

  .projects-image-break {
    height: 460px;
  }
}

@media (max-width: 486px) {
  .page-projects header {
    position: absolute;
    padding: 18px 20px;
  }

  .page-projects header nav ul {
    gap: 12px 16px;
  }

  .projects-hero {
    min-height: 610px;
  }

  .projects-hero__content {
    width: calc(100% - 40px);
    min-height: 610px;
    padding-bottom: 48px;
  }

  .projects-hero h1 {
    margin-top: 34px;
    font-size: 48px;
    line-height: 0.98;
  }

  .projects-hero__text {
    margin-top: 24px;
    font-size: 15px;
    line-height: 22px;
  }

  .projects-button {
    width: min(100%, 280px);
    min-width: 0;
    letter-spacing: 3px;
  }

  .selected-projects {
    padding: 58px 0 58px;
  }

  .selected-projects__header,
  .projects-grid,
  .projects-cta__inner {
    width: calc(100% - 32px);
  }

  .selected-projects h2 {
    margin: 29px 0 34px;
    font-size: 44px;
  }

  .projects-grid {
    display: block;
  }

  .project-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    margin-bottom: 24px;
    overflow: visible;
    background: #ffffff;
  }

  .project-card > img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .project-card__shade,
  .project-card__mark {
    display: none;
  }

  .project-card__content {
    position: static;
    padding: 14px 0 18px;
    color: var(--project-ink);
  }

  .project-card__number {
    margin-bottom: 10px;
    color: #c9a961;
  }

  .project-card h3 {
    color: var(--project-ink);
    font-size: 22px;
  }

  .project-card__content > p:last-child {
    color: var(--project-muted);
  }

  .projects-cta__inner {
    min-height: 360px;
    padding: 54px 0 60px;
  }

  .projects-cta h2 {
    font-size: 34px;
  }

  .projects-button--gold {
    min-height: 56px;
  }

  .projects-image-break {
    height: 330px;
  }
}

/* Scroll reveal — staggered fade + rise */
@media (prefers-reduced-motion: no-preference) {
  .page-projects [data-reveal] > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    will-change: opacity, transform;
  }

  .page-projects [data-reveal].is-revealed > * {
    opacity: 1;
    transform: none;
  }

  .page-projects [data-reveal].is-revealed > *:nth-child(1) { transition-delay: 0s; }
  .page-projects [data-reveal].is-revealed > *:nth-child(2) { transition-delay: 0.08s; }
  .page-projects [data-reveal].is-revealed > *:nth-child(3) { transition-delay: 0.16s; }
  .page-projects [data-reveal].is-revealed > *:nth-child(4) { transition-delay: 0.24s; }
  .page-projects [data-reveal].is-revealed > *:nth-child(5) { transition-delay: 0.32s; }
  .page-projects [data-reveal].is-revealed > *:nth-child(6) { transition-delay: 0.4s; }

  /* project cards and the image break carry a border / are single visuals —
     animate the whole element so the border fades in with the image */
  .page-projects .project-card[data-reveal],
  .page-projects .projects-image-break[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    will-change: opacity, transform;
  }

  .page-projects .project-card[data-reveal].is-revealed,
  .page-projects .projects-image-break[data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }

  .page-projects .project-card[data-reveal] > *,
  .page-projects .projects-image-break[data-reveal] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* CTA — work-cta style (mirrors the project pages) */
.work-cta {
  margin-top: 70px;
  background: linear-gradient(90deg, #120719 14%, #500082 93%);
  color: #ffffff;
}

.work-cta__inner {
  width: min(1200px, calc(100% - 100px));
  min-height: 350px;
  margin: 0 auto;
  padding: 67px 0 76px;
}

.work-eyebrow {
  margin: 0;
  color: #c9a961;
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

.work-cta .work-eyebrow {
  color: #ecc368;
}

.work-rule {
  display: block;
  width: 40px;
  height: 1px;
  margin-top: 15px;
  background: currentColor;
  color: #c9a961;
}

.work-cta h2 {
  max-width: 680px;
  margin: 18px 0 0;
  color: #ffffff;
  font-family: "Canela Deck", "Lora", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 48px;
  font-style: italic;
  line-height: 1.1;
}

.work-cta h2 span {
  background: linear-gradient(90deg, #c69a52, #f2ddb4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.work-cta p:not(.work-eyebrow) {
  width: min(430px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.65;
}

.work-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 42px;
  margin-top: 27px;
  padding: 13px 24px;
  background: linear-gradient(90deg, #c69a52, #f2ddb4);
  color: #120719;
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .work-cta__inner {
    width: min(920px, calc(100% - 64px));
  }
}

@media (max-width: 760px) {
  .work-cta {
    margin-top: 48px;
  }

  .work-cta__inner {
    width: calc(100vw - 44px);
    max-width: calc(100% - 44px);
    min-height: 320px;
    padding: 54px 0 60px;
  }

  .work-cta h2 {
    max-width: calc(100vw - 44px);
    font-size: 38px;
  }

  .work-cta h2 span {
    display: block;
  }

  .work-cta p:not(.work-eyebrow) {
    max-width: calc(100vw - 44px);
  }
}

@media (max-width: 486px) {
  .work-cta__inner {
    width: calc(100vw - 44px);
    max-width: calc(100% - 44px);
  }

  .work-cta h2 {
    max-width: calc(100vw - 44px);
  }

  .work-cta p:not(.work-eyebrow) {
    width: min(100%, 340px);
    max-width: min(100%, 340px);
  }

  .work-button {
    width: 100%;
    min-width: 0;
  }
}
