/* Homepage. All px values match the 1728px "Home" frame in Figma 1:1. */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* The page is a fixed 1728px desktop frame. scripts/fit.js scales it down
   proportionally on narrower desktop screens (mobile layouts come later). */
.page {
  position: relative;
  width: var(--frame-width);
  margin: 0 auto;
  zoom: var(--page-zoom, 1);
  padding-bottom: 88px;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  height: 316.5px; /* marquee starts at y=316.5 */
}

/* Home button: a dot-matrix house in the style of the London 20 Dot headline.
   On hover the dots turn cream and the door lights up. */
.home-btn {
  position: absolute;
  left: var(--margin);
  top: 45px; /* centred on the Contact button */
  width: 37px;
  height: 37px;
  display: block;
  color: var(--color-text);
}
.home-icon { display: block; overflow: visible; }
.home-icon circle {
  fill: currentColor;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill .2s ease, transform .2s ease;
}
.home-door circle { opacity: 0; transition: opacity .2s ease; }
.home-btn:hover,
.home-btn:focus-visible { color: var(--color-cream); }
.home-btn:hover .home-dots circle { transform: scale(1.15); }
.home-btn:hover .home-door circle,
.home-btn:focus-visible .home-door circle { opacity: 1; fill: var(--color-coral); }
@media (prefers-reduced-motion: reduce) {
  .home-btn:hover .home-dots circle { transform: none; }
}

.contact-btn {
  position: absolute;
  left: 1523px;
  top: 44px;
  width: 125px;
  height: 39px;
  border: 1px solid var(--color-cream);
  border-radius: 19.5px;
  padding-left: 27px;
  display: flex;
  align-items: center;
  color: var(--color-cream);
  font-weight: 300;
  font-size: 20.678px;
  letter-spacing: -1.0339px;
  transition: background-color .2s ease, color .2s ease;
}
.contact-btn:hover { background: var(--color-cream); color: var(--color-bg); }

.hero-title {
  position: absolute;
  left: var(--margin);
  top: 1px;
  margin: 0;
  pointer-events: none; /* its box overlaps the header buttons */
}
.hero-title img { width: 1568px; height: 398px; }

/* ---------- Logo marquee ---------- */
.marquee {
  position: relative;
  height: 108px;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee-set {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  height: 108px;
  flex-shrink: 0;
}
.marquee-set img { height: 98.07px; width: auto; }
.marquee-set img.logo-tall { height: 108px; }
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Work grid ---------- */
.work {
  display: grid;
  grid-template-columns: repeat(3, var(--tile-w));
  column-gap: var(--tile-gap);
  row-gap: 39px;
  padding: 74.24px var(--margin) 0; /* first tile top: y=498.74 */
}

.tile { display: block; }

.tile-image {
  width: var(--tile-w);
  height: var(--tile-h);
  border-radius: var(--tile-radius);
  overflow: hidden;
  background: var(--color-tile);
}
.tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.tile:hover .tile-image img { transform: scale(1.03); }

.tile-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 37px;
  margin-top: 16px;
}
.tile-title {
  margin: 0;
  font-weight: 700;
  font-size: 20px;
  line-height: 35px;
  letter-spacing: -0.4px;
  text-transform: uppercase;
}
.tile-tags {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile-tags li {
  display: flex;
  align-items: center;
  height: 24.35px;
  padding: 0 15.79px;
  border: 0.738px solid var(--color-text);
  border-radius: 999px;
  font-weight: 300;
  font-size: 12.546px;
  letter-spacing: -0.2509px;
  white-space: nowrap;
}

/* ---------- Let's work card ---------- */
.contact-card {
  position: relative;
  margin: 52px var(--margin) 0; /* card top: y=1835 */
  height: 445px;
  border-radius: 29.782px;
  background: var(--color-card);
}
.contact-card h2 {
  position: absolute;
  left: 44.67px;
  top: 44.67px;
  margin: 0;
  font-weight: 400;
  font-size: 29.782px;
  line-height: 29.782px;
  letter-spacing: -2.0847px;
}
.contact-link {
  position: absolute;
  right: 80.7px;
  display: block;
  font-weight: 300;
  font-size: 74.635px;
  line-height: 21.324px;
  height: 22px;
  letter-spacing: -5.2245px;
  white-space: nowrap;
  transition: color .2s ease;
}
.contact-link:hover { color: var(--color-cream); }
.contact-email { top: 68.5px; }
.contact-phone { top: 174.22px; }

.contact-card .wordmark-footer {
  position: absolute;
  left: 44.67px;
  top: 346.67px;
  width: 120px;
  height: 49px;
}

.socials {
  position: absolute;
  left: 1207.64px;
  top: 313px;
  display: flex;
  gap: 27.306px;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82.954px;
  height: 82.954px;
  transition: opacity .2s ease;
}
.socials a:hover { opacity: .7; }
.socials img { width: 82.954px; height: 82.954px; }
.socials img.icon-linkedin { width: 67.4px; height: 67.4px; }
