/* Home page layout. This file is loaded only for body.template-home.
   Keep homepage-specific decisions here; shared.css owns tokens and common components. */

.template-home .hero {
  min-height: min(86svh, 900px);
  align-items: flex-end;
  background-position: center 48%;
}
.template-home .hero::before {
  background:
    linear-gradient(90deg, rgba(0,0,0,.57) 0%, rgba(0,0,0,.22) 70%, rgba(0,0,0,.08) 100%),
    linear-gradient(0deg, rgba(0,0,0,.30), transparent 55%);
}
.template-home .hero .wrap {
  max-width: 1288px;
  padding-top: 100px;
  padding-bottom: clamp(72px, 10vw, 140px);
}
.template-home .hero h1 {
  max-width: 900px;
  font-size: clamp(3.3rem, 8vw, 7.8rem);
  letter-spacing: -.065em;
  line-height: .98;
}
.template-home .hero h4 { color: rgba(255,255,255,.82); }
.template-home .hero p {
  max-width: 590px;
  margin-left: 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.7;
}
.template-home main > section .client-list { column-gap: 28px; row-gap: 12px; }
.template-home .project-tile { aspect-ratio: 4 / 3; }
.template-home .project-tile .label {
  padding: 24px 22px 18px;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
  font-size: .78rem;
  line-height: 1.5;
}
.template-home .news-card { height: 100%; }
.template-home .news-card > .news-card-image { aspect-ratio: 16 / 10; }
.template-home .news-card-copy { padding: clamp(20px, 2.2vw, 30px); }
.template-home .news-card h3 {
  font-size: clamp(1.08rem, 1.35vw, 1.3rem);
  line-height: 1.4;
}
.template-home .news-card p { line-height: 1.65; }

/* Consistent four-column service rows on desktop. */
.template-home #services .section-head {
  max-width: 920px;
  margin-bottom: clamp(36px, 6vw, 76px);
}
.template-home #services .section-head h2 {
  max-width: 820px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.template-home #services .section-head .lead {
  max-width: 790px;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.8;
}
.template-home #services .service {
  display: grid;
  grid-template-columns: minmax(0, .9fr) 38px minmax(0, 1.2fr) minmax(170px, .8fr);
  align-items: start;
  column-gap: clamp(18px, 2.25vw, 32px);
  row-gap: 18px;
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--line);
}
.template-home #services .service:last-of-type { border-bottom: 1px solid var(--line); }
.template-home #services .service-image {
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 240px;
  max-height: 360px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--sand);
}
.template-home #services .service .num {
  padding-top: 3px;
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
}
.template-home #services .service h3 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.12;
}
.template-home #services .service p {
  margin: 0;
  color: #565650;
  font-size: .96rem;
  line-height: 1.8;
}
.template-home #services .service ul {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}
.template-home #services .service li {
  padding: 9px 0;
  border-bottom: 1px solid #e9e9e5;
  font-size: .85rem;
  line-height: 1.5;
}
.template-home #services .service li:first-child { border-top: 1px solid #e9e9e5; }
.template-home #services .service li::before {
  content: "↗";
  display: inline-block;
  margin-right: 9px;
  color: var(--accent);
}

/* Tablet: image on the left, all related service information in one column on the right. */
@media (max-width: 1080px) {
  .template-home .hero { min-height: min(80svh, 780px); }
  .template-home .hero h1 { font-size: clamp(3rem, 7vw, 5.8rem); }
  .template-home #services .service {
    grid-template-columns: minmax(170px, .75fr) minmax(0, 1.25fr);
    column-gap: clamp(22px, 4vw, 44px);
  }
  .template-home #services .service-image {
    grid-column: 1;
    grid-row: 1 / span 3;
    height: 100%;
    min-height: 260px;
    max-height: none;
  }
  .template-home #services .service .num { grid-column: 2; grid-row: 1; }
  .template-home #services .service > div:not(.num) { grid-column: 2; grid-row: 2; }
  .template-home #services .service ul { grid-column: 2; grid-row: 3; }
}
@media (min-width: 641px) and (max-width: 860px) {
  .template-home .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .template-home .hero { min-height: min(74svh, 700px); }
}
@media (max-width: 640px) {
  .template-home .hero { min-height: min(78svh, 690px); }
  .template-home .hero .wrap {
    padding-top: 80px;
    padding-bottom: clamp(54px, 12vw, 84px);
  }
  .template-home .hero h1 {
    font-size: clamp(2.65rem, 12vw, 4.5rem);
    line-height: 1;
    overflow-wrap: normal;
  }
  .template-home .hero p { font-size: 1rem; }
  .template-home .project-tile .label { padding: 20px 16px 14px; font-size: .75rem; }
  .template-home #services .service {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px 16px;
    padding: 30px 0;
  }
  .template-home #services .service-image {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    aspect-ratio: 16 / 10;
    margin-bottom: 8px;
  }
  .template-home #services .service .num { grid-column: 1; grid-row: 2; }
  .template-home #services .service > div:not(.num) { grid-column: 2; grid-row: 2; }
  .template-home #services .service ul { grid-column: 2; grid-row: 3; }
}


/* Home page prioritises service discovery and a balanced four-project portfolio. */
.template-home .home-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.template-home .home-project-grid .project-tile { aspect-ratio: 5 / 4; }
.template-home .home-project-grid .project-tile .label { padding: 22px; font-size: .9rem; }
.template-home .home-project-cta, .template-home .services-cta { margin-top: 30px; display: flex; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.template-home .services-cta { padding-top: 12px; }
.template-home .hero .hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; margin-top: 28px; }
.template-home .hero .btn-light-filled { background: #fff; color: #090909; border-color: #fff; }
.template-home .hero .btn-light-filled:hover { background: transparent; color: #fff; }
.template-home .hero-secondary { color: #fff; font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.7); padding: 8px 0; }
.template-home .hero-secondary:hover { color: #fff; border-bottom-color: #fff; }
@media (max-width: 640px) {
 .template-home .home-project-grid { grid-template-columns: 1fr; }
 .template-home .home-project-grid .project-tile { aspect-ratio: 4 / 3; }
 .template-home .home-project-grid .project-tile .label { padding: 18px; }
 .template-home .hero .hero-actions { align-items: flex-start; flex-direction: column; gap: 12px; }
}

/* Focused refinements: hero label and larger client references. */
.template-home .hero .wrap > h4:first-child { max-width: 1320px; margin: 0 0 22px; text-align: left; }
.template-home .logo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; }
.template-home .logo-grid > div { min-height: clamp(125px, 12vw, 176px); padding: clamp(22px, 3vw, 42px); }
.template-home .logo-grid img { max-width: 100%; max-height: clamp(90px, 7.5vw, 140px); }
@media (max-width: 900px) { .template-home .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .template-home .logo-grid > div { min-height: 118px; padding: 20px; } .template-home .logo-grid img { max-height: 92px; } }
@media (max-width: 560px) { .template-home .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .template-home .logo-grid > div { min-height: 100px; padding: 16px; } .template-home .logo-grid img { max-height: 78px; } }
