/* MoE Clear Flag trophy feature — premium lead section of the landing page */
.clearflag {
  --gold: #E9B949;
  --gold-hi: #FFE7A3;
  --gold-lo: #B8791F;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 7vw, 6.5rem) var(--gutter);
  color: #FBF3E4;
  background:
    radial-gradient(50% 60% at 78% 45%, rgba(233, 185, 73, .26), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(138, 21, 56, .55), transparent 70%),
    linear-gradient(155deg, #23040F 0%, #4A0A1F 45%, #160208 100%);
}
/* Fine gold frame and diagonal sheen */
.clearflag::before {
  content: "";
  position: absolute;
  inset: clamp(.6rem, 1.4vw, 1.2rem);
  z-index: -1;
  border: 1px solid rgba(255, 231, 163, .28);
  border-radius: 4px;
  pointer-events: none;
}
.clearflag::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .08;
  background: repeating-linear-gradient(135deg, transparent 0 22px, var(--gold-hi) 22px 23px);
  mask-image: radial-gradient(70% 70% at 25% 40%, #000, transparent 75%);
}

.clearflag-kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: .5rem 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #2A0610;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(233, 185, 73, .18), 0 10px 28px rgba(0, 0, 0, .4);
}
.clearflag-kicker svg { width: 1rem; height: 1rem; }

.clearflag-title {
  margin: 1.4rem 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  line-height: .9;
  letter-spacing: -.02em;
}
.clearflag-title span { display: block; }
.clearflag-three {
  font-size: clamp(2.2rem, 4.6vw, 4.8rem);
  font-style: italic;
  font-weight: 500;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gold-hi);
}
.clearflag-flag {
  font-size: clamp(3rem, 7vw, 7.2rem);
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--gold-lo) 0%, var(--gold-hi) 30%, var(--gold) 50%, #FFF6D8 62%, var(--gold-lo) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5));
  animation: clearflag-shine 6s var(--ease) infinite;
}

.clearflag-lede {
  max-width: 44ch;
  margin: 1.6rem 0 0;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: rgba(251, 243, 228, .86);
}
.clearflag-lede strong { color: var(--gold-hi); font-weight: 600; }

.clearflag-streak {
  display: flex;
  gap: clamp(.6rem, 1.5vw, 1rem);
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.clearflag-streak li {
  display: grid;
  justify-items: center;
  gap: .45rem;
  min-width: 5.5rem;
  padding: .9rem .8rem .75rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(251, 243, 228, .72);
  border: 1px solid rgba(255, 231, 163, .3);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 231, 163, .1), rgba(255, 231, 163, .02));
  animation: clearflag-rise .9s var(--ease-out) both;
}
.clearflag-streak li:nth-child(2) { animation-delay: .15s; }
.clearflag-streak li:nth-child(3) { animation-delay: .3s; border-color: var(--gold); box-shadow: 0 0 24px rgba(233, 185, 73, .3); }
.clearflag-streak span {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--gold-hi);
}

.clearflag-arabic {
  margin: 1.6rem 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  color: var(--gold);
  text-align: left;
}

/* Photo stack */
.clearflag-gallery { position: relative; padding: 0 0 3rem 0; }
.clearflag-photo { margin: 0; }
.clearflag-photo img { display: block; width: 100%; height: auto; }
.clearflag-photo--main {
  width: 88%;
  margin-left: auto;
  padding: .55rem;
  background: linear-gradient(140deg, var(--gold-hi), var(--gold-lo) 45%, var(--gold) 70%, #FFF6D8);
  border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55);
  animation: clearflag-rise 1.1s var(--ease-out) both;
}
.clearflag-photo--main img { border-radius: 3px; }
.clearflag-photo--inset {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38%;
  padding: .35rem;
  background: #FBF3E4;
  border-radius: 4px;
  transform: rotate(-4deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .55);
  animation: clearflag-rise-inset 1.1s .25s var(--ease-out) both;
}

.clearflag-seal {
  position: absolute;
  top: -1.5rem;
  right: -1rem;
  display: grid;
  place-items: center;
  width: clamp(6rem, 10vw, 8rem);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #2A0610;
  background: radial-gradient(circle at 35% 30%, #FFF6D8, var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), inset 0 0 0 3px rgba(42, 6, 16, .25);
}
.clearflag-seal svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: clearflag-spin 24s linear infinite;
}
.clearflag-seal text {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9.4px;
  font-weight: 600;
  letter-spacing: .12em;
  fill: currentColor;
}
.clearflag-seal strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
}

@keyframes clearflag-shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes clearflag-rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; } }
@keyframes clearflag-spin { to { transform: rotate(360deg); } }
@keyframes clearflag-rise-inset { from { opacity: 0; transform: translateY(30px) rotate(-4deg); } to { opacity: 1; transform: rotate(-4deg); } }

@media (max-width: 860px) {
  .clearflag { grid-template-columns: 1fr; text-align: center; }
  .clearflag-kicker { font-size: .62rem; }
  .clearflag-lede { margin-inline: auto; }
  .clearflag-streak { justify-content: center; }
  .clearflag-arabic { text-align: center; }
  .clearflag-seal { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .clearflag *, .clearflag *::before { animation: none !important; }
}
