/* home.css: bagian atas Beranda (diturunkan dari gerbang.css landing page) */
.home {
  --orange: #F47B1F;
  --orange-deep: #B8500A;
  --brown: #5C3A1E;
  --cream: #FFF1E2;
  --purple: #7A4CC2;
  --kg-green: #1A7F4A;
}
.gate-hero { padding-block: clamp(32px, 6vw, 64px) clamp(24px, 4vw, 40px); text-align: center; }
.gate-hero .wrap { display: grid; justify-items: center; gap: 14px; }
.salam { display: grid; gap: 2px; color: var(--muted); font-size: 0.98rem; }
.salam .bismillah { font-weight: 700; color: var(--navy); letter-spacing: 0.01em; }
.gate-title {
  font-family: "Raleway", sans-serif; font-weight: 800; color: var(--navy);
  font-size: clamp(2.1rem, 1.3rem + 4vw, 4rem); letter-spacing: -0.015em; line-height: 1.05;
  max-width: 14ch;
}
.gate-title em { font-style: normal; color: var(--link); }
.gate-sub { font-size: var(--step-1); color: var(--ink); font-weight: 700; }
.gate-sub span { display: block; font-weight: 400; color: var(--muted); font-size: var(--step-0); }
.gate-q { font-family: "Raleway", sans-serif; font-weight: 800; font-size: var(--step-2); color: var(--ink); margin-top: 14px; }

.gate-cards { display: grid; gap: 24px; padding-bottom: 28px; }
@media (min-width: 860px) { .gate-cards { grid-template-columns: 1fr 1fr; align-items: stretch; } }

.gate-card { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; text-decoration: none; isolation: isolate; }
.gate-card .body { display: grid; gap: 12px; align-content: start; padding: 24px clamp(20px, 3vw, 32px) 28px; }
.gate-card .cta { margin-top: 8px; justify-self: start; }
.gate-card.is-last::after {
  content: "Terakhir dilihat"; position: absolute; top: 14px; right: 14px; z-index: 3;
  font-size: 0.75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #FFFFFF; color: var(--navy);
}

/* Kartu EYP: playful */
.gate-eyp { background: var(--cream); border: 3px solid var(--orange); border-radius: 36px; color: var(--brown); }
.gate-eyp .media { position: relative; padding: 26px 26px 0; }
.gate-eyp .frame {
  position: relative; transform: rotate(-1.6deg); border-radius: 18px; padding: 10px;
  background: linear-gradient(135deg, #A86A3C, #7A4A26 55%, #9A5F33);
  box-shadow: 0 8px 0 #5C3A1E33;
}
.gate-eyp .frame img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gate-eyp .frame::before, .gate-eyp .frame::after {
  content: ""; position: absolute; top: -22px; width: 3px; height: 26px; background: #7A4A26;
}
.gate-eyp .frame::before { left: 22%; transform: rotate(-12deg); }
.gate-eyp .frame::after { right: 22%; transform: rotate(12deg); }
.gate-eyp .gate-card-title {
  font-family: "Fredoka", "Raleway", sans-serif; font-weight: 700; font-size: clamp(2rem, 1.5rem + 2vw, 2.7rem);
  color: var(--orange-deep); letter-spacing: 0.005em; line-height: 1.05;
}
.gate-eyp .ages { font-weight: 700; color: var(--brown); }
.ribbons { display: flex; flex-wrap: wrap; gap: 8px; }
.ribbon {
  --r: var(--purple);
  display: inline-block; padding: 5px 18px; color: #FFFFFF; background: var(--r);
  font-family: "Fredoka", "Raleway", sans-serif; font-weight: 600; font-size: 0.95rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%, 9px 50%);
}
.ribbon.kg { --r: var(--kg-green); }
.gate-eyp .cta { --b-bg: var(--orange-deep); --b-fg: #FFFFFF; border-radius: 999px; font-family: "Fredoka", "Lato", sans-serif; font-weight: 600; font-size: 1.05rem; }
.gate-eyp .farm { height: 70px; overflow: hidden; margin-top: auto; }
.gate-eyp .farm img { width: 100%; height: 100%; object-fit: cover; object-position: center 72%; }
.gate-eyp { grid-template-rows: auto 1fr auto; }

/* Kartu Primary dan Secondary: formal */
.gate-ps { background: var(--navy); border-radius: 8px; color: #E8ECF8; }
.gate-ps .media { position: relative; }
.gate-ps .media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gate-ps .media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--cerulean) 0 70%, var(--spring) 70% 100%); }
.gate-ps .gate-card-title { font-family: "Raleway", sans-serif; font-weight: 800; color: #FFFFFF; font-size: clamp(2rem, 1.5rem + 2vw, 2.6rem); letter-spacing: -0.01em; }
.gate-ps .levels { font-weight: 700; color: #FFFFFF; }
.gate-ps .ages { color: var(--spring); font-weight: 700; letter-spacing: 0.02em; }
.gate-ps .cta { --b-bg: var(--cerulean); --b-fg: var(--navy); border-radius: 6px; }

.gate-card:hover .cta { transform: translateY(-1px); }
.gate-card:focus-visible { outline: 4px solid var(--cerulean); outline-offset: 4px; }

.gate-help {
  display: grid; justify-items: center; text-align: center; gap: 14px;
  padding: 28px 20px; margin-bottom: clamp(40px, 6vw, 72px);
  border-radius: 14px; background: #EEF3FC;
}
.gate-help p { font-weight: 700; color: var(--ink); max-width: 46ch; }

.yayasan-line { font-size: 0.88rem; color: var(--muted); }
.yayasan-line strong { color: var(--navy); letter-spacing: 0.02em; }

/* ---------- Latar gerbang: gradasi biru lembut + pola geometris ---------- */
.home-top {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% 4%, rgba(30, 173, 240, 0.13), transparent 62%),
    radial-gradient(700px 480px at 96% 18%, rgba(10, 251, 96, 0.08), transparent 60%),
    radial-gradient(1100px 600px at 50% 105%, rgba(19, 37, 116, 0.10), transparent 65%),
    linear-gradient(180deg, #EEF5FD 0%, #F3F8FE 40%, #E4EDFA 100%);
  background-attachment: scroll;
}
.gate-hero { position: relative; isolation: isolate; }
.gate-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--pat-navy); background-position: center top;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 60%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 60%, transparent 100%);
}
.gate-hero::after {
  content: ""; position: absolute; left: 50%; top: 18px; z-index: -1; pointer-events: none;
  width: min(560px, 90vw); aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; border: 1.5px solid rgba(30, 173, 240, 0.25); background: radial-gradient(circle, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.75) 55%, rgba(255,255,255,0) 72%);
  box-shadow: 0 0 0 28px rgba(30, 173, 240, 0.04), 0 0 0 56px rgba(30, 173, 240, 0.03);
}
.gate-card { box-shadow: 0 18px 40px -18px rgba(19, 37, 116, 0.35); }
.gate-help { background: rgba(255, 255, 255, 0.9); border: 1px solid #D6E2F5; box-shadow: 0 10px 30px -18px rgba(19, 37, 116, 0.3); }

/* Pita dekoratif bawah gerbang */
.home-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1; pointer-events: none;
  background: var(--pat-navy-soft) center / 120px, linear-gradient(180deg, rgba(19,37,116,0) 0%, rgba(19,37,116,0.06) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
}

/* Deretan logo kurikulum */
.logo-strip {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  width: 100%; max-width: 860px; margin-top: 8px;
}
@media (min-width: 760px) { .logo-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.logo-strip li {
  display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 112px;
  padding: 14px 12px 12px; border-radius: 14px; background: #FFFFFF; border: 1px solid #D6E2F5;
  box-shadow: 0 10px 24px -20px rgba(19, 37, 116, 0.45);
}
.logo-strip img { height: 66px; width: auto; max-width: 100%; object-fit: contain; }
.logo-strip span { font-size: 0.8125rem; font-weight: 800; color: var(--navy); letter-spacing: 0.02em; }
@media (max-width: 420px) { .logo-strip img { height: 52px; } .logo-strip li { min-height: 100px; } }

/* =========================================================
   Pengembangan tampilan gerbang: aurora, gradasi, gerak
   ========================================================= */
.aurora { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
  filter: blur(70px); opacity: .55; will-change: transform;
  animation: aurora-drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { left: -14vmax; top: -18vmax; background: radial-gradient(circle, rgba(30, 173, 240, .55), transparent 65%); }
.aurora span:nth-child(2) { right: -18vmax; top: 6vmax; background: radial-gradient(circle, rgba(10, 251, 96, .28), transparent 65%); animation-duration: 32s; animation-delay: -8s; }
.aurora span:nth-child(3) { left: 20vmax; bottom: -30vmax; background: radial-gradient(circle, rgba(19, 37, 116, .30), transparent 65%); animation-duration: 38s; animation-delay: -14s; }
@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.95); }
}

/* Pola geometris bergeser sangat pelan */
.gate-hero::before { animation: pattern-pan 60s linear infinite; }
@keyframes pattern-pan { from { background-position: 0 0; } to { background-position: 240px 120px; } }

/* Lingkar halo bernapas */
.gate-hero::after { animation: halo-breathe 7s ease-in-out infinite; }
@keyframes halo-breathe { 0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; } 50% { transform: translateX(-50%) scale(1.04); opacity: .75; } }

/* Judul: gradasi berkilau pada "Muslim Leaders" */
.gate-title em {
  background: linear-gradient(90deg, #0B6E9E, #1565C0, #132574, #0B6E9E);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 10s linear infinite;
}

/* Masuk halaman bertahap */
.gate-hero .wrap > * { animation: rise .9s var(--ease-out) both; }
.gate-hero .wrap > *:nth-child(2) { animation-delay: .08s; }
.gate-hero .wrap > *:nth-child(3) { animation-delay: .16s; }
.gate-hero .wrap > *:nth-child(4) { animation-delay: .24s; }
.gate-hero .wrap > *:nth-child(5) { animation-delay: .32s; }
.gate-hero .wrap > *:nth-child(6) { animation-delay: .40s; }
.gate-hero .wrap > *:nth-child(7) { animation-delay: .48s; }

/* Ajakan memilih: panah memantul */
.gate-q { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.gate-q::after {
  content: ""; width: 14px; height: 14px; border-right: 3px solid var(--cerulean); border-bottom: 3px solid var(--cerulean);
  transform: rotate(45deg); animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge { 0%, 100% { translate: 0 0; opacity: 1; } 50% { translate: 0 6px; opacity: .55; } }

/* Kartu jenjang */
.gate-card { transition: translate .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.gate-card:hover { translate: 0 -8px; box-shadow: 0 34px 60px -26px rgba(19, 37, 116, .55); }
.gate-eyp .frame { transform-origin: 50% -22px; }
.gate-eyp:hover .frame { animation: swing 1.6s ease-in-out; }
@keyframes swing { 0% { rotate: 0deg; } 25% { rotate: 2.4deg; } 50% { rotate: -1.8deg; } 75% { rotate: .8deg; } 100% { rotate: 0deg; } }
.gate-eyp .frame img { transition: transform .9s var(--ease-out); }
.gate-eyp:hover .frame img { transform: scale(1.05); }
.gate-eyp .frame { overflow: hidden; }
.gate-eyp .frame::before, .gate-eyp .frame::after { display: none; }
.gate-eyp .media::before, .gate-eyp .media::after {
  content: ""; position: absolute; top: 4px; width: 3px; height: 26px; background: #7A4A26; border-radius: 2px; z-index: 1;
}
.gate-eyp .media::before { left: calc(26px + 22%); transform: rotate(-14deg); }
.gate-eyp .media::after { right: calc(26px + 22%); transform: rotate(14deg); }

/* Hewan di padang bergeser pelan */
.gate-eyp .farm { position: relative; }
.gate-eyp .farm img { width: 180%; max-width: none; animation: graze 40s ease-in-out infinite alternate; }
@keyframes graze { from { transform: translateX(0); } to { transform: translateX(-44.4%); } }

/* Kartu formal: kilau diagonal dan foto membesar */
.gate-ps .media { overflow: hidden; }
.gate-ps .media img { transition: transform 1s var(--ease-out); }
.gate-ps:hover .media img { transform: scale(1.06); }
.gate-ps { position: relative; }
.gate-ps::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .14) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform 1.1s ease;
}
.gate-ps:hover::before { transform: translateX(100%); }
.gate-ps .body { background: radial-gradient(420px 220px at 100% 100%, rgba(30, 173, 240, .22), transparent 70%); }

/* Deretan logo */
.logo-strip li { transition: translate .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s; }
.logo-strip li:hover { translate: 0 -4px; border-color: #A9C8EE; box-shadow: 0 16px 30px -20px rgba(19, 37, 116, .55); }

@media (prefers-reduced-motion: reduce) {
  .aurora span, .gate-hero::before, .gate-hero::after, .gate-title em, .gate-eyp .farm img, .gate-q::after { animation: none !important; }
}

/* ---------- Tambahan untuk Beranda situs resmi ---------- */
.home-top { padding-bottom: clamp(40px, 6vw, 72px); }
.gate-hero h1 { display: grid; justify-items: center; gap: 10px; }
.gate-name { font-family: "Raleway", sans-serif; font-weight: 800; color: var(--navy); font-size: var(--step-1); letter-spacing: 0.01em; }
.gate-title { display: block; }
.gate-lead { max-width: 60ch; font-size: var(--step-1); color: var(--ink); }
.gate-hero .btn-row { justify-content: center; margin-top: 6px; }
.gate-ps .cta-pair { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.gate-ps .cta-pair .btn { --b-bg: var(--cerulean); --b-fg: var(--navy); border-radius: 6px; }
.gate-ps .cta-pair .btn.alt { --b-bg: #FFFFFF; --b-fg: var(--navy); }
@media (max-width: 479px) { .gate-ps .cta-pair .btn { width: 100%; } }
.gate-cards { padding-bottom: 0; }
.gate-section-head { text-align: center; display: grid; justify-items: center; gap: 8px; margin: clamp(12px, 3vw, 28px) auto clamp(22px, 3vw, 32px); }
.gate-section-head .h2 { font-family: "Raleway", sans-serif; font-weight: 800; color: var(--navy); font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); }
.gate-card .stretched { position: absolute; inset: 0; z-index: 1; }
.gate-card .body a.btn, .gate-card .body .cta-pair { position: relative; z-index: 2; }
.home .verify-link { margin-top: 4px; }
