/* Project-page layout for the Yungaba mockup port.
   Linked only from projects/yungaba-house.html, after styles.css.
   Does not change the shared header or footer. */

/* Same 56px gap below the intro line as Portfolio/Contact
   (svc-intro padding-bottom 32px + body padding-top 24px). */
.project-body { padding: 24px 0 0; }

.svc-kicker a {
  color: inherit;
  text-decoration: none;
}
.svc-kicker a:hover { color: var(--brown-dark); }

/* Hero sits in the --wide container, 8px corners like the other photos. */
.project-hero {
  margin: 0;
  padding: 0; /* override live .project-hero { padding-top: 104px } */
  background: #1a1410;
  border-radius: 8px;
  overflow: hidden;
}
.project-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2; /* the hero photo is 3:2; show it in full */
  object-fit: cover;
}

/* Design story directly under the hero, before the 4-photo grid. */
.project-story {
  padding: 40px 0 48px;
  max-width: 720px;
}
.project-story p {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Story block after the 4-photo grid (Teneriffe). Cancel the grid's
   padding-bottom, then use a tight top gap and a bottom gap that
   matches Yungaba's grid→slider spacing (28px / 20px mobile).
   Higher specificity so this is not overridden by .project-story
   padding. Unused on Yungaba. */
.project-story.project-story--after-grid {
  margin-top: -28px;
  padding-top: 16px;
  padding-bottom: 28px;
}
@media (max-width: 768px) {
  .project-story.project-story--after-grid {
    margin-top: -20px;
    padding-top: 12px;
    padding-bottom: 20px;
  }
}

.project-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 28px;
}
@media (max-width: 768px) {
  .project-photo-grid { grid-template-columns: 1fr; gap: 12px; padding-bottom: 20px; }
  .project-story { padding: 28px 0 36px; }
}
.project-photo-grid > * {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  width: 100%;
}
.project-photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

/* Inline project photo slider */
.project-slider {
  padding: 0 0 40px;
  outline: none;
}
.project-slider:focus-visible .project-slider-frame {
  box-shadow: 0 0 0 2px var(--off-white), 0 0 0 3px rgba(92, 74, 58, 0.45);
}
.project-slider-frame {
  position: relative;
  /* 4:3 rather than 3:2: most of this set is square, so a slightly taller
     frame keeps the cream letterboxing modest while still suiting landscapes. */
  aspect-ratio: 4 / 3;
  background: var(--cream);
  border-radius: 8px;
  overflow: hidden;
  touch-action: pan-y;
}

/* Landscape-led project (Teneriffe): a 3:2 stage so the dominant wide
   photos fill the frame. Taller shots are contained (side letterboxing).
   Yungaba keeps the default 4:3 stage and is unchanged. */
.project-slider--landscape .project-slider-frame {
  aspect-ratio: 3 / 2;
}
/* Size the img to the photo (not the 4:3 frame) so letterboxed
   shots get the same 8px corners as the hero and grid. The frame
   also stays rounded with overflow hidden for photos that fill it. */
.project-slider-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 650ms ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.project-slider-frame img.is-active {
  opacity: 1;
  z-index: 1;
}

/* Teneriffe only: scale photos up to the 3:2 stage. Many P05 files are
   smaller than the desktop frame, so width/height auto left a large
   cream band around them. contain keeps aspect; the frame's overflow
   and radius clip shots that fill the stage. */
.project-slider--landscape .project-slider-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.project-slider-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 2px 0;
}
.project-slider-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-dark);
  cursor: pointer;
}
.project-slider-btn:hover { color: var(--brown-medium); }
.project-slider-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.project-slider-progress {
  flex: 1 1 auto;
  min-width: 48px;
  height: 38px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.project-slider-progress-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(92, 74, 58, 0.18);
  border-radius: 1px;
}
.project-slider-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: var(--brown-dark);
  border-radius: 1px;
  transition: width 650ms ease;
}
.project-slider-code {
  font-family: Inter, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  flex: 0 0 auto;
  white-space: nowrap;
}
.project-slider-counter {
  font-family: Inter, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--brown-dark);
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .project-slider { padding: 0 0 28px; }
  .project-slider-controls { gap: 8px; padding: 8px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .project-slider-frame img,
  .project-slider-progress-bar { transition: none; }
}


/* Hint below the photo frame, above the progress/arrows row */
.project-slider-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  font-family: Inter, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-warm); /* same as .svc-intro .svc-kicker — #9A7B5F */
  text-align: center;
  line-height: 1.45;
}
.project-slider-hint svg {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  display: block;
  position: relative;
  top: 0.5px;
}
.project-slider-hint-mobile { display: none; }

@media (max-width: 768px) {
  .project-slider-hint {
    margin: 12px 0 0;
    letter-spacing: 0.1em;
    flex-wrap: wrap;
  }
  .project-slider-hint-desktop { display: none; }
  .project-slider-hint-mobile { display: inline; }
}

/* Back to Portfolio — text link, not a button */
.project-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brown-warm); /* same as .svc-intro .svc-kicker — #9A7B5F */
  border-bottom: 1px solid transparent;
  padding: 10px 0 9px;
  line-height: 1;
}
.project-back svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  display: block;
  position: relative;
  top: -0.5px;
}
.project-back:hover {
  color: var(--brown-warm);
  border-bottom-color: rgba(154, 123, 95, 0.55);
}
.project-back:focus-visible {
  outline: 2px solid rgba(92, 74, 58, 0.45);
  outline-offset: 3px;
}

/* Top: sits just below the fixed nav, left-aligned with the content column.
   Takes over the intro's former top padding so the title stays close beneath. */
.project-back-top {
  padding: 128px 0 0;
}
.svc-page .svc-intro { padding-top: 20px; }

.project-back-foot {
  margin: 0;
  padding: 8px 0 56px;
}

@media (max-width: 768px) {
  .project-back-top { padding-top: 108px; }
  .svc-page .svc-intro { padding-top: 16px; }
  .project-back-foot { padding: 8px 0 44px; }
  .project-back { padding: 12px 0 11px; } /* slightly larger tap area */
}

/* Bottom of project page: Back sits closer to the slider, less gap before the brown CTA panel (10 Nov) */
.project-slider { padding-bottom: 8px; }
.project-back-foot { padding-bottom: 32px; }
@media (max-width: 768px) {
  .project-slider { padding-bottom: 4px; }
  .project-back-foot { padding-bottom: 24px; }
}
