/* ==========================================================================
   WTU | A PERSONAL ARCHIVE - CORE STYLES (INDEX.CSS)
   ========================================================================== */

/* =========================================================
   1. IMPORTS & VARIABLES
========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap");

:root {
  --bg-paper: #ffffff;
  --bg-white: #ffffff;
  --bg-alt: #f9f9f9;
  --text-main: #222222;
  --text-muted: #555555;
  --accent-crimson: #8b0000;
  --accent-gold: #d4af37;
  --border-color: #dcdcdc;
  --border-dark: #1a1a1a;
  --font-serif: "Crimson Text", Georgia, serif;
  --font-sans: "Inter", -apple-system, sans-serif;
  --radius-xs: 2px;
  --ease: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================
   2. GLOBAL RESETS & TYPOGRAPHY
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  background-color: var(--bg-paper);
  color: var(--text-main);
  font-family: var(--font-serif);
  line-height: 1.8;
  font-size: 1.15rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--ease);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 2rem;
}

.bg-white {
  background-color: var(--bg-white);
}
.bg-alt {
  background-color: var(--bg-alt);
}
.bg-paper {
  background-color: var(--bg-paper);
}

/* =========================================================
   3. HEADER & NAVIGATION
========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;

  /* Kondisi awal: transparan */
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);

  border-bottom: 1px solid transparent;

  transition:
    background 0.4s ease,
    backdrop-filter 0.4s ease,
    -webkit-backdrop-filter 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

/* ========================================
   HEADER SAAT SCROLL
   ======================================== */

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.82);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid rgba(0, 0, 0, 0.08);

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent-crimson);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-links a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--accent-crimson);
  font-weight: 600;
}

.lang-switcher button {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: var(--ease);
  font-family: var(--font-sans);
}

.lang-switcher button.active {
  opacity: 1;
  font-weight: 600;
  color: var(--accent-crimson);
}

.lang-divider {
  margin: 0 5px;
  opacity: 0.5;
}

/* =========================================================
   4. HERO SECTION
========================================================= */
.hero-section {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image:
    linear-gradient(rgba(30, 18, 18, 0.45), rgba(30, 18, 18, 0.55)),
    url("assets/images/main.JPG");
  background-size: cover;
  background-position: center 80%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hero-content {
  max-width: 85vh;
}

/* =========================================================
   5. ARCHIVE INTRODUCTION
========================================================= */
.content-section {
  position: relative;
  z-index: 10;
  padding: 4rem 0;
}

.archive-intro-section {
  background: var(--bg-white);
  padding: 6rem 0;
}

.intro-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-title {
  font-size: 1.75rem;
  color: var(--accent-crimson);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.intro-text p {
  margin-bottom: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

.drop-cap::first-letter {
  float: left;
  font-size: 4.8rem;
  line-height: 0.8;
  padding-right: 8px;
  padding-top: 8px;
  color: var(--accent-crimson);
  font-family: var(--font-serif);
}

.intro-image {
  position: relative;
  width: min(420px, 100%);
  margin-left: auto;
  overflow: hidden;
}

.intro-image img {
  filter: grayscale(100%);
  transition: filter 0.6s ease;
}

.intro-image:hover img {
  filter: grayscale(0%);
}

.intro-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 70%,
    white 100%
  );
  pointer-events: none;
}

/* =========================================================
   6. COMMUNITY QUOTE
========================================================= */
.community-quote-section {
  position: relative;
  width: 100%;
  background: var(--accent-crimson);
  padding: 7rem 0;
}

.community-quote-container {
  max-width: 950px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.community-quote {
  max-width: 850px;
  margin: 0 auto;
}

.community-quote p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.25;
  color: #ffffff;
}

/* =========================================================
   7. AINAN SECTION (FEATURED NOTES)
========================================================= */
.content-section-ainan {
  padding: 0;
  position: relative;
  z-index: 1;
}

.ainan-section {
  position: relative;
  width: 100%;
  padding: 6rem 0;
  background-image: url("./assets/images/suiji-slp.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: visible;
}

.ainan-container {
  width: min(1400px, calc(100% - 80px));
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3rem;
}

/* Sticky Title */
.ainan-page-title {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

.ainan-page-title h2 {
  margin-left: max(40px, calc((100% - 1400px) / 2));
  width: min(520px, 40vw);
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  font-weight: 500;
  line-height: 0.98;
  color: #ffffff;
}

.ainan-page-title h2 span {
  display: block;
  margin-top: 0.15em;
  font-family: var(--font-sans);
  font-size: 0.48em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
}

/* Glass Card */
.ainan-glass-card {
  position: relative;
  z-index: 20;
  width: min(480px, 100%);
  padding: 3rem 2.6rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  backdrop-filter: blur(30px) saturate(145%);
  -webkit-backdrop-filter: blur(30px) saturate(145%);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.3s ease;
}

.ainan-glass-card:hover {
  transform: translateY(-5px);
}

.ainan-card-category {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-crimson);
}

.ainan-card-title {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 1;
}

.ainan-card-description {
  margin: 0 0 30px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-main);
}

.ainan-meta {
  display: grid;
  gap: 13px;
  margin-bottom: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.ainan-meta-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ainan-meta-label {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #333;
}

.ainan-meta-value {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-main);
}

.ainan-card-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  transition:
    gap 0.25s ease,
    opacity 0.25s ease;
}

.ainan-card-link:hover {
  gap: 14px;
  opacity: 0.65;
}

/* =========================================================
   8. SPACE TO GROW (ORGANIZATIONS GRID)
========================================================= */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.org-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.org-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  border-color: #d0d0d0;
}

.org-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-color);
}

.org-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.org-title-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.org-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.org-role {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-crimson);
  font-weight: 600;
}

.org-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.org-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  transition:
    color 0.3s ease,
    gap 0.3s ease;
}

.org-link:hover {
  color: var(--accent-crimson);
  gap: 10px;
}

/* =========================================================
   9. AFTER MOVIES (CAROUSEL)
========================================================= */
.aftermovie-layout {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 0 0;
}

.aftermovie-carousel-wrapper {
  width: 75%;
  overflow: hidden;
}

.aftermovie-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0 2rem 2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.aftermovie-carousel::-webkit-scrollbar {
  display: none;
}

.aftermovie-item {
  flex: 0 0 calc(38%);
  scroll-snap-align: start;
}

.youtube-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
}

.youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.aftermovie-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-top: 1.2rem;
  color: var(--text-main);
  font-weight: 600;
}

.aftermovie-info {
  width: 25%;
  display: flex;
  flex-direction: column;
}

.aftermovie-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Swipe Hint */
.swipe-hint-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 0.5rem;
  cursor: default;
}

.scroll-hint {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-gold);
  font-weight: 600;
}

.animated-chevrons {
  display: flex;
  align-items: center;
  color: var(--accent-gold);
  font-size: 1.4rem;
  line-height: 1;
}

.animated-chevrons span {
  display: inline-block;
  animation: swipeForward 1.5s infinite ease-in-out;
}

.animated-chevrons span:nth-child(2) {
  animation-delay: 0.15s;
  margin-left: -5px;
}

@keyframes swipeForward {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.2;
  }
  50% {
    transform: translateX(6px);
    opacity: 1;
  }
}

/* =========================================================
   UNIVERSAL FOOTER STYLES
========================================================= */
.site-footer {
  background-color: var(--accent-crimson);
  color: white;
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
}

.footer-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Bagian Atas: Logo & Tagline */
.footer-center {
  text-align: center;
}

.footer-brand-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.4em;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.footer-tagline-large {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.3;
}

/* Bagian Bawah: Garis, Menu Centered & Copyright */
.footer-bottom-area {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.footer-connect-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.nav-group-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-gold);
  font-weight: 600;
}

.connect-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
}

.connect-links a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--ease);
}

.connect-links a i {
  font-size: 1.1rem;
}

.connect-links a:hover {
  color: var(--accent-gold);
  transform: translateY(-3px);
}

.footer-copyright {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* =========================================================
   11. RESPONSIVE DESIGN (TABLET & MOBILE FOCUSED)
========================================================= */

/* --- TABLET (< 992px) --- */
@media screen and (max-width: 992px) {
  /* Intro Section */
  .intro-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .intro-image {
    margin: 0 auto;
    width: min(500px, 100%);
  }

  /* Ainan Section - Tetap Sticky dan Terpusat */
  .ainan-container {
    align-items: center;
    gap: 2rem;
  }
  .ainan-page-title {
    width: 100%;
    align-items: center;
    text-align: center;
  }
  .ainan-page-title h2 {
    margin-left: 0;
    width: 90%;
    padding: 0 1rem;
  }
  .ainan-glass-card {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
  }

  /* Aftermovies */
  .aftermovie-layout {
    flex-direction: column-reverse;
    padding: 0;
    gap: 2rem;
  }
  .aftermovie-info {
    width: 100%;
    padding: 0 2rem;
    align-items: center;
    text-align: center;
  }
  .aftermovie-carousel-wrapper {
    width: 100%;
  }
  .aftermovie-item {
    flex: 0 0 calc(55%);
  }
  .swipe-hint-wrapper {
    justify-content: center;
  }
}

/* --- MOBILE (< 768px) --- */
@media screen and (max-width: 768px) {
  /* Global Adjustments */
  .container {
    padding: 0 1.5rem;
  }

  /* Header / Nav */
  .site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
  .site-nav {
    padding: 0.8rem 1rem;
    flex-direction: column;
    gap: 0.8rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    font-size: 0.75rem;
  }

  /* Hero Section (Menjadi Landscape & Lebih Rendah) */
  .hero-section {
    min-height: 35vh;
    height: 35vh;
    padding: 5rem 1rem 0;
    background-attachment: scroll;
    background-position: center top; /* Fokus mengambil potongan gambar bagian atas */
  }

  /* Archive Intro */
  .archive-intro-section {
    padding: 4rem 0;
  }
  .section-title {
    font-size: 1.5rem;
    text-align: center;
  }
  .drop-cap::first-letter {
    font-size: 3.5rem;
  }

  /* Community Quote */
  .community-quote-section {
    padding: 5rem 0;
  }
  .community-quote p {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  /* Ainan Section (Proporsi Rasional & Efek Laptop) */
  .ainan-section {
    padding: 0 0 4rem 0;
    background-attachment: fixed; /* Mengembalikan efek fixed/paralax laptop */
  }
  .ainan-page-title {
    justify-content: flex-start;
    padding-top: 15vh; /* Mengangkat judul ke bagian atas layar */
  }
  .ainan-page-title h2 {
    font-size: 2.2rem;
  }
  .ainan-card-title {
    font-size: 2.2rem;
  }
  .ainan-card-description {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  /* Organizations Grid */
  .org-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .org-card {
    padding: 1.5rem;
  }
  .org-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* After Movies */
  .aftermovie-item {
    flex: 0 0 calc(85%);
  }
  .aftermovie-carousel {
    padding: 1rem 1rem 2rem 1rem;
    gap: 1rem;
  }
}

/* --- SMALL MOBILE (< 480px) --- */
@media screen and (max-width: 480px) {
  /* Ainan Card Tweaks for small screens */
  .ainan-glass-card {
    padding: 1.5rem 1.2rem;
    border-radius: 20px;
  }
  .ainan-meta-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .ainan-card-title {
    font-size: 1.8rem;
  }

  /* Footer Adjustments */
  .footer-container {
    padding: 4rem 1.5rem 2rem;
    gap: 3rem;
  }
  .footer-tagline-large {
    font-size: 1.6rem;
  }
  .connect-links {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
}
