﻿/* Homepage composition; shared programme and arm layouts stay in brand.css. */
.home-page .brand-hero {
  max-width: 1120px;
  padding-block: clamp(60px, 8vw, 108px);
}
.home-page .brand-hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5.35rem);
  letter-spacing: -.045em;
  line-height: 1.08;
  text-wrap: balance;
}
.home-page .hero-description { max-width: 740px; }
.home-page .brand-section { padding-block: clamp(48px, 6vw, 78px); }
.home-page .brand-section h2 { text-wrap: balance; }
.home-page .selected-projects {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 8px;
  overscroll-behavior-x: contain;
}
.home-page .home-project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.home-project-carousel { min-width: 0; }
.home-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.home-carousel-position {
  margin-right: auto;
  color: #555a50;
  font: 700 12px/1.5 'Space Mono', monospace;
}
.home-carousel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c7cabe;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-ink);
  font-size: 20px;
  cursor: pointer;
}
.home-carousel-button:hover { background: #eff2e4; }
.home-carousel-button:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 3px; }
.home-project-image {
  background: #fff8ec;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid #d5d5ca;
}
.home-project-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.home-project-image--graqivo { background: #f4f7fb; }
.home-page .home-project-card .project-copy {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.home-page .home-project-category {
  font: 700 10px/1.65 'Space Mono', monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0;
}
.home-page .home-project-card h3 {
  font-size: 29px;
  letter-spacing: -.025em;
  margin: 12px 0 18px;
}
.home-page .home-project-card .status { margin-bottom: 16px; }
.home-page .home-project-attribution { font-size: 13px; }
.home-project-card .text-link { margin-top: auto; }
.home-services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.home-service {
  min-width: 0;
  border-top: 2px solid var(--brand-ink);
  padding: 22px 8px 4px;
}
.home-service-number {
  font: 700 11px 'Space Mono', monospace;
  color: var(--brand-blue);
}
.home-service h4 { font-size: 22px; line-height: 1.3; margin: 16px 0 12px; }
.home-service p { font-size: 16px; line-height: 1.7; color: #555a50; margin: 0; }
.home-card-label {
  font: 700 10px 'Space Mono', monospace;
  color: var(--brand-blue);
  letter-spacing: .08em;
}
.home-page .home-track-note { font-size: 14px; margin-top: 28px; }
.home-page .home-closing { padding-block: clamp(60px, 8vw, 100px); }
.home-page .home-closing h2 { font-size: clamp(34px, 4.8vw, 58px); }
.home-page :is(.brand-card, .project-copy, .home-closing) { overflow-wrap: break-word; }
@media (min-width: 768px) and (max-width: 1050px) {
  .home-page .selected-projects { grid-template-columns: 1fr; }
  .home-page .home-project-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .home-project-image { height: auto; min-height: 280px; border-bottom: 0; border-right: 1px solid #d5d5ca; }
  .home-project-image img { max-height: 260px; }
  .home-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .home-page .selected-projects { grid-template-columns: 1fr; }
  .home-page .brand-hero h1 { font-size: clamp(2rem, 8.5vw, 3.75rem); }
  .home-page .eyebrow { line-height: 1.8; }
  .home-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .home-service h4 { font-size: 20px; }
  }
@media (max-width: 420px) {
  .home-services-grid { grid-template-columns: 1fr; }
  .home-page .brand-actions { flex-direction: column; align-items: stretch; }
}

@media (min-width: 1051px) {
  .home-page .home-project-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .home-project-image {
    height: auto;
    min-height: 320px;
    border-bottom: 0;
    border-right: 1px solid #d5d5ca;
  }
  .home-project-image img { max-height: 320px; }
}

.home-project-card .home-play-game { margin: auto 0 18px; }
.home-project-card .home-play-game + .text-link { margin-top: 0; }

.home-offer-group { padding-top: 36px; }
.home-offer-group > h3 { font-size: clamp(26px, 3.5vw, 36px); line-height: 1.2; margin: 16px 0 20px; }
.home-offer-group > p { max-width: 760px; margin-inline: auto; color: #555a50; line-height: 1.75; font-size: 17px; }
.home-training { margin-top: 45px; padding: 36px 28px; background: #eff2e4; border: 1px solid #d5d5ca; }
.home-training-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 30px; }
.home-training-grid h4 { font-size: 20px; margin: 0 0 12px; line-height: 1.35; }
.home-training-grid p { color: #555a50; line-height: 1.7; font-size: 16px; }
.home-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 38px 0; }
.home-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 24px 12px; border-top: 2px solid #161814; }
.home-stats dt { font-size: 15px; font-weight: 600; line-height: 1.5; }
.home-stats dd { order: -1; color: #145bec; font-size: clamp(40px, 5vw, 60px); font-weight: 800; margin: 0 0 12px; line-height: 1.1; }
.home-stats dd.home-stat-note { order: 0; font-size: 12px; font-weight: 400; color: #555a50; margin: 10px 0 0; line-height: 1.6; }
.home-page .home-participation-prompt { margin-top: 32px; font-size: 16px; }
.home-page .home-hub-action { margin-top: 14px; }
@media (min-width: 1051px) { .home-services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } .home-training-grid { grid-template-columns: 1fr; } .home-training { padding: 28px 20px; } }
@media (max-width: 359px) { .home-stats { grid-template-columns: 1fr; } }

/* Hero artwork forms the background, with a cream wash for readable text. */
.home-page .home-hero-with-art {
  max-width: none;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding: clamp(32px, 4vw, 58px);
  background-color: #f5efe2;
  background-image: linear-gradient(90deg, rgba(247,245,237,.97) 0%, rgba(247,245,237,.94) 32%, rgba(247,245,237,.8) 48%, rgba(247,245,237,.12) 75%, transparent 100%), url('../images/home/digital-product-collage.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-block: 28px;
}
.home-hero-copy {
  min-width: 0;
  width: 53%;
  max-width: 590px;
  text-align: left;
}
.home-page .home-hero-with-art h1 {
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.12;
}
.home-page .home-hero-with-art .hero-description { font-size: 18px; color: #34392f; }
.home-hero-copy .brand-actions { justify-content: flex-start; }
.home-community-art, .home-community-copy { min-width: 0; }
.home-community-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.home-community-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 38px;
  margin-bottom: 36px;
}
.home-community-copy p { font-size: 17px; line-height: 1.75; color: #555a50; }
.home-page .home-community-copy h2 { font-size: clamp(30px, 3.3vw, 42px); }
@media (max-width: 920px) {
  .home-community-intro { grid-template-columns: 1fr; gap: 30px; }
  .home-community-copy { order: -1; }
.home-community-art { width: 100%; max-width: 760px; margin-inline: auto; }
}

@media (max-width: 920px) {
  .home-page .home-hero-with-art {
    min-height: 560px;
    padding: 42px 22px;
    margin-block: 18px;
    background-image: linear-gradient(rgba(247,245,237,.88), rgba(247,245,237,.9)), url('../images/home/digital-product-collage.png');
    background-position: 65% center;
  }
  .home-hero-copy { width: 100%; max-width: 590px; margin-inline: auto; text-align: center; overflow-wrap: break-word; }
  .home-page .home-hero-with-art h1 { font-size: clamp(32px, 6.5vw, 48px); }
  .home-hero-copy .brand-actions { justify-content: center; }
}

/* Centre incomplete service rows while keeping every item the same width. */
@media (min-width: 1051px) {
  .home-services-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .home-services-grid > .home-service { grid-column: span 2; }
  .home-services-grid > .home-service:nth-child(4) { grid-column: 2 / span 2; }
  .home-services-grid > .home-service:nth-child(5) { grid-column: 4 / span 2; }
}
@media (min-width: 421px) and (max-width: 1050px) {
  .home-services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-services-grid > .home-service { grid-column: span 2; }
  .home-services-grid > .home-service:last-child { grid-column: 2 / span 2; }
}
