/* Village Handcrafted Cabinetry — Trade Partner Portal
   Built to the marketing comp (1366px artboard). */

:root {
  --cream: #efece4;
  --ink: #262523;
  --gutter: 77px;              /* comp: logo left edge / avatar right edge */
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 148px;
  padding: 0 var(--gutter);
  background: var(--cream);
}

/* the logo PNG ships on a white block; multiply drops it onto the cream */
.nav-logo img { width: 330px; mix-blend-mode: multiply; }

.nav-links {
  display: grid;
  grid-template-columns: repeat(3, 172px);   /* comp: link centres 172px apart */
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  text-align: center;
  font-size: 24px;
  text-transform: uppercase;
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { border-bottom: 1px solid var(--ink); }

.nav-user {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #d8d2c6;
  font-size: 28px;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.nav-user img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    url("Photos/KitchenBack-web.jpg") left 54% / cover no-repeat;
}

/* the comp sits both text blocks below the optical centre; padding halves into the offset */
.hero--tall    { height: clamp(340px, 33.8vw, 462px); padding-top: 42px; }  /* comp: 462 / 1366 */
.hero--short   { height: clamp(200px, 17.3vw, 236px); }                     /* comp: 236 / 1366 */
.hero--gallery { padding-top: 67px; }

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.22vw, 44px);   /* comp: cap height 31px */
  font-weight: 300;
  text-transform: uppercase;
}

.lead-times {
  margin: 10px 0 0;
  font-size: clamp(16px, 1.76vw, 24px);
  line-height: 1.38;
  text-transform: uppercase;
}

/* gallery search — comp: 262 x 54, 29px under the title */
.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 262px;
  max-width: 100%;
  margin: 17px auto 0;
  padding: 0 18px;
  height: 54px;
  border: 1px solid var(--ink);
  background: transparent;
}

.hero-search svg { flex: none; width: 22px; height: 22px; }

.hero-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-search input::placeholder { color: var(--ink); opacity: 1; }
.hero-search input:focus { outline: none; }

/* ---------- home: video ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;      /* comp: 1366 x 768 */
  background: #ded8cc;
}

.video video { position: relative; width: 100%; height: 100%; object-fit: cover; }

.video-placeholder {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  justify-items: center;
  font-size: 20px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7d766a;
}

.video-placeholder::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 26px solid currentColor;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}

/* ---------- home: photo mosaic ---------- */

.mosaic .row { display: grid; }

.mosaic img { width: 100%; height: 100%; object-fit: cover; }

/* column splits + row heights taken straight off the comp */
.row-1 { grid-template-columns: 740fr 626fr; aspect-ratio: 1366 / 550; }
.row-2 { grid-template-columns: 525fr 842fr; aspect-ratio: 1366 / 591; }
.row-3 { aspect-ratio: 1366 / 779; }
.row-4 { grid-template-columns: 1fr 1fr;   aspect-ratio: 1366 / 876; }
.row-5 { grid-template-columns: 1fr 1fr;   aspect-ratio: 1366 / 942; }

/* ---------- resources ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-bottom: 96px;
}

.cards figure { margin: 0; }

.cards figure > img,
.cards .placeholder { aspect-ratio: 683 / 442; object-fit: cover; width: 100%; }

.cards figcaption {
  padding: 31px 24px 0;
  text-align: center;
  font-size: clamp(16px, 1.76vw, 24px);
  text-transform: uppercase;
}

/* ---------- gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-bottom: 96px;
}

.gallery-grid img { width: 100%; aspect-ratio: 683 / 433; object-fit: cover; }

.gallery-empty {
  grid-column: 1 / -1;
  padding: 80px 24px;
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d766a;
}

/* ---------- asset placeholder (drop the real file in and delete the div) ---------- */

.placeholder {
  display: grid;
  place-content: center;
  background: #ded8cc;
  color: #7d766a;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 24px;
}

/* ---------- narrow screens ---------- */

@media (max-width: 1120px) {
  :root { --gutter: 24px; }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    height: auto;
    padding: 20px var(--gutter);
  }

  .nav-logo img { width: 240px; }
  .nav-links { grid-template-columns: repeat(3, auto); gap: 24px; }
  .nav-links a { font-size: 16px; }
  .nav-user { margin-left: 0; width: 56px; height: 56px; font-size: 20px; }
  .hero--tall, .hero--gallery { padding-top: 24px; padding-bottom: 24px; }
}

@media (max-width: 720px) {
  .mosaic .row,
  .cards,
  .gallery-grid { grid-template-columns: 1fr; aspect-ratio: auto; }

  .mosaic img { height: auto; aspect-ratio: 4 / 3; }
  .cards figcaption { padding-bottom: 40px; }
}
