/* ==========================================================================
   portals.css — मुख्यपृष्ठ: स्वागत-विभाग + दोन पोर्टल कार्डं (3D तिरपं)
   ========================================================================== */

.home-hero {
  padding: 6px 0 4px;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.2vw, 2.2rem);
  letter-spacing: .2px;
  margin: .18em 0 .3em;
}

.home-hero .lead {
  margin: 0;
  font-size: 1.02rem;
}

.portals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  margin-top: 20px;
  perspective: 1100px;
}

.portal {
  position: relative;
  display: block;
  height: 320px;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: #fff;
  transform-style: preserve-3d;
  transition: transform .25s ease, box-shadow .25s;
  box-shadow: 0 18px 40px rgba(120, 45, 0, .35), 0 4px 0 rgba(0, 0, 0, .15);
  animation: enter .9s cubic-bezier(.2, .8, .2, 1) backwards, bob 6s ease-in-out infinite;
  font-family: var(--font-ui);
  text-align: center;
}

.portal:nth-child(2) {
  animation-delay: .25s, -2.5s;
}

@keyframes enter {
  from { opacity: 0; translate: 0 140px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes bob {
  0%, 100% { transform: rotateX(4deg) rotateY(-5deg) translateY(0); }
  50% { transform: rotateX(-3deg) rotateY(5deg) translateY(-8px); }
}

.portal.tilt {
  animation: enter .9s cubic-bezier(.2, .8, .2, 1) backwards;
}

.portal .bg {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  transform: translateZ(0);
}

.portal .bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.portal .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 8, 0, .88) 0%, rgba(20, 8, 0, .35) 55%, rgba(0, 0, 0, 0) 100%);
}

.portal .in {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  text-align: center;
  transform: translateZ(60px);
}

.portal h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  letter-spacing: .5px;
  line-height: 1.2;
  text-shadow: 0 3px 10px rgba(0, 0, 0, .7);
}

.portal p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  opacity: .95;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}

.portal .btn {
  display: inline-block;
  margin-top: 10px;
  background: #ff9838;
  color: #2a1400;
  font-weight: 800;
  font-size: .98rem;
  padding: 7px 18px;
  border-radius: var(--r-pill);
  box-shadow: 0 5px 0 #b8560a;
  transform: translateZ(30px);
}

/* SVG मधल्या चमकणाऱ्या खिडक्या */
.tw rect {
  animation: tw 2.4s ease-in-out infinite;
}

.tw rect:nth-child(odd) {
  animation-delay: -1.2s;
}

.tw rect:nth-child(3n) {
  animation-delay: -.5s;
}

@keyframes tw {
  0%, 100% { opacity: 1; }
  50% { opacity: .15; }
}

@media (prefers-reduced-motion: reduce) {
  .portal,
  .portal.tilt {
    animation: none;
  }

  .tw rect {
    animation: none;
  }
}

/* ---------- पोर्टलखालील छोटी माहिती-पट्टी ---------- */
.portal-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.portal-fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: .88rem;
  color: var(--muted);
}

.portal-fact b {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.25rem;
  color: var(--accent);
}
