/* 
  Project Template Structural Rewrite
  Exact 11-step blueprint
*/

@font-face {
  font-family: "PP Editorial New";
  src: url('../assets/fonts/PPEditorialNew-Regular.otf') format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.st-layout {
  width: 100%;
  font-family: "Inter", sans-serif;
  color: #f5f2e4;
}

/* Pull Quote Section */
.st-layout .st-pull-quote,
.st-pull-quote {
  width: 100%;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 200px 24px !important;
  box-sizing: border-box !important;
}

.st-layout .st-pull-quote-container,
.st-pull-quote-container {
  width: 100%;
  max-width: 1500px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.st-layout .pull-quote-text,
.st-pull-quote .pull-quote-text,
.pull-quote-text {
  font-family: "PP Editorial New", Georgia, serif !important;
  /* FIGMA REFERENCE: 70px (~4.375rem) at desktop width (1440px+). Adjust clamp() parameters below if needed. */
  font-size: clamp(1.75rem, 4vw + 1rem, 4.375rem) !important;
  font-weight: 400 !important;
  line-height: 1.18 !important;
  color: #f5f2e4 !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 767px) {
  .st-layout .st-pull-quote,
  .st-pull-quote {
    padding: 60px 20px !important;
  }
}

/* Global utility classes */
.st-layout p {
  line-height: 1.5 !important;
}

.st-bg-dark {
  background-color: var(--_frshlybaked-tokens---color-dark-main, #202020);
}

.st-full-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.text-left { text-align: left; }

.st-bold-heading {
  font-family: var(--_frshlybaked-tokens---main-heading-can-reg, "Frshly Display", serif);
  font-size: clamp(3.3rem, 5vw, 4.55rem);
  font-weight: 400; /* changed from 700 to prevent Safari faux-bold */
  text-transform: uppercase;
  margin-bottom: 24px;
  line-height: 1.1;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1.st-main-title {
  font-family: var(--_frshlybaked-tokens---main-heading-can-reg, "Frshly Display", serif);
  font-size: clamp(3.96rem, 6vw, 5.46rem); /* 20% larger than section H2s */
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: 24px;
  line-height: 1.1;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.st-muted-text {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.5 !important;
  opacity: 0.85;
  margin-bottom: 16px;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
}

.st-brand-text {
  font-family: "Google Sans Flex 36pt", sans-serif;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.5 !important;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
  margin-bottom: 16px;
}

.st-deliverables-text {
  font-family: var(--_frshlybaked-tokens---main-body-family), "Google Sans Flex", sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5 !important;
  color: #ffffff;
  opacity: 0.9;
  text-align: center;
  text-transform: uppercase;
  margin-top: 90px;
  margin-bottom: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.st-deliverables-label {
  font-weight: 700;
  color: #ffffff;
  opacity: 1;
}

@media (max-width: 767px) {
  .st-deliverables-text {
    font-size: 0.875rem;
    line-height: 1.5 !important;
    margin-top: 60px;
  }
}

/* 1. Hero */
.st-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Option 2: Dual-Section Seam Blur Bridge (Blurs bottom of hero & top of next section together) */
.st-hero-wrap {
  position: relative;
  width: 100%;
}

.st-seam-blur-bridge {
  position: absolute;
  top: 100vh;
  left: 0;
  width: 100%;
  height: 280px;
  transform: translateY(-50%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  pointer-events: none;
  z-index: 10;
  will-change: transform, backdrop-filter;
}

@media (max-width: 767px) {
  .st-seam-blur-bridge {
    height: 180px;
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
  }
}

/* 2. Text central */
.st-text-central {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 100px 24px;
}

.st-text-container {
  max-width: 1000px;
  margin: 0 auto;
}

.st-small-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
}



/* 3. Device mockups */
.st-device-mockups {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 60px 24px;
}

.st-mockup-frame {
  background-color: #ffffff;
  border-radius: 40px;
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 320px;
}

.st-mockup-frame img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  display: block;
}

.st-mockup-left {
  align-self: flex-end;
  height: 480px; /* shorter */
  margin-top: 80px; /* offset lower visually if container is taller */
}

.st-mockup-left img {
  height: 100%;
  object-fit: cover;
}

.st-mockup-right {
  align-self: flex-start;
  height: 560px; /* taller */
}

.st-mockup-right img {
  height: 100%;
  object-fit: cover;
}

/* 4, 6, 8, 10. Image central */
.st-image-central {
  width: 100%;
  overflow: hidden;
  padding: 10px;
  background-color: #202020;
  box-sizing: border-box;
}

.st-image-central picture {
  display: block;
  width: 100%;
}

.st-h-700,
.st-h-750 {
  width: 100%;
  height: 900px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.st-h-full { height: 100%; }

/* Prevent double-stacking (10px + 10px = 20px) between adjacent media blocks: ensures vertical gap is strictly 10px */
.st-image-central + .st-image-central,
.st-image-central + .video-player,
.video-player + .st-image-central,
.video-player + .video-player,
.st-grid-split + .video-player,
.video-player + .st-grid-split {
  padding-top: 0 !important;
}

/* Desktop only: ensure 10px padding top on full bleed image (st-h-750) below Design Direction */
@media screen and (min-width: 992px) {
  .st-grid-split + .st-image-central {
    padding-top: 10px !important;
  }
}

/* 5. Brief */
.st-brief {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 24px;
  width: 100%;
  box-sizing: border-box;
}

.st-brief-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 80px;
}

.st-brief-content {
  flex: 1 1 65%;
  max-width: 800px;
  text-align: left;
}

.st-brief-meta {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px !important;
  text-align: left;
  align-self: center;
}

.st-brief-meta-row {
  font-family: var(--_frshlybaked-tokens---main-body-family), "Google Sans Flex", sans-serif;
  font-size: 1rem;
  line-height: 1.5 !important;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
}

.st-brief-meta-label {
  font-weight: 700;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
  margin-right: 6px;
}

.st-brief-meta-value {
  font-weight: 300;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
  opacity: 0.85;
}

@media screen and (max-width: 991px) {
  .st-brief-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .st-brief-content {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .st-brief-meta {
    flex: 1 1 100%;
    width: 100%;
    gap: 6px !important;
  }
}



/* 7 & 9. Grid Split */
.st-grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 1400px; /* ~100vh */
  padding: 0 10px;
  background-color: #202020;
}

.st-split-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.st-split-text-inner {
  max-width: 100%;
}

.st-max-950 {
  max-width: 950px;
}

.st-sub-label {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 65px 0 16px 0;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
}

.st-bullet-list {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 65px;
  color: var(--_frshlybaked-tokens---color-main-cream, #f5f2e4);
  opacity: 0.8;
  font-size: 1.125rem;
}

.st-bullet-list li {
  margin-bottom: 13px;
}

.st-split-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}



/* Responsive constraints for Grid/Flex on smaller screens */
@media screen and (max-width: 991px) {
  .st-sub-label {
    margin: 32px 0 16px 0;
  }

  .st-bullet-list {
    margin-bottom: 24px;
  }

  .st-bullet-list li {
    margin-bottom: 8px;
  }

  .st-grid-split {
    grid-template-columns: 1fr;
    height: auto;
    padding: 0 10px;
    box-sizing: border-box;
  }
  
  .st-split-image {
    height: 510px;
    max-height: 510px;
    padding: 0;
    box-sizing: border-box;
  }

  .st-split-text {
    padding: 30px 10px;
  }

  /* Reorder User Experience so image is above text on mobile */
  .st-grid-split > .st-split-image:first-child {
    order: -1;
  }

  .st-device-mockups {
    flex-direction: column;
    align-items: center;
    padding: 40px 10px !important;
    box-sizing: border-box;
  }

  .st-mockup-left {
    align-self: center;
    margin-top: 0;
  }
  
  .st-mockup-right {
    align-self: center;
  }

  .st-image-central {
    padding: 10px !important;
    box-sizing: border-box;
  }

  .st-h-700,
  .st-h-750 {
    height: 510px;
    max-height: 510px;
    object-fit: cover;
  }
}

@media screen and (max-width: 767px) {
  .st-image-central {
    padding: 10px !important;
    box-sizing: border-box;
  }

  .st-grid-split {
    padding: 0 10px;
    box-sizing: border-box;
  }

  .st-split-image {
    padding: 0;
    height: 510px;
    max-height: 510px;
    box-sizing: border-box;
  }

  .st-device-mockups {
    padding: 30px 10px !important;
    box-sizing: border-box;
  }

  .st-h-700,
  .st-h-750 {
    height: 510px;
    max-height: 510px;
    object-fit: cover;
  }
}

/* Custom Video Player */
.video-player {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;   /* desktop/tablet default */
  overflow: hidden;
  background-color: #202020;
  padding: 10px;
  box-sizing: border-box;
  color: #fff;
  isolation: isolate;
}

.video-player__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .video-player {
    aspect-ratio: 9 / 16;   /* Instagram Story proportions on mobile */
    max-height: 100vh;
  }
}

.video-player--scroll {
  background-color: #202020 !important;
  aspect-ratio: 16 / 9;
  cursor: url('https://pixelarticons.com/free/cursors/pointer.png') 4 1, auto;
}

@media (max-width: 767px) {
  .video-player--scroll {
    aspect-ratio: 16 / 9 !important;
    max-height: none !important;
  }
}

/* Related Projects Slider */
.related-projects {
  width: 100%;
  padding: 80px 24px;
  overflow: hidden;
  touch-action: pan-y;
}

.related-projects__track {
  display: flex;
  gap: 20px;
  align-items: center;
  width: max-content;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
  will-change: transform;
}

.related-projects__track:active {
  cursor: grabbing;
}

.related-projects__card {
  position: relative;
  flex: 0 0 auto;
  width: 372px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  transition: transform 0.35s ease;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.related-projects__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

/* Hover button reveal: DESKTOP ONLY. Touch devices get plain swipe, no zoom-on-touch. */
@media (hover: hover) and (pointer: fine) {
  .related-projects__card:hover .view-project-btn {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
}

@media (max-width: 767px) {
  .related-projects {
    padding: 50px 16px;
  }
  .related-projects__card {
    width: 286px;
  }
  .related-projects__card .view-project-btn {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
}

/* Progress Controls & Arrows in Brand Colors */
.related-projects__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  width: 100%;
}

.related-projects__progress {
  width: 100%;
  max-width: 280px;
  height: 2px;
  background: rgba(245, 242, 228, 0.2);
  margin: 0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.related-projects__progress-bar {
  height: 100%;
  width: 0%;
  background: #f5f2e4; /* brand yellow-cream */
  border-radius: 999px;
  will-change: width;
}

.related-projects__arrow {
  background: transparent;
  border: 1px solid rgba(245, 242, 228, 0.3);
  color: #f5f2e4;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url('https://pixelarticons.com/free/cursors/pointer.png') 4 1, auto;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s ease;
  user-select: none;
  flex: 0 0 auto;
}

.related-projects__arrow:hover {
  background: rgba(245, 242, 228, 0.15);
  border-color: #f5f2e4;
  transform: scale(1.06);
}

/* Shared main section heading scale */
.st-bold-heading {
  font-family: var(--_frshlybaked-tokens---main-heading-can-reg, "Frshly Display", Georgia, serif) !important;
  font-size: var(--frshly-section-heading-size) !important;
  font-weight: 400 !important;
  line-height: var(--frshly-section-heading-line-height) !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
