/* =========================================================
   Homepage style layer — Jerid Tex Tile
   Direction: Luxury Editorial / Premium Textile B2B
   Tokens: warm ink + gold · Cormorant + Montserrat
   Rule: layout unchanged; this file only re-skins home modules.
   ========================================================= */

/* ---------- Section titles ---------- */
/* Higher specificity than .jerid-root h2 so base heading reset cannot zero out padding. */
.jerid-root .jerid-section-title,
.jerid-section-title {
  text-align: center;
  position: relative;
  padding: 40px 0 36px;
  margin: 0 0 14px;
}

.jerid-root .jerid-section-title em,
.jerid-section-title em {
  display: block;
  font-style: normal;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 400;
  color: var(--lux-ink);
  letter-spacing: 0.02em;
  font-family: var(--jerid-heading, Georgia, serif);
  line-height: 1.28;
}

/* gold hairline above title (overrides base ::before if present) */
.jerid-root .jerid-section-title::before,
.jerid-section-title::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 28px;
  height: 1px;
  background: var(--lux-gold, #ca8a04);
  opacity: 0.9;
  transform: translateX(-50%);
  z-index: 1;
}

/* underline that lengthens on section hover */
.jerid-root .jerid-section-title::after,
.jerid-section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 48px;
  height: 1px;
  background: var(--lux-gold, #ca8a04);
  transform: translateX(-50%);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-section:hover .jerid-section-title::after {
  width: 112px;
}

/* ---------- Products ---------- */
.jerid-products {
  padding: 96px 0 80px;
  background: var(--lux-bg, #fafaf9);
}

.jerid-products-lead {
  max-width: 720px;
  margin: 18px auto 52px;
  text-align: center;
  color: var(--lux-body, #57534e);
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.012em;
  padding: 0 16px;
}

.jerid-products-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
}

.jerid-products-grid > li {
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
}

.jerid-product-card {
  height: 100%;
}

.jerid-product-card a {
  display: block;
  text-align: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  height: 100%;
}

.jerid-product-card .jerid-imgs {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--lux-line, #e7e5e4);
  /* dark fallback so backdrop-filter never samples a light gray plate */
  background: #1c1917;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
  isolation: isolate;
  transition:
    border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-product-card .jerid-imgs img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover !important;
  object-position: center;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Decorative corners: first top-left, last bottom-right (layout signature kept) */
.jerid-products-grid > li:first-child .jerid-imgs {
  border-top-left-radius: 96px;
}

.jerid-products-grid > li:first-child:hover .jerid-imgs {
  border-top-left-radius: 4px;
}

.jerid-products-grid > li:last-child .jerid-imgs {
  border-bottom-right-radius: 96px;
}

.jerid-products-grid > li:last-child:hover .jerid-imgs {
  border-bottom-right-radius: 4px;
}

.jerid-product-card:hover .jerid-imgs {
  border-color: var(--lux-gold-line, rgba(202, 138, 4, 0.34));
  box-shadow: var(--lux-shadow-hover, 0 20px 52px rgba(28, 25, 23, 0.13));
}

.jerid-product-card:hover .jerid-imgs img,
.jerid-product-card > a:focus-visible .jerid-imgs img {
  transform: scale(1.08);
}

.jerid-product-card .jerid-info {
  position: absolute;
  inset: 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.28);
  /* blur on the same layer as the veil — fade in together, no backdrop-root snap */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: var(--lux-gold-bright, #eab308);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.jerid-product-card:hover .jerid-info,
.jerid-product-card > a:focus-visible .jerid-info {
  visibility: visible;
  opacity: 1;
}

.jerid-product-card .jerid-info i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78%;
  height: 58%;
  border: 1px solid var(--lux-gold, #ca8a04);
  color: var(--lux-gold-bright, #eab308);
  font-style: normal;
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  /* gold frame only — no child backdrop-filter (that caused the light-gray flash) */
  background: transparent;
}

.jerid-product-card h3 {
  height: auto;
  min-height: 48px;
  margin: 18px 0 0;
  padding: 0 8px 6px;
  font-family: var(--jerid-heading, Georgia, serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--lux-ink, #0c0a09);
  letter-spacing: 0.02em;
  line-height: 1.4;
  overflow: hidden;
  transition: color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-product-card:hover h3 {
  color: var(--lux-gold-ink, #8a5a00);
}

@media (max-width: 1024px) {
  .jerid-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }
  .jerid-products-grid > li:first-child .jerid-imgs {
    border-top-left-radius: 72px;
  }
  .jerid-products-grid > li:last-child .jerid-imgs {
    border-bottom-right-radius: 72px;
  }
  .jerid-products {
    padding: 72px 0 56px;
  }
}

@media (max-width: 640px) {
  .jerid-products-grid {
    grid-template-columns: 1fr;
  }
  .jerid-products-grid > li:not(:first-child):not(:last-child) .jerid-imgs {
    border-radius: 0 !important;
  }
  .jerid-products-grid > li:first-child .jerid-imgs {
    border-top-left-radius: 56px !important;
  }
  .jerid-products-grid > li:last-child .jerid-imgs {
    border-bottom-right-radius: 56px !important;
  }
  .jerid-products {
    padding: 56px 0 40px;
  }
  .jerid-products-lead {
    margin-bottom: 32px;
    font-size: 14px;
  }
}

/* ---------- About ---------- */
.jerid-about {
  padding: 104px 0 88px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      165deg,
      rgba(12, 10, 9, 0.72) 0%,
      rgba(12, 10, 9, 0.55) 45%,
      rgba(28, 25, 23, 0.68) 100%
    ),
    url("/media/site/about-poster.jpg") no-repeat center;
  background-size: cover;
  background-attachment: fixed;
}

.jerid-about-em {
  display: block;
  color: rgba(250, 250, 249, 0.78);
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 32px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-about-em:hover,
.jerid-about-em:focus-visible {
  color: var(--lux-gold, #ca8a04);
}

.jerid-about-row {
  display: flex;
  align-items: stretch;
  gap: 48px;
}

.jerid-about-left {
  flex: 1 1 52%;
  min-width: 0;
}

.jerid-about-video {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(250, 250, 249, 0.16);
  display: block;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  outline: none;
}

.jerid-about-video:focus-visible {
  outline: 2px solid var(--lux-gold, #ca8a04);
  outline-offset: 3px;
}

.jerid-about-right {
  flex: 1 1 48%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.jerid-about-right h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 2.9vw, 38px);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-align: right;
  font-family: var(--jerid-heading, Georgia, serif);
}

.jerid-about-right h2 a {
  color: var(--lux-on-dark, #fafaf9);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-about-right h2 a:hover,
.jerid-about-right h2 a:focus-visible {
  color: var(--lux-gold, #ca8a04);
}

.jerid-about-copy p {
  margin: 0;
  color: rgba(250, 250, 249, 0.86);
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jerid-more {
  margin-top: 32px;
  text-align: right;
}

.jerid-more-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--lux-gold, #ca8a04);
  color: var(--lux-gold, #ca8a04);
  text-decoration: none;
  font-size: 18px;
  border-radius: var(--lux-radius, 2px);
  cursor: pointer;
  transition:
    background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-more-arrow:hover,
.jerid-more-arrow:focus-visible {
  background: var(--lux-gold, #ca8a04);
  color: var(--lux-primary, #1c1917);
  transform: translateX(2px);
}

@media (max-width: 900px) {
  .jerid-about {
    padding: 72px 0 64px;
    background-attachment: scroll;
  }
  .jerid-about-row {
    flex-direction: column;
    gap: 32px;
  }
  .jerid-about-right h2 {
    text-align: left;
  }
  .jerid-more {
    text-align: left;
  }
}

/* ---------- News ---------- */
.jerid-news {
  padding: 96px 0 80px;
  background: var(--lux-bg, #fafaf9);
}

.jerid-news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 28px;
  margin-top: 44px;
  padding: 0;
  list-style: none;
}

.jerid-news-item {
  margin: 0;
  min-width: 0;
  box-sizing: border-box;
  height: 100%;
}

.jerid-news-item a {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  height: 100%;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--lux-surface, #fff);
  transition:
    border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-news-item:hover a,
.jerid-news-item a:focus-visible {
  border-color: var(--lux-gold-line, rgba(202, 138, 4, 0.34));
  box-shadow: var(--lux-shadow, 0 12px 40px rgba(28, 25, 23, 0.06));
}

.jerid-news-item .jerid-news-img {
  background: var(--lux-bg-soft, #f5f5f4);
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 2;
  flex-shrink: 0;
}

.jerid-news-item .jerid-news-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
  border-radius: 0;
  transition:
    border-radius 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Decorative corners kept as layout signature */
.jerid-news-item:first-child .jerid-news-img img {
  border-radius: 88px 0 0 0;
}

.jerid-news-item:last-child .jerid-news-img img {
  border-radius: 0 0 88px 0;
}

.jerid-news-item:hover .jerid-news-img img,
.jerid-news-item a:focus-visible .jerid-news-img img {
  border-radius: 0;
  transform: scale(1.05);
}

/* Template uses .jerid-news-body (not .jerid-news-content) */
.jerid-news-item .jerid-news-body,
.jerid-news-item .jerid-news-content {
  padding: 22px 20px 24px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.jerid-news-item .jerid-news-body h3,
.jerid-news-item .jerid-news-title {
  margin: 0;
  font-family: var(--jerid-heading, Georgia, serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--lux-ink, #0c0a09);
  letter-spacing: 0.015em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-news-item .jerid-news-body p,
.jerid-news-item .jerid-news-content em {
  margin: 0;
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-style: normal;
  font-size: 13px;
  color: var(--lux-muted, #78716c);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jerid-news-item:hover .jerid-news-body h3,
.jerid-news-item:hover .jerid-news-title {
  color: var(--lux-gold-ink, #8a5a00);
}

.jerid-read-more {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lux-gold-ink, #8a5a00);
}

@media (max-width: 900px) {
  .jerid-news {
    padding: 72px 0 56px;
  }
  .jerid-news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
    margin-top: 32px;
  }
}

@media (max-width: 560px) {
  .jerid-news-list {
    grid-template-columns: 1fr;
  }
  .jerid-news-item:not(:first-child):not(:last-child) .jerid-news-img img {
    border-radius: 0 !important;
  }
  .jerid-news-item:first-child .jerid-news-img img {
    border-radius: 56px 0 0 0 !important;
  }
  .jerid-news-item:last-child .jerid-news-img img {
    border-radius: 0 0 56px 0 !important;
  }
}

/* ---------- Partner carousel (kept for any page that mounts it) ---------- */
.jerid-partner {
  padding: 56px 0 72px;
  background: var(--lux-bg, #fafaf9);
}

.jerid-partner-carousel {
  position: relative;
  margin-top: 36px;
  overflow: hidden;
}

.jerid-partner-viewport {
  overflow: hidden;
  width: 100%;
}

.jerid-partner-track {
  display: flex;
  gap: 32px;
  width: max-content;
  will-change: transform;
  animation: jerid-partner-scroll 36s linear infinite;
}

.jerid-partner-carousel:hover .jerid-partner-track {
  animation-play-state: paused;
}

.jerid-partner-slide {
  flex: 0 0 auto;
  width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jerid-partner-cover {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lux-surface, #fff);
  border: 1px solid var(--lux-line, #e7e5e4);
  padding: 12px;
  box-sizing: border-box;
}

.jerid-partner-cover img {
  height: 72px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.jerid-partner-slide:hover img {
  filter: none;
  opacity: 1;
}

@keyframes jerid-partner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Email strip (base; luxury.css may override translucent look) ---------- */
.jerid-email {
  padding: 72px 0 0;
}

.jerid-email .jerid-section-title em {
  color: var(--lux-on-dark, #fafaf9);
}

.jerid-email-lead {
  text-align: center;
  padding: 28px 0 32px;
  color: rgba(250, 250, 249, 0.82);
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin: 0;
}

.jerid-email-form form {
  display: flex;
  justify-content: center;
  align-items: stretch;
  max-width: 720px;
  margin: 0 auto 48px;
  gap: 0;
}

.jerid-email-form input[type="email"] {
  flex: 1 1 auto;
  width: 50%;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(250, 250, 249, 0.28);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  outline: none;
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 15px;
  color: var(--lux-on-dark, #fafaf9);
  background: rgba(250, 250, 249, 0.08);
  box-sizing: border-box;
  transition:
    border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-email-form input[type="email"]::placeholder {
  color: rgba(250, 250, 249, 0.48);
}

.jerid-email-form input[type="email"]:focus {
  border-color: rgba(202, 138, 4, 0.8);
  background: rgba(250, 250, 249, 0.14);
  box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.14);
}

.jerid-email-form button {
  margin-left: 0;
  height: 54px;
  padding: 0 28px;
  border: 1px solid var(--lux-gold, #ca8a04);
  border-radius: 0 2px 2px 0;
  background: var(--lux-gold, #ca8a04);
  color: var(--lux-primary, #1c1917);
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.jerid-email-form button:hover {
  background: var(--lux-gold-bright, #eab308);
  border-color: var(--lux-gold-bright, #eab308);
}

.jerid-email-form button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.jerid-email-msg {
  text-align: center;
  color: var(--lux-gold-bright, #eab308);
  margin: -28px 0 28px;
  font-family: var(--jerid-font, system-ui, sans-serif);
  font-size: 14px;
}

@media (max-width: 640px) {
  .jerid-email {
    padding: 48px 0 0;
  }
  .jerid-email-form form {
    flex-direction: column;
    gap: 12px;
  }
  .jerid-email-form input[type="email"],
  .jerid-email-form button {
    margin: 0;
    width: 100%;
    border-radius: 2px;
  }
  .jerid-email-form input[type="email"] {
    border-right: 1px solid rgba(250, 250, 249, 0.28);
  }
}

/* ---------- Banner ---------- */
.jerid-banner {
  position: relative;
  overflow: hidden;
  background: var(--lux-primary, #1c1917);
  line-height: 0;
  /* fill container height so images cover; jerid.css sets min(74vh,700px) */
  height: min(74vh, 700px);
  min-height: 420px;
}

.jerid-banner-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.jerid-banner-slide {
  min-width: 100%;
  position: relative;
}

.jerid-banner-slide a {
  display: block;
  width: 100%;
  cursor: pointer;
}

.jerid-banner-slide,
.jerid-banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.jerid-banner-slide img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center;
}

/* soft bottom vignette so dots stay legible */
.jerid-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(12, 10, 9, 0.18) 0%,
    rgba(12, 10, 9, 0) 30%,
    rgba(12, 10, 9, 0) 62%,
    rgba(12, 10, 9, 0.38) 100%
  );
  z-index: 1;
}

.jerid-banner-btn {
  z-index: 3;
  cursor: pointer;
}

.jerid-banner-dots {
  z-index: 3;
}

/* ---------- A11y / motion ---------- */
.jerid-product-card a:focus-visible,
.jerid-news-item a:focus-visible,
.jerid-more-arrow:focus-visible,
.jerid-email-form button:focus-visible,
.jerid-banner-btn:focus-visible,
.jerid-banner-dots button:focus-visible {
  outline: 2px solid var(--lux-gold, #ca8a04);
  outline-offset: 3px;
}

/* reveal fallback: never leave content invisible */
.jerid-wow {
  opacity: 1;
  transform: none;
}

.jerid-wow.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .jerid-products-grid > li .jerid-imgs,
  .jerid-products-grid > li .jerid-imgs img,
  .jerid-news-item .jerid-news-img img,
  .jerid-news-item a,
  .jerid-more-arrow,
  .jerid-email-form input[type="email"],
  .jerid-email-form button,
  .jerid-section-title::after,
  .jerid-banner-track {
    transition: none !important;
    animation: none !important;
  }

  .jerid-product-card:hover .jerid-imgs img,
  .jerid-news-item:hover .jerid-news-img img,
  .jerid-more-arrow:hover {
    transform: none !important;
  }

  .jerid-about {
    background-attachment: scroll;
  }

  .jerid-partner-track {
    animation: none !important;
  }
}
