/* Home page: logo band, testimonials carousel, project tiles. */

/* ---------- Logo band (home page) ---------- */

.logo-band {
  background: #fff;
  margin-top: 70px;
  padding: 56px 0 60px;
  border-top: 1px solid var(--line);
  --logo-width: 110px;   /* display width of each logo; try 140px for larger logos */
}
.logo-band h2 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 36px;
}

.logo-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px 24px;
  align-items: center;
}
.logo-grid li {
  flex: 0 0 calc((100% - 5 * 24px) / 6);   /* 6 per row */
  display: flex;
  justify-content: center;
}
.logo-grid img {
  width: 100%;
  max-width: var(--logo-width);
  height: auto;
  display: block;
}

@media (max-width: 900px) {                 /* tablet: 3 per row */
  .logo-grid li { flex-basis: calc((100% - 2 * 24px) / 3); }
}
@media (max-width: 540px) {                 /* phone: 1 per row */
  .logo-grid { gap: 28px; }
  .logo-grid li { flex-basis: 100%; }
}

/* ---------- Testimonials (home page) ---------- */

.testimonials { margin-top: 70px; }
.testimonials h2 { font-size: 1.4rem; text-align: center; margin-bottom: 30px; }

.t-track {
  list-style: none;
  margin: 0;
  padding: 4px 0 16px;
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  align-items: flex-start;             /* each card is only as tall as its own quote */
}
.t-slide {
  flex: 0 0 calc((100% - 32px) / 2);   /* 2 per view */
  scroll-snap-align: start;
  display: flex;
}
@media (max-width: 760px) {
  .t-slide { flex-basis: 100%; }       /* 1 per view on phones */
}

.t-card { margin: 0; display: flex; flex-direction: column; width: 100%; }

/* The chat bubble */
.bubble {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  padding: 46px 30px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 24px -18px rgba(15, 36, 48, 0.35);
}
.bubble::before {                      /* opening quote mark */
  content: "\201C";
  position: absolute;
  top: 8px;
  left: 24px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--teal);
  opacity: 0.55;
}
.bubble::after {                       /* the bubble's tail, pointing at the name */
  content: "";
  position: absolute;
  left: 38px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.bubble p { margin: 0; max-width: none; font-size: 1.02rem; }

.t-card figcaption {
  margin-top: 20px;
  padding-left: 34px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
}

.t-card figcaption .testimonial-person-role {

  font-size: .8rem;
  color: #999;
}

.t-card figcaption .testimonial-person-location {

  font-size: .8rem;
  color: #AAA;
}

/* Controls only appear once the script has run */
.t-controls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}
.is-enhanced .t-controls { display: flex; }
.is-enhanced .t-track { scrollbar-width: none; }
.is-enhanced .t-track::-webkit-scrollbar { display: none; }

.t-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--teal-deep);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.t-btn:hover:not(:disabled) { background: var(--grad); border-color: transparent; color: var(--cream); }
.t-btn:disabled { opacity: 0.4; cursor: default; }

.t-dots { display: flex; }
.t-dot {                               /* 24px tap target, 10px visible dot */
  width: 24px;
  height: 24px;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  background-clip: content-box;
  cursor: pointer;
}
.t-dot[aria-current="true"] { background-color: var(--teal); }

@media (prefers-reduced-motion: reduce) {
  .t-track { scroll-behavior: auto; }
}

/* ---------- Home page: condensed project tiles ---------- */

.project-tiles { margin-top: 56px; }

.tiles-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 26px;
}
.tiles-head h2 { font-size: 1.4rem; margin: 0; }
.tiles-all {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--teal-deep);
  text-decoration: none;
}
.tiles-all:hover { text-decoration: underline; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* was 3 */
  gap: 38px 24px;
}
.tile { display: block; color: var(--ink); text-decoration: none; }
.tile .thumb {
  display: block;
  aspect-ratio: 3200 / 2640;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--paper-2), #DFD8C6);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile h3 {
  margin: 14px 0 0;
  font-size: 1.05rem;
  line-height: 1.3;
  transition: color 0.15s ease;
}
.tile:hover h3,
.tile:focus-visible h3 { color: var(--teal-deep); }
.tile:hover .thumb,
.tile:focus-visible .thumb {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: 0 14px 28px -16px rgba(15, 36, 48, 0.45);
}

@media (max-width: 1000px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }   /* was 900px */
@media (max-width: 560px)  { .tile-grid { grid-template-columns: 1fr; } }
