/* 21st.dev-inspired layouts · adapted to Jyoti olive/ivory brand */

/* Floating glass header (sitewide) */
.jw-header {
  position: fixed;
  top: 0.85rem;
  left: 0;
  right: 0;
  padding: 0;
  z-index: 80;
  background: transparent;
}

.jw-header__inner {
  width: min(100% - (var(--jw-pad) * 2), var(--jw-max));
  margin-inline: auto;
  padding: 0.7rem 1rem 0.7rem 1.25rem;
  border-radius: 999px;
  background: rgba(42, 41, 32, 0.55);
  border: 1px solid rgba(227, 218, 208, 0.12);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(42, 40, 32, 0.18);
  min-width: 0;
}

.jw-nav__list a {
  font-size: 0.78rem;
  white-space: nowrap;
}

@media (max-width: 1099px) {
  .jw-header__inner {
    width: min(100% - 1.5rem, var(--jw-max));
  }
}

/* Pills / badges */
.jw-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jw-ivory);
  background: rgba(227, 218, 208, 0.1);
  border: 1px solid rgba(227, 218, 208, 0.2);
  margin-bottom: 1.25rem;
}

.jw-pill--light {
  color: var(--jw-olive);
  background: rgba(91, 90, 65, 0.08);
  border-color: rgba(91, 90, 65, 0.14);
}

.jw-pill__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--jw-khaki);
  box-shadow: 0 0 0 4px rgba(176, 141, 82, 0.2);
  animation: jw-pulse 2s ease-in-out infinite;
}

@keyframes jw-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(176, 141, 82, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(176, 141, 82, 0.08); }
}

/* Centered hero with full-bleed photo */
.jw-hero--center {
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  background: var(--jw-olive-ink);
}

.jw-hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.jw-hero__photo img,
.jw-hero__photo .jw-hero__fallback,
.jw-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.jw-hero__photo img,
.jw-hero__photo .jw-hero__fallback {
  transform: scale(1.04);
}

.jw-hero__video {
  position: absolute;
  inset: 0;
  display: none;
  background: var(--jw-olive-ink);
}

/* Keep inactive videos out of layout but still instant to show (iOS-friendly). */
.jw-hero__video.is-active {
  display: block;
}

.jw-hero__photo.has-video .jw-hero__fallback {
  opacity: 0;
  pointer-events: none;
}

.jw-hero__photo.is-fallback .jw-hero__fallback {
  opacity: 1 !important;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .jw-hero__video {
    display: none !important;
  }

  .jw-hero__photo .jw-hero__fallback {
    opacity: 1 !important;
    pointer-events: auto;
  }
}

.jw-hero--center .jw-hero__veil {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(42, 41, 32, 0.55) 0%, rgba(42, 41, 32, 0.62) 40%, rgba(42, 41, 32, 0.88) 100%),
    radial-gradient(ellipse at 50% 30%, rgba(91, 90, 65, 0.25), transparent 55%);
}

.jw-hero__center {
  position: relative;
  z-index: 2;
  width: min(100% - (var(--jw-pad) * 2), 780px);
  margin: 0 auto;
  padding: 6.5rem var(--jw-pad) 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.jw-h1--center {
  font-size: clamp(2.2rem, 5.2vw, 3.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  max-width: 16ch;
}

.jw-h1--center em {
  display: block;
  font-style: normal;
  font-weight: 300;
  color: var(--jw-gold);
  margin-top: 0.12em;
}

.jw-lead--center {
  margin: 0 auto 1.5rem;
  max-width: 34rem;
  color: rgba(227, 218, 208, 0.82);
}

.jw-actions--center {
  justify-content: center;
  margin-top: 0;
}

/* Infinite marquee */
.jw-marquee {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(227, 218, 208, 0.12);
  padding: 0.85rem 0;
  margin-top: 0;
  background: rgba(42, 41, 32, 0.35);
  backdrop-filter: blur(8px);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.jw-marquee__track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: jw-marquee 32s linear infinite;
}

.jw-marquee__track span {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(227, 218, 208, 0.55);
  white-space: nowrap;
}

.jw-marquee__track span::after {
  content: "·";
  margin-left: 2.5rem;
  opacity: 0.4;
}

@keyframes jw-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Feature split (sticky + media) */
.jw-feature-split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 920px) {
  .jw-feature-split {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .jw-feature-split__sticky {
    position: sticky;
    top: 7rem;
    padding-right: 1rem;
  }
}

.jw-feature-split__media {
  position: relative;
}

.jw-feature-split__media .jw-media {
  width: 100%;
}

.jw-stat-float {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  background: rgba(227, 218, 208, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(91, 90, 65, 0.1);
  box-shadow: 0 16px 40px rgba(42, 40, 32, 0.12);
  text-align: left;
  max-width: 12rem;
}

.jw-stat-float__num {
  display: block;
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  color: var(--jw-olive);
  letter-spacing: -0.03em;
}

.jw-stat-float__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--jw-muted);
}

/* Brands: equal 3-column cards */
.jw-section--brands .jw-section__head {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.jw-brand-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 720px) {
  .jw-brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
  }
}

.jw-brand-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(91, 90, 65, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transform: none !important; /* keep tops aligned; motion uses inner layers */
  transition: box-shadow 0.4s var(--jw-ease);
}

.jw-brand-card:hover {
  box-shadow: 0 22px 48px rgba(42, 40, 32, 0.1);
}

.jw-brand-card__media {
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--jw-olive-deep);
}

@media (min-width: 720px) {
  .jw-brand-card__media {
    height: auto;
    flex-basis: auto;
  }
}

.jw-brand-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.7s var(--jw-ease);
}

.jw-brand-card:hover .jw-brand-card__media img {
  transform: scale(1.05);
}

.jw-brand-card__body {
  padding: 1.35rem 1.4rem 1.55rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.35rem;
  min-height: 12.5rem;
}

.jw-brand-card__body .jw-h3 {
  min-height: 1.4em;
}

.jw-brand-card__body .jw-text {
  flex: 1 1 auto;
  margin: 0;
}

.jw-brand-card__body .jw-link {
  margin-top: auto;
  padding-top: 0.85rem;
}

/* Legacy bento kept unused but non-breaking */
.jw-bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

/* Numbered features */
.jw-features {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 880px) {
  .jw-features {
    grid-template-columns: 1fr 1fr;
  }
}

.jw-feature {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 22px;
  background: var(--jw-white);
  border: 1px solid var(--jw-line);
  overflow: hidden;
  height: 100%;
}

.jw-feature .jw-media {
  border-radius: 0;
}

.jw-feature__index {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--jw-khaki);
  padding: 1.15rem 1.25rem 0;
}

.jw-feature__content {
  padding: 0.35rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}

.jw-feature__content .jw-link {
  margin-top: auto;
  padding-top: 0.75rem;
}

/* Model cards */
.jw-section--model {
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.jw-section--model .jw-section__head {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.jw-model-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  perspective: 1000px;
}

@media (min-width: 700px) {
  .jw-model-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .jw-model-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.jw-model-card {
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(91, 90, 65, 0.1);
  min-height: 100%;
  will-change: transform, opacity, filter;
  transform-origin: center bottom;
  transition: background 0.4s var(--jw-ease), box-shadow 0.4s var(--jw-ease);
}

.jw-model-card:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(42, 40, 32, 0.08);
}

.jw-model-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--jw-olive);
  color: var(--jw-ivory);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* CTA panel */
.jw-section--cta {
  padding-top: clamp(2rem, 4vw, 3rem);
}

.jw-cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(2.25rem, 5vw, 3.75rem);
  background: var(--jw-olive-ink);
  color: var(--jw-ivory);
  border: 1px solid rgba(227, 218, 208, 0.1);
}

.jw-cta-panel__glow {
  position: absolute;
  width: 55%;
  height: 80%;
  top: -30%;
  right: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 184, 150, 0.28), transparent 65%);
  pointer-events: none;
}

.jw-cta-panel .jw-h2,
.jw-cta-panel .jw-lead,
.jw-cta-panel .jw-pill {
  position: relative;
  z-index: 1;
}

.jw-cta-panel .jw-lead {
  color: rgba(227, 218, 208, 0.78);
  max-width: 36rem;
}

.jw-cta-panel .jw-actions {
  position: relative;
  z-index: 1;
}

.jw-btn--outline-light {
  background: transparent;
  color: var(--jw-ivory);
  border-color: rgba(227, 218, 208, 0.4);
}

.jw-btn--outline-light:hover {
  background: rgba(227, 218, 208, 0.1);
  border-color: var(--jw-ivory);
}

/* Section head center tweak */
.jw-section__head--center .jw-pill {
  margin-inline: auto;
}

.jw-section__head--center .jw-h2 {
  max-width: 18ch;
  margin-inline: auto;
}

@media (prefers-reduced-motion: reduce) {
  .jw-marquee__track,
  .jw-pill__dot {
    animation: none !important;
  }

  .jw-hero__preview {
    transform: none;
  }
}
