/* =====================================================================
   Eralux landing pages — the parts /lutron and /aria share

   The page shell (background, gutters, heading, type scale) and the
   product tile. Both pages carried their own copy of all of this; the
   copies had begun to drift, which is how one page ended up with tiles
   whose pictures were sized differently from the other's.

   Loaded before each page's own stylesheet, so a page can still override
   anything here when it genuinely needs to.
   ===================================================================== */

/* ---- Page shell ------------------------------------------------------ */

.ews-landing {
  background: var(--ews-paper);
  color: var(--ews-ink);
  font-family: var(--ews-font);
}

.ews-landing-heading {
  min-height: clamp(280px, 38vw, 480px);
  display: flex;
  align-items: flex-end;
}

.ews-landing-subtitle {
  margin: 14px 0 0;
  line-height: 1.45;
  font-weight: var(--ews-weight-light);
}

.ews-landing-content {
  /* No max-width and no auto margins: the header and the footer are
     full-bleed with one gutter (--ews-gutter, i.e. the page's horizontal
     padding), so capping the content and centring it indented every
     section of these pages well inside the logo above them. */
  padding: var(--ews-page-pad-top) var(--ews-gutter) var(--ews-page-pad-bottom);
  display: grid;
  /* minmax(0, 1fr), not 1fr: a grid track's default minimum is its
     content, so a wide child — the ARIA comparison table — would stretch
     this column and with it every section on the page, past the viewport.
     That is how a scrollable table ends up dragging the whole document
     sideways instead. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(56px, 7vw, 108px);
}

.ews-landing-content h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: var(--ews-weight-light);
  letter-spacing: -0.01em;
}

.ews-landing-content p {
  font-size: var(--ews-body-size);
  line-height: var(--ews-body-leading);
  margin: 0 0 16px;
  max-width: 68ch;
}

.ews-landing-lead {
  font-size: clamp(17px, 1.3vw, 20px) !important;
  font-weight: var(--ews-weight-medium);
}

.ews-landing-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: var(--ews-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ews-muted-ink);
}

.ews-landing-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 15px;
  font-weight: var(--ews-weight-semibold);
  letter-spacing: 0.02em;
  color: var(--ews-accent-dark);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.ews-landing-link:hover,
.ews-landing-link:focus-visible {
  color: var(--ews-ink);
}

/* ---- Product tiles --------------------------------------------------- */

.ews-tile-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(14px, 1.8vw, 26px);
}

.ews-tile {
  display: flex;
  flex-direction: column;
  background: var(--ews-card);
  border: 1px solid var(--ews-line);
  border-radius: 14px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.ews-tile:hover,
.ews-tile:focus-visible {
  border-color: var(--ews-accent);
  transform: translateY(-2px);
  box-shadow: var(--ews-shadow);
}

/* A fixed frame, sized by the tile and not by the photograph.
   height:100% on an auto-height parent resolves to auto, so the box used
   to take the picture's OWN aspect ratio: a square sensor render made a
   tall box, a dongle a short one, and the caption under each tile started
   at a different height. Absolutely positioning the image inside a box
   whose ratio is declared here decouples the two for good. */
.ews-tile-media {
  position: relative;
  display: block;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ews-paper-2);
}

.ews-tile-media img,
.ews-tile-media .image-placeholder {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  /* contain, not cover: cropping a fixture to fill the tile cuts the end
     off a six-foot linear. */
  object-fit: contain;
  padding: 14px;
  box-sizing: border-box;
}

.ews-tile-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 5px;
  padding: 16px 18px 20px;
}

.ews-tile-family {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ews-muted-ink);
}

.ews-tile-name {
  font-size: 17px;
  font-weight: var(--ews-weight-semibold);
  line-height: 1.3;
}

/* Pushed to the bottom of the tile: names run to one line or to four, and
   without this the SKUs sat at a different height in every tile of a row. */
.ews-tile-code {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  color: var(--ews-muted-ink);
}

/* ---- Phones ---------------------------------------------------------- */

@media (max-width: 600px) {
  /* A shorter hero: at 390px wide the 38vw floor was still handing the
     heading two thirds of the screen before a word of copy appeared. */
  .ews-landing-heading {
    min-height: clamp(220px, 58vw, 300px);
  }

  .ews-landing-content {
    gap: clamp(40px, 11vw, 64px);
  }

  /* Two tiles per row rather than one: a fixture photo does not need half
     a phone screen, and one column turns eight products into a lot of
     scrolling. */
  .ews-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ews-tile-body {
    padding: 12px 12px 16px;
  }

  .ews-tile-name {
    font-size: 15px;
  }

  .ews-tile-media img {
    padding: 10px;
  }
}
