/* Homepage reference: documents/designs/Main site.png (1920px artboard).
   Desktop text and its containing geometry share the same scale. Do not apply
   independent pixel font floors here: those change the reference line breaks.
   Tablet/mobile retain their own responsive layouts and readable type sizes. */
body[data-page="home"] {
  /* Match the export's lighter text rendering on macOS without changing
     font weights, colour opacity or the measured line wrapping. */
  -webkit-font-smoothing: antialiased;
  /* Opaque text pixels sampled from the supplied Figma layer exports. */
  --on-dark: #e7ded1;
  --warm: #f7f3ed;
  --home-copy: #2c2a27;
  --home-card-copy: #5a554e;
}

.home-features .split-copy p {
  color: var(--on-dark);
}

.home-clients p,
.home-experiences > div > p,
.reviews > div > p,
.social-section p {
  color: var(--home-copy);
}

.hero-home p {
  color: var(--warm);
}

body[data-page="home"] .client-list img[alt="Chalmers"] {
  filter: brightness(0) opacity(0.7);
}

.home-clients .client-list img.redcross-stacked {
  max-height: 2.75rem;
  filter: brightness(0) opacity(0.7);
}

.home-clients .client-marquee {
  --client-logo-slot: clamp(9rem, 12.5vw, 13.828125rem);
  margin: 5rem auto 0;
  max-width: 110.625rem;
  overflow: hidden;
  position: relative;
}

.home-clients .client-track {
  display: flex;
  width: max-content;
  animation: client-logo-scroll 80s linear infinite;
  will-change: transform;
}

.home-clients .client-marquee:hover .client-track,
.home-clients .client-marquee:focus-within .client-track {
  animation-play-state: paused;
}

.home-clients .client-marquee:focus-visible {
  outline: 0.125rem solid #64866c;
  outline-offset: 0.375rem;
}

.home-clients .client-list {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0;
  width: max-content;
  max-width: none;
  margin: 0;
  overflow: visible;
  scroll-snap-type: none;
  padding: 0;
}

.home-clients .client-list li {
  display: flex;
  flex: 0 0 var(--client-logo-slot);
  width: var(--client-logo-slot);
  align-items: center;
  justify-content: center;
  min-width: 0;
  box-sizing: border-box;
  padding-inline: 0.75rem;
  scroll-snap-align: none;
}

.home-clients .client-list img {
  max-width: 100%;
  height: auto;
}

@keyframes client-logo-scroll {
  to {
    transform: translateX(-50%);
  }
}

@media screen and (min-width: 651px) and (max-width: 1200px) {
  .home-clients .client-marquee {
    --client-logo-slot: 10rem;
  }
}

@media screen and (max-width: 650px) {
  .home-clients .client-marquee {
    --client-logo-slot: 7.5rem;
    margin-top: 3.4375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-clients .client-track {
    animation-play-state: paused;
    transform: none;
  }

  .home-clients .client-marquee {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .home-clients .client-marquee::-webkit-scrollbar {
    display: none;
  }
}

@media screen and (min-width: 651px) {
  .experience-card p {
    color: var(--home-card-copy);
  }
}

@media screen and (max-width: 650px) {
  /* The supplied mobile export has its own grey/black copy treatments. */
  .hero-home p {
    color: #fff;
  }

  .reviews > div > p {
    color: var(--muted);
  }

  .social-section h2,
  .social-section p {
    color: #000;
  }
}

body[data-page="home"] .site-header.is-sticky {
  background: var(--dark);
}

.footer-dark .field .error,
.footer-dark .form-error {
  color: #ffb4ab;
}

.experience-card {
  color: var(--muted);
}

.experience-card h3 {
  font-weight: 600;
  color: var(--dark);
}

.review-card {
  color: var(--muted);
}

.review-card strong {
  font-weight: 700;
}

.review-card header {
  align-items: center;
}

body[data-page="home"] .review-card p {
  font-weight: 600;
}

.feature-copy-mobile {
  display: none;
}

.home-features .btn {
  color: var(--muted);
}

.google-mark {
  display: inline-block;
  flex: none;
  width: 2.25rem;
  height: 1.5rem;
  overflow: hidden;
  color: transparent;
  background: url("../icons/google-review.png") left center / 1.625rem auto
    no-repeat;
  position: relative;
}

.google-mark::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0.09375rem;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: #d9d9d9;
  box-shadow:
    0 0.5rem #d9d9d9,
    0 1rem #d9d9d9;
}

@media screen and (min-width: 1201px) {
  html {
    font-size: min(0.8333333333vw, 16px);
  }

  .top-strip {
    background: #fff;
    color: #23221f;
  }

  body[data-page="home"] .site-header:not(.is-sticky) {
    /* Rectangle 5187: exported RGBA (0, 0, 0, 102). */
    background: rgb(0 0 0 / 40%);
    color: var(--warm);
  }

  .header-inner {
    min-height: 5.25rem;
  }

  .header-inner .brand {
    width: 10.375rem;
    margin-left: -0.25rem;
    transform: translateY(0.0625rem);
  }

  .home-nav {
    font-size: 1.25rem;
    gap: 2.25rem;
    margin-right: 5.75rem;
    transform: translateY(0.125rem);
  }

  .home-nav > a:nth-child(2) {
    font-weight: 800;
    position: relative;
    left: -0.0625rem;
  }

  .home-nav > a:first-child {
    position: relative;
    left: -0.125rem;
  }

  .home-nav .nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 7.75rem;
    min-height: 2.1875rem;
    padding: 0.375rem;
    font-size: 0.75rem;
  }

  .home-nav .nav-cta + .nav-cta {
    margin-left: -1.25rem;
  }

  .hero-home p {
    font-size: 1.375rem;
    position: relative;
    left: 0.125rem;
    top: -0.125rem;
  }

  .hero-home h1 {
    /* Optical ink-box offsets measured against the exported hero. Keep these
       separate from the text's flow boxes so the photo and sections don't move. */
    position: relative;
    left: 0.125rem;
    top: 0.1875rem;
  }

  .hero-home {
    color: var(--warm);
  }

  .hero-home .narrow {
    padding-top: 5.125rem;
    position: relative;
    left: -0.3125rem;
  }

  .hero-actions {
    gap: 1.875rem;
    margin-top: 2.4375rem;
    position: relative;
    left: -0.1875rem;
    top: 0.25rem;
  }

  .hero-home .btn {
    font-size: 1rem;
  }

  .hero-home .btn:not(.btn-solid),
  .home-nav .nav-cta:not(.nav-cta--solid) {
    border-width: 0.125rem;
  }

  .home-clients h2,
  .home-experiences h2 {
    font-size: 2.375rem;
    margin-bottom: 0.7125rem;
    color: var(--dark);
  }

  .home-clients p,
  .home-experiences > div > p {
    font-size: 1.125rem;
    max-width: 53.125rem;
    line-height: 1.5;
  }

  .home-clients {
    padding: 5.625rem 0 8.2625rem;
  }

  .client-list img {
    max-height: 2.75rem;
    width: 8.75rem;
    max-width: 100%;
    filter: brightness(0.58);
  }

  .client-list img[alt="PEAB"],
  .client-list img[alt="PostNord"],
  .client-list img[alt="Spotify"] {
    width: 9.6875rem;
  }

  .client-list img[alt="Team Sportia"] {
    width: 12.5rem;
    filter: none;
  }

  .client-list img[alt="Chalmers"] {
    width: 14.6875rem;
    max-width: 100%;
  }

  .home-experiences {
    padding: 6.875rem 0 12.125rem;
  }

  .experience-grid {
    max-width: 98.375rem;
    grid-template-columns: repeat(3, minmax(0, 364fr)) minmax(0, 353fr);
    gap: 2.6875rem;
    margin-top: 5.6875rem;
    align-items: stretch;
    position: relative;
    left: -0.375rem;
  }

  .experience-card:last-child {
    margin-left: 0.625rem;
  }

  .experience-card img {
    height: 14.5625rem;
  }

  .experience-card div {
    padding: 3.5rem 1.125rem 2.125rem;
  }

  .experience-card:first-child div {
    padding-inline: 1.84375rem;
  }

  .experience-card:last-child div {
    padding-inline: 0.375rem;
  }

  .experience-card h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.625rem;
  }

  .experience-card p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .home-features h2 {
    font-size: 2.25rem;
  }

  .home-features .split {
    grid-template-columns: minmax(0, 610fr) minmax(0, 880fr);
    gap: 7.8125rem;
  }

  .home-features .split.reverse {
    grid-template-columns: minmax(0, 880fr) minmax(0, 610fr);
  }

  .home-features {
    padding-top: 2.3125rem;
    padding-bottom: 4.0625rem;
  }

  .home-features .split-copy p {
    font-size: 1.125rem;
    line-height: 1.5;
  }

  .home-features .split.reverse .split-copy p {
    font-size: 1rem;
  }

  .home-features .btn {
    font-size: 0.875rem;
  }

  .reviews {
    padding: 5.1875rem 0 6.125rem;
  }

  .reviews > div > p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .reviews h2 {
    color: var(--dark);
    margin-bottom: 0.875rem;
  }

  .review-grid {
    max-width: 95.25rem;
    gap: 2.5rem;
    margin-top: 5.125rem;
    position: relative;
    left: 1.25rem;
  }

  .review-card {
    padding: 2.1875rem 2.0625rem 1.875rem;
    min-height: 18.1875rem;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .review-card header {
    font:
      700 1.25rem/1.3 Arial,
      sans-serif;
    margin-bottom: 1.4375rem;
    gap: 0.375rem;
    margin-right: -0.75rem;
  }

  .review-card .stars {
    font-size: 1.25rem;
    line-height: 1.4;
    letter-spacing: -0.125rem;
  }

  .review-card p {
    max-width: 17.3125rem;
  }

  .review-card:last-child p {
    max-width: 17.25rem;
  }

  .review-time {
    font-size: 0.875rem;
    color: #888;
  }

  .social-section {
    padding: 10.1875rem 0 10.25rem;
  }

  .social-section .narrow {
    grid-template-columns: minmax(0, 375fr) minmax(0, 662fr);
    gap: 10.1875rem;
  }

  .social-section .narrow > div:first-child {
    padding-top: 2.8125rem;
  }

  .social-section h2 {
    color: var(--dark);
  }

  .social-section p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .social-gallery {
    gap: 1.875rem 1.9375rem;
  }

  .social-section .socials {
    gap: 0.5rem;
    margin-top: 4.125rem;
  }
}

/* The approved 14px footer copy needs a real reading-width container, not the
   62.5vw container designed for 12px copy. Preserve the reference's two-row
   hierarchy, with the contact form spanning both rows, without shrinking text. */
@media screen and (min-width: 1201px) {
  .site-footer > .narrow {
    width: calc(100% - 4rem);
    max-width: 1200px;
  }

  .footer-layout {
    grid-template-columns: minmax(0, 342fr) 107fr minmax(0, 218fr) 130fr minmax(
        0,
        403fr
      );
    column-gap: 0;
    row-gap: 60px;
  }

  .footer-about {
    grid-column: 1;
  }

  .footer-company {
    grid-column: 3;
  }

  .footer-form {
    grid-column: 5;
    grid-row: 1 / 3;
  }

  .footer-links {
    grid-column: 1 / 5;
    grid-template-columns: 281fr 325fr 191fr;
    gap: 0;
  }

  .footer-links > section {
    padding-right: 18px;
  }

  .footer-links .columns {
    grid-template-columns: max-content max-content;
    column-gap: 20px;
  }

  .footer-form input {
    min-height: 40px;
  }
}

@media screen and (min-width: 651px) and (max-width: 1200px) {
  .experience-grid,
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experience-card h3 {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 650px) {
  .feature-copy-desktop {
    display: none;
  }

  .feature-copy-mobile {
    display: block;
  }

  .hero-home p {
    font-size: 0.9375rem;
  }

  body[data-page="home"] .hero .narrow {
    width: calc(100% - 4rem);
  }

  body[data-page="home"] .hero h1 {
    font-size: 2.125rem;
  }

  body[data-page="home"] .top-strip {
    height: 1.0625rem;
  }

  body[data-page="home"] .site-header {
    top: 1.0625rem;
  }

  body[data-page="home"] .checkout-link {
    font-size: 0.625rem;
    gap: 0.5rem;
  }

  body[data-page="home"] .header-inner {
    width: calc(100% - 4.375rem);
    min-height: 3.4375rem;
  }

  body[data-page="home"] .header-inner .brand {
    width: 6rem;
  }

  body[data-page="home"] .checkout-reference-icon {
    width: 1rem;
    height: 1rem;
  }

  body[data-page="home"] .header-actions {
    gap: 0.875rem;
  }

  body[data-page="home"] .menu-toggle,
  body[data-page="home"] .menu-reference-icon {
    width: 1.8125rem;
  }

  body[data-page="home"] .site-header.is-sticky {
    top: 0;
  }

  /* Preserve the mobile reference's text measures on wider phones, too.
     A fluid full-width box changes the authored composition at 390–430px. */
  .home-clients h2,
  .home-experiences h2 {
    max-width: 15.625rem;
    margin-inline: auto;
    margin-bottom: 0.875rem;
  }

  .home-clients p,
  .home-experiences > div > p {
    max-width: 18.75rem;
  }

  body[data-page="home"] .hero-home {
    height: 41.8125rem;
    background-image: url("../images/hero-home-mobile-crop.jpg");
  }

  body[data-page="home"] .hero-home::before {
    background: rgb(0 0 0 / 15%);
  }

  .home-clients p,
  .home-experiences > div > p,
  .experience-card p,
  .home-features .split-copy p,
  .home-features .split.reverse .split-copy p,
  .reviews > div > p {
    font-size: 0.8125rem;
  }

  .review-card p {
    font-size: 0.625rem;
  }

  .review-card header {
    font:
      700 1rem/1.3 Arial,
      sans-serif;
    margin-right: -0.5rem;
    gap: 0.375rem;
  }

  .review-grid {
    padding-left: 2.5rem;
  }

  .google-mark {
    width: 1.5rem;
    height: 1rem;
    background-size: 1.0625rem auto;
  }

  .google-mark::after {
    width: 0.1875rem;
    height: 0.1875rem;
    top: 0.09375rem;
    box-shadow:
      0 0.3125rem #d9d9d9,
      0 0.625rem #d9d9d9;
  }

  .review-time {
    font-size: 0.625rem;
  }

  .social-section p {
    font-size: 0.875rem;
  }

  /* Mobile frame calibration: documents/designs/mobile version.png uses a
     370px page frame. These rules intentionally stay page-scoped so the
     approved desktop composition and the other templates are unaffected. */
  .experience-card h3 {
    font-size: 1rem;
  }

  .experience-card p {
    font-size: 0.6875rem;
    max-width: 14rem;
    margin-inline: auto;
    line-height: 1.6;
  }

  .experience-card:first-child p {
    max-width: 13.5rem;
  }

  .experience-card:nth-child(3) p {
    max-width: 14.5rem;
  }

  .experience-card:last-child p {
    max-width: 15rem;
  }

  .home-experiences {
    padding-bottom: 6.0625rem;
  }

  .home-features .split-copy p,
  .home-features .split.reverse .split-copy p {
    font-size: 0.8125rem;
  }

  .home-features .split {
    gap: 3.1875rem;
  }

  .home-features .split + .split {
    margin-top: 6.1875rem;
  }

  .home-features .split-media {
    width: calc(100% + 1.625rem);
    margin-left: -1rem;
  }

  .home-features .split-copy .btn {
    justify-content: space-between;
    margin-top: 0.3125rem;
  }

  .home-features {
    padding-bottom: 1rem;
  }

  .reviews {
    padding-top: 3.4375rem;
    padding-bottom: 4.4375rem;
  }

  .reviews h2 {
    font-size: 1.1875rem;
  }

  .reviews > div > p {
    font-size: 0.8125rem;
  }

  .review-grid {
    padding-left: 3.1875rem;
  }

  .review-card {
    flex-basis: 14.375rem;
    padding: 1.5rem;
  }

  .review-card header {
    font-size: 0.875rem;
  }

  .review-card p {
    font-size: 0.5rem;
  }

  .review-time {
    font-size: 0.625rem;
  }

  .reviews .carousel-controls,
  .social-section .carousel-controls {
    display: none;
  }

  .social-section {
    padding: 4.6875rem 0 5.25rem;
  }

  .social-section h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }

  .social-section p {
    font-size: 0.8125rem;
  }

  .social-section .narrow {
    gap: 1.875rem;
  }

  .social-section .narrow > div:first-child {
    width: 100%;
    max-width: 16rem;
    padding-inline: 0;
    margin-inline: auto;
  }

  .social-section .socials {
    gap: 0.25rem;
    margin-top: 1.5625rem;
  }

  .social-section .socials svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .social-gallery {
    padding-left: 1.6875rem;
    scroll-padding-inline-start: 1.6875rem;
    gap: 1.9375rem;
  }

  body[data-page="home"] .site-footer {
    padding-top: 3.5625rem;
    padding-bottom: 1.75rem;
  }

  body[data-page="home"] .footer-about p,
  body[data-page="home"] .footer-company p,
  body[data-page="home"] .footer-links ul {
    font-size: 0.75rem;
  }

  body[data-page="home"] .site-footer h3 {
    font-size: 0.9375rem;
  }

  body[data-page="home"] .footer-form input,
  body[data-page="home"] .footer-form textarea {
    font-size: 0.75rem !important;
  }

  body[data-page="home"] .footer-form input {
    min-height: 2.5rem;
  }

  body[data-page="home"] .footer-form textarea {
    min-height: 9.75rem;
  }

  body[data-page="home"] .footer-form .btn {
    min-height: 2.625rem;
    font-size: 0.75rem;
  }

  body[data-page="home"] .footer-form .form-actions {
    margin-top: 0.5rem;
  }

  body[data-page="home"] .footer-company p,
  body[data-page="home"] .footer-links ul {
    line-height: 1.4;
  }

  body[data-page="home"] .footer-bottom {
    margin-top: 2.375rem;
  }
}
