/* ======================================================

   INDIVIDUAL PROJECT / CASE STUDY PAGES

====================================================== */

.project-page {
  width: 100%;

  background: var(--background);
  color: var(--text-primary);
}

/* ======================================================

   PROJECT LAYOUT

====================================================== */

.project-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 1088px);

  width: 100%;
  max-width: var(--hero-content-width);

  margin: 0 auto;
  padding: 72px 0 160px;

  gap: 64px;
}

/* ======================================================

   DESKTOP SIDEBAR

====================================================== */

.project-sidebar {
  position: sticky;
  top: 72px;

  align-self: start;

  width: 100%;
}

/* --------------------------
   Project Navigation Header
-------------------------- */

.project-sidebar-header {
  display: flex;
  align-items: center;

  gap: 10px;

  width: 100%;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 18px;
  height: 18px;

  color: #b5b5b5;

  text-decoration: none;

  transition:
    color var(--transition-fast),
    transform var(--transition-fast);
}

.project-back-link:hover {
  color: #3c3c3c;

  transform: translateX(-2px);
}

.project-back-link svg {
  display: block;

  width: 18px;
  height: 18px;
}

.project-sidebar-separator {
  color: #dfdfdf;

  font-size: 14px;
  font-weight: var(--font-weight-medium);

  line-height: 1.4;
  letter-spacing: -0.01em;
}

.project-sidebar-more {
  color: #b5b5b5;

  font-size: 14px;
  font-weight: var(--font-weight-medium);

  line-height: 1.4;
  letter-spacing: -0.01em;
}

.project-sidebar-title {
  margin: 0;

  color: #3c3c3c;

  font-size: 14px;
  font-weight: var(--font-weight-medium);

  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* --------------------------
   Sidebar Divider
-------------------------- */

.project-sidebar-divider {
  width: 100%;
  height: 1px;

  margin: 24px 0;

  background: #dfdfdf;
}

/* --------------------------
   On This Page
-------------------------- */

.project-sidebar-label {
  margin: 0 0 24px;

  color: #b5b5b5;

  font-size: 12px;
  font-weight: var(--font-weight-medium);

  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* --------------------------
   Sidebar Navigation
-------------------------- */

.project-sidebar-nav {
  display: flex;
  flex-direction: column;

  gap: 14px;
}

.project-sidebar-link {
  position: relative;

  display: block;

  width: 100%;

  padding-left: 0;

  color: #b5b5b5;

  font-size: 14px;
  font-weight: var(--font-weight-medium);

  line-height: 1.4;
  letter-spacing: -0.01em;

  text-decoration: none;

  transition:
    color var(--transition-fast),
    padding-left var(--transition-fast);
}

.project-sidebar-link::before {
  content: "";

  position: absolute;

  top: 50%;
  left: 0;

  width: 0;
  height: 1px;

  background: #dfdfdf;

  opacity: 0;

  transform: translateY(-50%);

  transition:
    width var(--transition-fast),
    opacity var(--transition-fast);
}

.project-sidebar-link:hover {
  color: #3e3e3e;
}

.project-sidebar-link.is-active {
  padding-left: 30px;

  color: #3e3e3e;
}

.project-sidebar-link.is-active::before {
  width: 20px;

  opacity: 1;
}

/* ======================================================

   PROJECT PAGE — SAY HELLO CTA

====================================================== */

/* ======================================================

   PROJECT PAGE — SAY HELLO CTA

====================================================== */

.project-sidebar-cta {
  align-self: flex-start;

  min-height: 38px;
  height: 38px;

  padding: 0 16px;

  font-size: 14px;
}

.project-sidebar-cta svg {
  width: 16px;
  height: 16px;
}

/* ======================================================

   TABLET / MOBILE PROJECT NAV

====================================================== */

.project-top-nav {
  display: none;
}

/* ======================================================

   PROJECT MAIN CONTENT

====================================================== */

.project-main {
  width: 100%;
  min-width: 0;
  max-width: 1088px;
}

.project-case-study {
  width: 100%;
}

/* ======================================================

   PROJECT OVERVIEW / HERO

====================================================== */

.project-overview {
  width: 100%;

  scroll-margin-top: 120px;
}

/* --------------------------
   Project Brand
-------------------------- */

.project-brand {
  display: flex;
  align-items: center;

  min-height: 20px;

  margin-bottom: 12px;
}

.project-brand-image {
  display: block;

  width: auto;
  max-width: 120px;
  height: 20px;

  object-fit: contain;
  object-position: left center;
}

/* --------------------------
   Project Topic Group
-------------------------- */

.project-topic-group {
  display: flex;
  flex-direction: column;

  gap: 12px;
}

.project-topic {
  margin: 0;

  color: var(--text-primary);

  font-size: 24px;
  font-weight: var(--font-weight-extrabold);

  line-height: 1.4;
  letter-spacing: -0.02em;
}

.project-description {
  max-width: 920px;

  margin: 0;

  color: #696969;

  font-size: 16px;
  font-weight: var(--font-weight-regular);

  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* --------------------------
   Divider
-------------------------- */

.project-divider {
  width: 100%;
  height: 1px;

  margin: 32px 0;

  background: #dfdfdf;
}

/* --------------------------
   CTA + Tags
-------------------------- */

.project-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 12px;
}

.project-visit-link,
.project-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 42px;

  padding: 8px 14px;

  border-radius: 999px;

  font-size: 14px;
  font-weight: var(--font-weight-regular);

  line-height: 1.4;
  letter-spacing: -0.01em;

  white-space: nowrap;
}

/* --------------------------
   Visit Project CTA
-------------------------- */

.project-visit-link {
  gap: 6px;

  color: #1683ff;

  border: 1px solid rgba(22, 131, 255, 0.28);

  text-decoration: none;

  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.project-visit-link:hover {
  background: rgba(22, 131, 255, 0.06);
  border-color: rgba(22, 131, 255, 0.42);

  transform: translateY(-1px);
}

.project-visit-link svg {
  flex: 0 0 auto;

  width: 18px;
  height: 18px;
}

/* --------------------------
   Project Tags
-------------------------- */

.project-tag {
  gap: 6px;

  color: #3c3c3c;

  border: 1px solid #dfdfdf;
}

.project-tag svg {
  flex: 0 0 auto;

  width: 18px;
  height: 18px;

  color: #b5b5b5;
}

/* Non-disclosure tag */
.project-tag--nda {
  background: #fffbfa;
  color: #eb5b33;
  border: 1px solid transparent;
}

.project-tag--nda svg {
  width: 18px;
  height: 18px;
  color: #eb5b33;
}

/* --------------------------
   Project Hero Image
-------------------------- */

.project-hero-media {
  width: 100%;

  margin: 0;
}

.project-hero-image {
  display: block;

  width: 100%;
  height: auto;

  aspect-ratio: 1088 / 540;

  object-fit: cover;
  object-position: center;

  border-radius: 28px;
}

/* ======================================================

   CASE STUDY BODY

====================================================== */

.project-body {
  width: 100%;

  margin-top: 48px;
}

/* --------------------------
   Sections
-------------------------- */

.project-section {
  width: 100%;

  scroll-margin-top: 120px;
}

.project-section + .project-section {
  margin-top: 48px;
}

/* --------------------------
   Overline
-------------------------- */

.project-overline {
  margin: 0 0 0px;

  color: #b5b5b5;

  font-size: 14px;
  font-weight: var(--font-weight-medium);

  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* --------------------------
   Section Title
-------------------------- */

.project-section-title {
  margin: 0 0 4px;

  color: var(--text-primary);

  font-size: 18px;
  font-weight: var(--font-weight-semibold);

  line-height: 1.6;
  letter-spacing: -0.02em;
}

/* --------------------------
   Body Copy
-------------------------- */

.project-copy {
  width: 100%;

  color: #696969;

  font-size: 16px;
  font-weight: var(--font-weight-regular);

  line-height: 1.6;
  letter-spacing: -0.01em;
}

.project-copy p {
  margin: 0;
}

.project-copy p + p {
  margin-top: 12px;
}

/* ========================================
   INLINE BRAND PILL
======================================== */

.project-copy--medium {
  font-weight: 500;
}

.project-inline-pill {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 4px;

  padding: 2px 8px 2px 6px;
  margin-right: 4px;

  border-radius: 999px;
  background: #fafafa;

  color: #0052a5;
  font-size: 1em;
  font-weight: 500;
  line-height: 1.4;

  white-space: nowrap;
}

.project-inline-pill-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ======================================================

   SECTIONS WITH MEDIA

====================================================== */

/*
   Normal title → body spacing = 12px.

   When media comes directly after a section title,
   the intended spacing is 24px.
*/

.project-section--media .project-section-title {
  margin-bottom: 4px;
}

/* ======================================================

   PROJECT MEDIA

====================================================== */

.project-media {
  width: 100%;

  margin: 24px 0 0;
}

/* Spacing between captioned media and following text */
.project-media--with-following-text {
  margin-bottom: 24px;
}

/*
   Image/media followed by another image/media:
   24px.
*/

.project-media + .project-media {
  margin-top: 24px;
}

.project-media img,
.project-media video {
  display: block;

  width: 100%;
}

/* --------------------------
   Single Project Image
-------------------------- */

.project-image {
  display: block;

  width: 100%;
  height: auto;

  object-fit: contain;
}

/* --------------------------
   Phone Mockup Group
-------------------------- */

.project-phone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));

  align-items: end;

  width: 100%;

  gap: 16px;
}

.project-phone {
  display: block;

  width: 100%;
  height: auto;

  object-fit: contain;
}

/* --------------------------
   Feature Video
-------------------------- */

.project-video {
  display: block;

  width: 100%;
  height: auto;

  aspect-ratio: 1728 / 1040;

  object-fit: cover;

  background: #f1f1f1;

  border-radius: 28px;
}

/* --------------------------
   Media Caption
-------------------------- */

.project-caption {
  margin: 8px 0 0;

  color: #b5b5b5;

  font-size: 14px;
  font-weight: var(--font-weight-medium);

  line-height: 1.6;
  letter-spacing: -0.01em;

  text-align: center;
}

/* ======================================================

   PROJECT FOOTER

====================================================== */

.project-page .site-footer {
  margin-top: 0;
}

/* ======================================================

   RESPONSIVE — MEDIUM DESKTOP

====================================================== */

@media (max-width: 1599px) {
  .project-layout {
    grid-template-columns: 176px minmax(0, 1fr);

    padding-top: 68px;
    padding-bottom: 150px;

    gap: 56px;
  }

  .project-sidebar {
    top: 68px;
  }

  .project-main {
    max-width: none;
  }
}

/* ======================================================

   RESPONSIVE — TABLET

====================================================== */

@media (max-width: 1199px) {
  /* --------------------------
     Layout
  -------------------------- */

  .project-layout {
    display: block;

    width: 100%;
    max-width: var(--hero-content-width);

    margin: 0 auto;

    padding: 112px var(--page-padding) 120px;
  }

  /* --------------------------
     Desktop Sidebar
  -------------------------- */

  .project-sidebar {
    display: none;
  }

  /* --------------------------
     Tablet / Mobile Navigation
  -------------------------- */

  .project-top-nav {
    position: fixed;
    z-index: 900;

    top: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    padding: 16px var(--page-padding);

    background: #ffffff;

    border: 0;
    border-radius: 0;

    box-shadow: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .project-top-nav-left {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 10px;
  }

  .project-top-nav-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 20px;
    height: 20px;

    color: #b5b5b5;

    text-decoration: none;
  }

  .project-top-nav-back svg {
    display: block;

    width: 20px;
    height: 20px;
  }

  .project-top-nav-separator,
  .project-top-nav-more {
    flex: 0 0 auto;

    color: #dfdfdf;

    font-size: 14px;
    font-weight: var(--font-weight-medium);

    line-height: 1.4;
    letter-spacing: -0.01em;
  }

  .project-top-nav-title {
    overflow: hidden;

    margin: 0;

    color: #3c3c3c;

    font-size: 14px;
    font-weight: var(--font-weight-medium);

    line-height: 1.4;
    letter-spacing: -0.01em;

    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .project-top-nav .nav-link--contact {
    min-height: 38px;
    height: 38px;

    padding: 0 14px;

    font-size: 14px;
  }

  .project-top-nav .nav-link--contact .nav-icon {
    width: 16px;
    height: 16px;
  }

  /* --------------------------
     Main Content
  -------------------------- */

  .project-main {
    width: 100%;
    max-width: 1088px;

    margin: 0 auto;
  }

  .project-topic {
    font-size: 22px;
  }

  .project-description {
    font-size: 18px;
  }

  .project-visit-link,
  .project-tag {
    font-size: 16px;
  }

  .project-hero-image,
  .project-video {
    border-radius: 24px;
  }
}

/* ======================================================

   RESPONSIVE — MOBILE

====================================================== */

@media (max-width: 767px) {
  /* --------------------------
     Layout
  -------------------------- */

  .project-layout {
    padding: 100px var(--page-padding) 90px;
  }

  /* --------------------------
     Top Navigation
  -------------------------- */

  .project-top-nav-left {
    gap: 8px;
  }

  .project-top-nav-separator,
  .project-top-nav-more,
  .project-top-nav-title {
    font-size: 12px;
  }

  /* --------------------------
     Project Overview
  -------------------------- */

  .project-brand {
    margin-bottom: 10px;
  }

  .project-brand-image {
    max-width: 100px;
    height: 18px;
  }

  .project-topic-group {
    gap: 10px;
  }

  .project-topic {
    font-size: 20px;
  }

  .project-description {
    font-size: 16px;
  }

  .project-divider {
    margin: 28px 0;
  }

  /* --------------------------
     Metadata
  -------------------------- */

  .project-meta {
    gap: 8px;
  }

  .project-visit-link,
  .project-tag {
    min-height: 38px;

    padding: 7px 12px;

    font-size: 14px;
  }

  .project-visit-link svg,
  .project-tag svg {
    width: 16px;
    height: 16px;
  }

  /* --------------------------
     Hero
  -------------------------- */

  .project-hero-image {
    border-radius: 20px;
  }

  /* --------------------------
     Body
  -------------------------- */

  .project-body {
    margin-top: 48px;
  }

  .project-section + .project-section {
    margin-top: 48px;
  }

  .project-overline {
    font-size: 14px;
  }

  .project-section-title {
    font-size: 18px;
  }

  .project-copy {
    font-size: 16px;
  }

  /* --------------------------
     Phone Mockups
  -------------------------- */

  .project-phone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
  }

  /* --------------------------
     Media
  -------------------------- */

  .project-video {
    border-radius: 20px;
  }

  .project-caption {
    font-size: 14px;
  }
}

/* ======================================================

   RESPONSIVE — SMALL MOBILE

====================================================== */

@media (max-width: 479px) {
  .project-email-safe {
    overflow-wrap: anywhere;
  }

  .project-phone-grid {
    gap: 10px;
  }
}

/* ======================================================

   FOCUS STATES

====================================================== */

.project-back-link:focus-visible,
.project-sidebar-link:focus-visible,
.project-top-nav-back:focus-visible,
.project-top-nav-cta:focus-visible,
.project-visit-link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

/* ======================================================

   REDUCED MOTION

====================================================== */

@media (prefers-reduced-motion: reduce) {
  .project-sidebar-link,
  .project-sidebar-link::before,
  .project-back-link,
  .project-visit-link {
    transition: none;
  }
}
