/* =========================================================
   NICHES & FORMATS: format tiles (.fx-grid)
   Clean white cards: the icon in a soft pastel circle, the name below.
   Optional art: images/formats/<name>.webp (square, transparent) replaces the icon.
========================================================= */

.fx-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  /* max-width: 1100px; */
  margin: 46px auto 0;
  padding: 0;
  list-style: none;
}

/* six purple-family tints, in turn: --c/--c2 icon gradient, --p circle pastel */
.fx-c1 { --c: #9d6dff; --c2: #5a1fd0; --p: #ece2ff; }
.fx-c2 { --c: #c86cf2; --c2: #7a1fb8; --p: #f6e4fd; }
.fx-c3 { --c: #7d8bff; --c2: #3a2fc4; --p: #e4e8ff; }
.fx-c4 { --c: #e07ad8; --c2: #8e2a9e; --p: #fbe3f6; }
.fx-c5 { --c: #b79cff; --c2: #6a36dc; --p: #efe8ff; }
.fx-c6 { --c: #8f6bff; --c2: #2c0085; --p: #e7e0ff; }

.fx-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 0;
  padding: 26px 16px 22px;
  border: 1px solid #ece4fb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 0 #fff inset, 0 18px 36px -24px rgba(0, 0, 0, .7);
  text-align: center;
}

/* icon in a pastel circle */
.fx-art {
  order: 1;
  position: relative;
  display: grid;
  place-items: center;
width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #fff, var(--p) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}
/* art that brings its own round backdrop: our circle steps aside */
.fx-art:has(img) { background: none; box-shadow: none; }
.fx-art img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.fx-art img + i { display: none; }
.fx-art i {
  display: block;
  font-size: 62px;
  line-height: 1;
  background: linear-gradient(160deg, var(--c) 10%, var(--c2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 10px rgba(60, 20, 140, .25));
}
.fx-art i::before { display: block; }

/* name in a pill: the same size on every card, tinted with the card's own colour */
.fx-name {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 210px;
  height: 38px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c) 30%, #fff);
  border-radius: 100px;
  background: linear-gradient(180deg, #fff, var(--p));
  box-shadow: inset 0 1px 0 #fff, 0 5px 12px -7px color-mix(in srgb, var(--c2) 70%, transparent);
  color: var(--t);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* the old dotted rule and button are not used in this design */
.fx-meta { display: none; }

/* a colour of its own for every card: --p pastel circle and pill, --c/--c2 icon, --t pill text */
.fx-grid > li:nth-child(1)  { --p: #ebe2ff; --c: #9d6dff; --c2: #5a1fd0; --t: #4a12b8; } /* lavender */
.fx-grid > li:nth-child(2)  { --p: #dcf4e6; --c: #34c38f; --c2: #0f8a5f; --t: #0f6e4c; } /* mint */
.fx-grid > li:nth-child(3)  { --p: #ffe4d4; --c: #ff9a62; --c2: #e8592a; --t: #b4441c; } /* peach */
.fx-grid > li:nth-child(4)  { --p: #dfe8ff; --c: #5b8cff; --c2: #2a52d9; --t: #2442b0; } /* blue */
.fx-grid > li:nth-child(5)  { --p: #e4e4ff; --c: #7b7dff; --c2: #4338ca; --t: #3730a3; } /* periwinkle */
.fx-grid > li:nth-child(6)  { --p: #fff0c8; --c: #f6b73c; --c2: #d98a06; --t: #9a5b00; } /* butter */
.fx-grid > li:nth-child(7)  { --p: #d9efff; --c: #38a8f5; --c2: #0b72c4; --t: #0b5c9e; } /* sky */
.fx-grid > li:nth-child(8)  { --p: #ffe1e8; --c: #ff6b8a; --c2: #e0335a; --t: #b0213f; } /* rose */
.fx-grid > li:nth-child(9)  { --p: #f0e2ff; --c: #b46bff; --c2: #7a2fd6; --t: #6a1fb8; } /* lilac */
.fx-grid > li:nth-child(10) { --p: #ffe7d2; --c: #ff8a4c; --c2: #e2621c; --t: #a94612; } /* apricot */
.fx-grid > li:nth-child(11) { --p: #fff2c4; --c: #f2c230; --c2: #c9940a; --t: #8a6300; } /* gold */
.fx-grid > li:nth-child(12) { --p: #dceeff; --c: #4fb3ff; --c2: #1677d2; --t: #125e9e; } /* azure */

/* =========================================================
   Section heading (.nt-title)
   Line 1 large and white, line 2 a glass pill between two fine rules
   (the dashes), line 3 ends in a gradient phrase with a swoosh under it.
========================================================= */
.gmnighttile27-section .gmnighttile27-heading { position: relative; isolation: isolate; }
.gmnighttile27-section .gmnighttile27-heading::before {
  content: "";
  position: absolute;
  inset: -10% 12% -6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(125, 75, 240, .32), transparent);
  filter: blur(20px);
  pointer-events: none;
}
.gmnighttile27-section .gmnighttile27-heading-line { display: none; }

body.cyber-monday.cyber-monday .gmnighttile27-section .nt-title {
  margin: 0;
  color: #fff !important;
  font-family: "Archivo", "Arial Black", Arial, sans-serif !important;
  font-stretch: 108%;
  font-size: clamp(30px, 4vw, 56px) !important;
  font-weight: 900 !important;
  letter-spacing: -.03em;
  line-height: 1.12 !important;
}
.nt-title b { display: block; font-weight: inherit; }

/* line 2: fine rule, glass pill, fine rule */
.nt-title .nt-l2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 14px;
}
.nt-title .nt-dash {
  flex: none;
  display: block;
  width: 70px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #b68fff);
  color: transparent;
  font-size: 0;
}
.nt-title .nt-l2 .nt-dash:last-child { background: linear-gradient(90deg, #b68fff, transparent); }
.nt-title .nt-l2 em {
  display: inline-block;
  padding: 9px 26px 11px;
  border: 1px solid rgba(201, 173, 255, .38);
  border-radius: 100px;
  background: linear-gradient(180deg, rgba(157, 109, 255, .22), rgba(90, 31, 208, .12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 12px 30px -14px rgba(125, 75, 240, .9);
  color: #e9deff;
  font-family: "Inter", Arial, sans-serif;
  font-size: .46em;
  font-stretch: 100%;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.3;
}

/* line 3: gradient phrase with a swoosh */
body.cyber-monday.cyber-monday .gmnighttile27-section .nt-title .nt-l3 > span {
  position: relative;
  display: inline-block;
  padding: 0 .04em .08em;
  background: linear-gradient(95deg, #f3ecff 0%, #c9adff 40%, #9d6dff 75%, #7d4bf0 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}
body.cyber-monday.cyber-monday .gmnighttile27-section .nt-title .nt-l3 > span::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 4%;
  bottom: -.16em;
  height: .26em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23c9adff' stop-opacity='.2'/%3E%3Cstop offset='.5' stop-color='%23b68fff'/%3E%3Cstop offset='1' stop-color='%237d4bf0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M3 15 C 80 4, 190 2, 297 9' fill='none' stroke='url(%23g)' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ---------- smaller screens ---------- */
@media (max-width: 1199px) {
  .fx-grid { gap: 18px; }
}
@media (max-width: 991px) {
  .fx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .nt-title .nt-l2 { gap: 10px; margin: 12px 0 10px; }
  .nt-title .nt-dash { width: 22px; }
  .nt-title .nt-l2 em { padding: 7px 14px 8px; font-size: 16px; }
  .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
  .fx-tile { gap: 12px; padding: 18px 10px 16px; border-radius: 14px; }
  .fx-name { max-width: none; height: 30px; padding: 0 8px; font-size: 11.5px; }
  .fx-art { width: 90px; height: 90px; }
  .fx-art i { font-size: 44px; }
}
