/* Site updates, loaded after styles.css so it wins on equal selectors. */

/* Instagram: the posts are all reels, so show them as tall 9:16 cards. */
.insta-grid {
  grid-template-columns: repeat(3, minmax(0, 320px));
  justify-content: center;
  gap: 28px
}

.insta-media-wrap {
  height: auto;
  aspect-ratio: 9 / 16
}

.insta-card-caption {
  font-size: 1rem;
  font-weight: 400;
  -webkit-line-clamp: 5
}

@media (max-width: 900px) {
  .insta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px }
}

@media (max-width: 600px) {
  .insta-grid { grid-template-columns: minmax(0, 320px) }
}

/* Readability: body copy goes from Barlow 300 to 400 and up a size;
   the small condensed labels grow; display serifs go from 300 to 400. */
.body-text,
.cta-section>div>p { font-size: 1.08rem; font-weight: 400; line-height: 1.75 }

.h-sub { font-size: clamp(.98rem, 1.4vw, 1.12rem); font-weight: 400; color: rgba(242, 244, 248, .82) }

.cred-card p,
.step p,
.service-card p { font-size: 1rem; font-weight: 400 }

.testi-text { font-size: 1.22rem; font-weight: 400 }
.testi-location,
.map-detail-item a,
.footer-brand p,
.footer-col ul li a { font-size: .98rem; font-weight: 400 }
.form-field input,
.form-field select,
.form-field textarea { font-weight: 400 }

nav ul a { font-size: .82rem; font-weight: 600 }
.section-label { font-size: .8rem }
.h-chapter { font-size: .8rem }
.ticker-item,
.contact-info-item,
.number-label,
.h-stat-label { font-size: .78rem }
.tag,
.form-field label,
.footer-col h4,
.license-badge,
.map-detail-item strong { font-size: .72rem }
.h-ind-label { font-size: .68rem }

.h-title,
.section-title,
.number-big,
.cred-num,
.step-num,
.rating-num,
.h-stat-num,
.about-badge strong { font-weight: 400 }

/* About: Daniel's portrait is a round crop, so show it as a circle on the cream panel. */
.about-photo {
  display: grid;
  place-items: center;
  background: var(--surface)
}

.about-photo img {
  width: min(80%, 540px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  filter: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45)
}

/* Nav: a black strip carrying the house mark (logo-nav.png, cropped from the brand logo). */
nav,
nav.scrolled {
  background: #000;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: none
}

.logo { color: #E6E1DD }
.logo em { color: var(--accent) }
.logo-img { height: 46px }
nav ul a { color: rgba(244, 239, 230, .75) }
nav ul a:hover { color: #fff }
.lang-toggle { border-color: rgba(244, 239, 230, .3) }
.lang-btn { color: rgba(244, 239, 230, .6) }
.lang-btn.active { background: var(--accent); color: #0B1220 }

/* Shorter scroll: the hero runs its four stages over less distance. */
.hero-wrapper { height: 360vh }

/* Daniel's cards: four credentials under the bio; the picked one opens its detail below. */
.cred-deck { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px }

.cred-tab {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: border-color .25s, transform .25s, background .25s
}

.cred-tab:hover { transform: translateY(-3px); border-color: var(--accent-dim) }
.cred-tab.active { border-color: var(--accent); background: var(--tag-bg) }
.cred-tab-num { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; line-height: 1; color: var(--accent) }
.cred-tab-title { font-family: 'Barlow Condensed', sans-serif; font-size: .9rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase }

.cred-panel { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; margin-top: 18px; min-height: 7.2em }
.cred-desc { display: none; font-size: 1.02rem; line-height: 1.7; color: var(--muted); animation: fadeIn .35s ease }
.cred-desc.active { display: block }

.about-copy { padding: 64px 64px }
.about-photo { height: auto; min-height: 560px }

/* Reviews: one moving strip of cards; pointing at it or focusing it holds it still. */
.testi-carousel {
  margin-top: 48px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  outline: none
}

.testi-track { display: flex; gap: 20px; width: max-content }
.testi-track .testi-card { width: min(440px, 80vw); flex: none; border: 1px solid var(--border) }
.testi-track.moving { animation: testiScroll 48s linear infinite }
.testi-carousel:hover .testi-track,
.testi-carousel:focus-within .testi-track { animation-play-state: paused }

/* the track holds the cards twice, so sliding it by half (plus half a gap) loops seamlessly */
@keyframes testiScroll {
  to { transform: translateX(calc(-50% - 10px)) }
}

@media (prefers-reduced-motion: reduce) {
  .testi-carousel { overflow-x: auto; scroll-snap-type: x mandatory }
  .testi-track .testi-card { scroll-snap-align: start }
}

/* Portfolio: nine photos until "View All Projects" opens the rest. */
#gallery-container:not(.show-all) .gallery-item:nth-child(n+10) { display: none }
.gallery-more { display: block; margin: 28px auto 0; cursor: pointer; background: none }
