/* ==========================================================================
   Athar - Homepage Specific Styles (Hero, Trapezium, Card Fan, Sections)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO SECTION (1:1 from home.dart & PlayerTrapezium.dart)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-dark);
}

.hero-mobile-bg {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-mobile-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mobile-bg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--map-clarity-gradient);
}

.hero-content-row {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
}

.hero-text-col {
  flex: 2;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  animation: heroFadeIn 700ms var(--ease-out-cubic) 500ms forwards;
  opacity: 0;
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-title {
  font-family: var(--font-body);
  font-weight: 600; /* Crisp Alexandria title weight */
  font-size: clamp(70px, 5vw, 100px);
  line-height: 1.02;
  color: #ffffff;
  letter-spacing: normal;
  text-transform: uppercase;
}

.hero-subtitle {
  color: var(--color-text-faded);
  font-size: 13px;
  max-width: 600px;
  line-height: 1.5;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 20px;
}

/* Hero Trapezium Graphic on Desktop (Exact 53vw/63vw matching Flutter) */
.hero-trapezium-col {
  flex: 2;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.hero-trapezium-container {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 53vw;
  /* Opponent Trapezium Clipper geometry: narrower top, wider bottom */
  clip-path: polygon(34.82% 0%, 100% 0%, 100% 100%, 6.25% 100%);
  animation: heroTrapeziumSlide 500ms var(--ease-out-cubic) forwards;
}

@keyframes heroTrapeziumSlide {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.hero-trapezium-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Responsive adjustments for Hero */
@media (min-width: 1300px) {
  .hero-trapezium-col {
    flex: 3;
  }
  .hero-trapezium-container {
    width: 63vw; /* Exact superBig width from Flutter */
  }
  .hero-text-col {
    padding: 0 80px;
  }
}

@media (min-width: 1950px) {
  .hero-text-col {
    padding: 0 130px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
}

@media (max-width: 1060px) {
  .hero-trapezium-col {
    display: none;
  }
  .hero-mobile-bg {
    display: block;
  }
  .hero-text-col {
    align-items: center;
    text-align: center;
    padding: 140px 20px 40px 20px;
  }
  .hero-title {
    font-size: 52px;
  }
  .hero-badges-row {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   2. MEDIA & TUTORIAL SECTIONS
   -------------------------------------------------------------------------- */
.section-centered-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.section-heading-big {
  font-family: var(--font-body);
  font-size: clamp(52px, 5vw, 100px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 32px;
}

@media (max-width: 620px) {
  .section-centered-content {
    padding: 60px 15px;
  }
  .section-heading-big {
    font-size: 52px;
  }
}

/* --------------------------------------------------------------------------
   3. HEROES SECTION ("COMMAND THE RIGHTEOUS")
   -------------------------------------------------------------------------- */
.heroes-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-dark);
}

.heroes-bg-underlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.heroes-bg-underlay-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heroes-bg-underlay-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--map-clarity-gradient);
}

.heroes-content-row {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
}

/* Left Column: Interactive 3-Card Fan */
.heroes-interactive-col {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  position: relative;
}

.heroes-card-stack {
  position: relative;
  width: 220px;
  height: 314px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-item {
  position: absolute;
  width: 220px;
  height: 314px;
  border-radius: 5px;
  transition: transform 500ms var(--ease-out-cubic);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.card-frame {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
  border: 2.5px solid transparent;
  background-color: #000000;
}

.card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Rarity border styles */
.card-item.rarity-rare .card-frame { border-color: var(--rarity-rare); }
.card-item.rarity-epic .card-frame { border-color: var(--rarity-epic); }
.card-item.rarity-legendary .card-frame { border-color: var(--rarity-legendary); }

/* Floating Name Tags */
.card-nametag {
  position: absolute;
  padding: 8px 18px;
  background-color: rgba(0, 0, 0, 0.85);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  border: 2px solid;
  transition: transform 500ms var(--ease-out-cubic), opacity 500ms var(--ease-out-cubic);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.card-nametag.tag-epic {
  border-color: var(--rarity-epic);
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.card-nametag.tag-rare {
  border-color: var(--rarity-rare);
  bottom: -55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.card-nametag.tag-legendary {
  border-color: var(--rarity-legendary);
  bottom: -55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Initial Stacked State */
.heroes-card-stack .card-left {
  transform: translate(0, 0) rotate(0deg);
  z-index: 1;
}

.heroes-card-stack .card-right {
  transform: translate(0, 0) rotate(0deg);
  z-index: 2;
}

.heroes-card-stack .card-center {
  transform: translate(0, 0);
  z-index: 3;
}

.heroes-card-stack .card-nametag {
  opacity: 0;
}

/* Fanned Out State matching exact visual reference */
.heroes-card-stack.is-visible .card-center {
  transform: translateY(-20px);
}

.heroes-card-stack.is-visible .card-left {
  transform: translate(-100px, 15px) rotate(-21.6deg);
  transform-origin: bottom center;
}

.heroes-card-stack.is-visible .card-right {
  transform: translate(100px, 15px) rotate(21.6deg);
  transform-origin: bottom center;
}

.heroes-card-stack.is-visible .tag-epic {
  opacity: 1;
  transform: translateX(-50%) translateY(-20px);
}

.heroes-card-stack.is-visible .tag-rare {
  opacity: 1;
  transform: translate(calc(-50% - 100px), 15px);
}

.heroes-card-stack.is-visible .tag-legendary {
  opacity: 1;
  transform: translate(calc(-50% + 100px), 15px);
}

/* Hover Lore Tooltips */
.card-item .card-tooltip {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 260px;
  padding: 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: #ffffff;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms var(--ease-out-cubic), transform 200ms var(--ease-out-cubic);
  z-index: 50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.card-item.rarity-rare .card-tooltip { background-color: rgba(135, 206, 235, 0.95); color: #050505; }
.card-item.rarity-epic .card-tooltip { background-color: rgba(102, 46, 141, 0.95); }
.card-item.rarity-legendary .card-tooltip { background-color: rgba(220, 165, 61, 0.95); color: #050505; }

.card-item:hover .card-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Right Column: Text Information */
.heroes-text-col {
  flex: 2;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 12px;
}

.heroes-title {
  font-family: var(--font-body);
  font-weight: 600; /* Clean Alexandria SemiBold */
  font-size: 70px;
  line-height: 1.02;
  color: #ffffff;
  text-transform: uppercase;
}

.heroes-quote {
  color: var(--color-text-faded);
  font-style: italic;
  font-size: 13px;
  max-width: 600px;
}

.heroes-desc {
  color: var(--color-text-faded);
  font-size: 13px;
  max-width: 600px;
  line-height: 1.6;
}

/* Mobile Hero Cards (Horizontal Row) */
.heroes-mobile-cards {
  display: none;
  margin-top: 40px;
  width: 100%;
}

.heroes-mobile-cards-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
}

.mobile-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 140px;
  width: 28vw;
  transition: transform 200ms var(--ease-out-cubic);
}

.mobile-card-item:hover {
  transform: translateY(-10px);
}

.mobile-card-frame {
  width: 100%;
  aspect-ratio: 0.7;
  border-radius: 5px;
  overflow: hidden;
  border: 2.5px solid transparent;
}

.mobile-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-card-title {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  max-width: 120px;
  text-transform: uppercase;
}

@media (min-width: 1950px) {
  .heroes-text-col {
    padding: 0 130px;
  }
  .heroes-title {
    font-size: 100px;
  }
  .heroes-quote, .heroes-desc {
    font-size: 16px;
  }
}

@media (max-width: 1060px) {
  .heroes-section {
    min-height: auto;
    padding: 130px 0 110px 0;
  }
  .heroes-content-row {
    flex-direction: column;
  }
  .heroes-interactive-col {
    display: none;
  }
  .heroes-text-col {
    align-items: center;
    text-align: center;
    padding: 0 28px;
    gap: 16px;
  }
  .heroes-title {
    font-size: 52px;
    margin-bottom: 6px;
  }
  .heroes-mobile-cards {
    display: block;
    margin-top: 48px;
    padding: 0 12px;
  }
  .heroes-mobile-cards-row > :nth-child(2) {
    margin-top: 30px;
  }
}

/* --------------------------------------------------------------------------
   4. ABOUT SECTION (Refined Premium Info Boxes)
   -------------------------------------------------------------------------- */
.about-section {
  position: relative;
  width: 100%;
  border-top: 2px solid var(--color-section-border);
  border-bottom: 2px solid var(--color-section-border);
  padding: 100px 40px;
  background-color: var(--color-dark);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.about-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  position: relative;
  padding: 44px 36px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(32, 11, 36, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 300ms var(--ease-out-cubic), border-color 300ms var(--ease-out-cubic), box-shadow 300ms var(--ease-out-cubic);
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 165, 61, 0.8), transparent);
  opacity: 0;
  transition: opacity 300ms var(--ease-out-cubic);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(220, 165, 61, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(220, 165, 61, 0.15);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-badge {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 215, 0, 0.25) 0%,
    rgba(220, 165, 61, 0.1) 60%,
    rgba(0, 0, 0, 0.4) 100%
  );
  border: 1px solid rgba(220, 165, 61, 0.4);
  box-shadow: 0 0 20px rgba(220, 165, 61, 0.2), inset 0 0 10px rgba(255, 215, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7c948;
  margin-bottom: 24px;
  transition: transform 300ms var(--ease-out-cubic);
}

.feature-card:hover .feature-icon-badge {
  transform: scale(1.08);
}

.feature-icon-badge svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.feature-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 21px;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.feature-description {
  font-size: 14px;
  color: var(--color-text-faded);
  line-height: 1.7;
}

@media (max-width: 1060px) {
  .about-section {
    padding: 80px 20px;
  }
  .about-features-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
