/* style.css - tampilan Profil kelas XI TKJ
   Warna utama ada di bagian paling atas (:root). */

/* ===== Variabel warna dan dasar halaman ===== */
:root {
  --bg: #000;
  --sf: #0a1038;
  --biru-muda: #5fd0ff;
  --biru: #5b84ff;
  --ink: #f1f0ff;
  --mute: #b4b2d4;
  --g: linear-gradient(135deg, var(--biru-muda), var(--biru));
  --gf: linear-gradient(135deg, #1e6cff, #2b3fd8);
  color-scheme: dark;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}
body {
  margin: 0;
  background: linear-gradient(180deg, #000 0%, #030a33 40%, #0a2790 100%);
  color: var(--ink);
  font: 400 1rem/1.6 Figtree, system-ui, sans-serif;
  overflow-x: hidden;
}
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.d {
  font-family: "Big Shoulders Display", Impact, sans-serif;
}
.gt {
  background: var(--g);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Latar animasi (canvas perangkat TKJ) ===== */
#net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Navbar ===== */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(.65rem + env(safe-area-inset-top, 0px)) 1.25rem .65rem;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(10px);
}
.logo img {
  display: block;
  height: 2.6rem;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .3));
}
nav ul {
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
nav a {
  text-decoration: none;
  color: var(--mute);
  font-weight: 500;
}
nav a:hover {
  color: #fff;
}

/* ===== Landing page (hero) ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 6rem 1.25rem 3rem;
  overflow: hidden;
  background: radial-gradient(45rem 30rem at 100% 0, rgba(95, 208, 255, .2), transparent 70%), radial-gradient(45rem 30rem at 0 100%, rgba(91, 124, 255, .28), transparent 70%);
}
#err {
  max-width: 30rem;
  margin: 0 0 1rem;
  padding: .9rem 1.1rem;
  border-radius: .8rem;
  background: #1b0a1f;
  border: 1px solid #ff8a8a;
  color: #ffd6d6;
}
.js #err {
  display: none;
}
.hero > *:not(canvas) {
  position: relative;
  z-index: 1;
}
h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(5.5rem, 28vw, 13rem);
  line-height: .9;
  letter-spacing: .02em;
  display: flex;
  gap: .08em;
}
h1 span {
  /* gradasi dipasang di tiap huruf, karena huruf beranimasi tidak ikut terpotong oleh gradasi h1 */
  background: var(--g);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  animation: up .9s cubic-bezier(.2, .8, .2, 1) both;
}
h1 .sp {
  width: .25em;
}
.tag {
  margin: 1rem 0 .3rem;
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  font-weight: 700;
  animation: up .9s .6s both;
}
.sub {
  margin: 0 0 2rem;
  color: var(--mute);
  animation: up .9s .75s both;
}
.acts {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  animation: up .9s .9s both;
}
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== Tombol ===== */
.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--gf);
  border: 2px solid transparent;
}
.btn.o {
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
}
.btn:hover {
  filter: brightness(1.15);
}

/* ===== Tata letak umum ===== */
main {
  position: relative;
  z-index: 1;
  max-width: 66rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
}
section {
  margin-bottom: 5rem;
}
h2 {
  margin: 0 0 1.5rem;
  font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1;
  letter-spacing: .02em;
}
h2 small {
  font: 500 1rem Figtree, sans-serif;
  color: var(--mute);
  letter-spacing: 0;
  margin-left: .6rem;
}
h3 {
  margin: 2rem 0 .8rem;
  font-size: 1.1rem;
  color: var(--mute);
  font-weight: 500;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.grid > * {
  flex: 1 1 210px;
  max-width: 260px; 
}

/* ===== Kartu profil (wali kelas, pengurus, anggota) ===== */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .2rem;
  padding: 1.4rem 1rem;
  border: 1px solid transparent;
  border-radius: 1.25rem;
  background: linear-gradient(var(--sf), var(--sf)) padding-box, var(--g) border-box;
}
.card.wide {
  max-width: 22rem;
  margin: 0 auto;
}
.av {
  display: grid;
  place-items: center;
  width: 6.5rem;
  height: 8.1rem;
  margin-bottom: .6rem;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--gf);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: .04em;
  color: #fff;
  transition: transform .3s;
}
.role {
  font-weight: 700;
}
.name {
  font-size: 1.1rem;
  font-weight: 500;
}
.mt {
  margin-top: .4rem;
  font-size: .92rem;
  font-style: italic;
  color: var(--mute);
}
.ls {
  font-size: .88rem;
  color: var(--mute);
}
.card.done:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 14px 34px rgba(91, 124, 255, .4), 0 0 22px rgba(95, 208, 255, .25);
  background: linear-gradient(#101a52, #101a52) padding-box, var(--g) border-box;
}
.card.done:hover .av {
  transform: scale(1.08);
}
.av img,
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ===== Bakat yang diikuti ===== */
.grp {
  margin-bottom: 2.5rem;
}
.gh {
  margin: 0 0 .9rem;
  font-size: 1.8rem;
  font-weight: 800;
}
.gh small {
  font: 500 1rem Figtree, sans-serif;
  color: var(--mute);
  margin-left: .6rem;
}
.pg {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.ph {
  overflow: hidden;
  aspect-ratio: 4/5;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--gf);
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  transition: transform .3s, box-shadow .3s;
}
.pn {
  margin-top: .4rem;
  text-align: center;
  font-size: .95rem;
}
.pw:hover .ph {
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(91, 124, 255, .45);
}

/* ===== Momen: foto yang bisa digeser kiri-kanan ===== */
.geser {
  position: relative;
}
.strip {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 1.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: -.6rem -1.25rem -1rem;
  padding: .6rem 1.25rem 1rem;
  cursor: grab;
}
.strip::-webkit-scrollbar {
  display: none;
}
.strip.seret {
  cursor: grabbing;
  scroll-snap-type: none;
}
.track {
  display: flex;
  gap: 1rem;
  width: max-content;
}
.tile {
  flex: none;
  position: relative;
  overflow: hidden;
  width: 220px;
  aspect-ratio: 4/5;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  border-radius: 1.2rem;
  font-weight: 700;
  background: linear-gradient(160deg, hsl(var(--h) 90% 50%), #06104a);
  transition: transform .3s;
  scroll-snap-align: start;
  user-select: none;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile span {
  position: relative;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
}
.pnl {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.8rem;
  height: 2.8rem;
  margin-top: -1.4rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(0, 4, 24, .72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  padding: 0 0 .2rem;
  cursor: pointer;
  transition: opacity .2s, background .2s;
}
.pnl.kiri { left: -.4rem; }
.pnl.kanan { right: -.4rem; }
.pnl:hover { background: rgba(30, 108, 255, .85); }
.pnl:disabled { opacity: 0; pointer-events: none; }
@media (pointer: coarse) {
  .pnl { display: none; }   /* di HP cukup geser dengan jari */
}
.tile:hover {
  transform: translateY(-8px) scale(1.04);
}

/* ===== Momen: garis waktu kelas X - XI ===== */
.tlg {
  margin-left: .5rem;
  padding-left: 1.8rem;
  border-left: 3px solid;
  border-image: var(--g) 1;
}
.ev {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
  padding: .8rem;
  border-radius: 1rem;
  background: var(--sf);
}
.ev::before {
  content: "";
  position: absolute;
  left: calc(-1.8rem - 9px);
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--g);
}
.ev.done:hover {
  transform: translateX(6px);
}
.evp {
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  border-radius: .8rem;
  background: linear-gradient(160deg, #1e6cff, #2b3fd8);
  font-weight: 700;
}
.evd {
  font-size: .85rem;
  color: var(--mute);
}
.evt {
  font-size: 1.2rem;
  font-weight: 700;
}
.evx {
  font-size: .95rem;
  color: var(--mute);
}

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 1;
  padding: 3rem 1.25rem;
  text-align: center;
  background: rgba(2, 6, 35, .85);
}
footer .acts {
  animation: none;
  margin-top: 1rem;
}

/* ===== Animasi muncul saat di-scroll ===== */
.js .rv {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--d, 0ms), transform .7s var(--d, 0ms);
}
.rv.in {
  opacity: 1;
  transform: none;
}
.rv.done {
  transition: transform .3s ease, box-shadow .3s ease, opacity .3s;
}

/* ===== Popup: kartu diperbesar saat diklik ===== */
.card,
.pw {
  cursor: pointer;
}
.popup {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(0, 4, 24, .78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s;
}
.popup[hidden] {
  display: none;
}
.popup.buka {
  opacity: 1;
}
.popup-kotak {
  position: relative;
  width: min(100%, 26rem);
  max-height: 100%;
  overflow: auto;
  padding: 1.5rem 1.5rem 1.8rem;
  border: 1px solid transparent;
  border-radius: 1.5rem;
  text-align: center;
  background: linear-gradient(#0a1448, #0a1448) padding-box, var(--g) border-box;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(91, 132, 255, .3);
  transform: translateY(24px) scale(.88);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.popup.buka .popup-kotak {
  transform: none;
}
.popup-isi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.zf {
  display: grid;
  place-items: center;
  width: min(100%, 18rem);
  aspect-ratio: 4/5;
  margin-bottom: .8rem;
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--gf);
  font-size: 4rem;
  font-weight: 800;
  color: #fff;
}
.zf img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.zn {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
}
.popup-tutup {
  position: absolute;
  top: .7rem;
  right: .8rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.popup-tutup:hover {
  background: rgba(255, 255, 255, .22);
}
body.kunci {
  overflow: hidden;
}
.pemutar {
  width: 100%;
  margin-top: .9rem;
}
.pemutar[hidden] {
  display: none;
}
.putar {
  padding: .6rem 1.3rem;
  border: 0;
  border-radius: 99px;
  background: var(--gf);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.putar:hover {
  filter: brightness(1.15);
}
.putar-garis {
  height: 4px;
  margin-top: .7rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, .15);
  overflow: hidden;
}
.putar-isi {
  width: 0;
  height: 100%;
  background: var(--g);
}
.yt {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: .8rem;
}

/* ===== Animasi kursor (kanvas dibuat oleh script.js) ===== */
#jejak {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
}

/* ===== Layar kecil dan pengaturan gerak ===== */
@media (max-width: 560px) {
  nav ul {
    gap: .8rem;
  }
  .ev {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  h1 span,
  .tag,
  .sub,
  .acts {
    animation: none;
  }
  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .popup,
  .popup-kotak {
    transition: none;
  }
  .strip {
    scroll-behavior: auto;
  }
}

/* Tampilan khusus untuk rata tengah Pengurus Kelas */
#pengurus {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#pengurus .card {
  flex: 1 1 210px;
  max-width: 240px; 
}

/* Tampilan khusus Pengurus Kelas: 2 di atas, 4 di bawah */
@media (min-width: 900px) {
  #pengurus {
    display: grid !important;
    grid-template-columns: repeat(4, 220px); /* Membuat 4 kolom pas */
    justify-content: center;
    gap: 1rem;
  }
  
  /* Geser Ketua ke kolom ke-2 baris pertama */
  #pengurus .card:nth-child(1) {
    grid-column: 2; 
  }
  
  /* Geser Wakil ke kolom ke-3 baris pertama */
  #pengurus .card:nth-child(2) {
    grid-column: 3; 
  }
  
  /* Paksa Sekretaris 1 mulai dari kolom pertama (otomatis melemparnya ke baris bawah) */
  #pengurus .card:nth-child(3) {
    grid-column: 1; 
  }
}