/* ============================================================
   PUSTAKA — Landing Page Styles
   Menggunakan design system resmi MEA Ecosystem (token-color.css,
   logo-glow.css sudah di-load lewat <link> terpisah di index.html).
   File ini HANYA berisi layout & komponen spesifik Pustaka —
   TIDAK ada hex warna baru di luar var(--mea-...).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  --bg:        var(--mea-bg, #0A0A0A);
  --surface:   var(--mea-surface, #161616);
  --surface-2: var(--mea-surface-raised, #1E1E1E);
  --border:    var(--mea-border, #2A2A2A);
  --border-2:  var(--mea-border-strong, #3A3A3A);
  --text:      var(--mea-text-primary, #FAFAFA);
  --text-2:    var(--mea-text-secondary, #A1A1A1);
  --text-3:    var(--mea-text-muted, #6B6B6B);
  --accent:    var(--mea-accent, #3B82F6);
  --accent-2:  var(--mea-accent-hover, #2563EB);
  --accent-dim: var(--mea-accent-muted, rgba(59, 130, 246, 0.12));

  --glass-bg: rgba(22, 22, 22, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px) saturate(140%);

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;

  --container: 1180px;
  --radius-sm: var(--mea-radius-sm, 8px);
  --radius-md: var(--mea-radius-md, 8px);
  --radius-lg: var(--mea-radius-lg, 12px);
}

/* ============================================================
   RESET
   ============================================================ */
*{ margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

html{ scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
::-webkit-scrollbar{ width: 8px; height: 8px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: var(--border-2); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background: var(--accent); }

:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible){ outline: none; }

body{
  background:
    radial-gradient(ellipse 900px 600px at 50% -10%, var(--accent-dim), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
ul{ list-style:none; }

.brand, .mea-name{ font-family: var(--font-display); letter-spacing: 0.03em; }

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#meaLoadingScreen{
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
  background: var(--bg);
  transition: opacity 0.4s ease;
}
#meaLoadingScreen.mea-loading-hide{ opacity: 0; pointer-events: none; }
.mea-loading-svg{ width: 96px; height: auto; }
.mea-loading-text{
  font-size: 14px; color: var(--text-2); margin: 0; text-align: center; padding: 0 24px;
  transition: opacity 0.35s ease;
}
.mea-loading-text.mea-text-fade{ opacity: 0; }
#box-left{ stroke-dasharray: 366; stroke-dashoffset: 366; animation: mea-draw-left 2.4s ease-in-out forwards; }
#box-right{ stroke-dasharray: 241; stroke-dashoffset: 241; animation: mea-draw-right 2.4s ease-in-out forwards; }
#meaLoadingScreen.mea-loading-slow #box-left{ animation: mea-draw-left 2.4s ease-in-out infinite; }
#meaLoadingScreen.mea-loading-slow #box-right{ animation: mea-draw-right 2.4s ease-in-out infinite; }
@keyframes mea-draw-left{ 0%{stroke-dashoffset:366;} 45%{stroke-dashoffset:0;} 100%{stroke-dashoffset:0;} }
@keyframes mea-draw-right{ 0%{stroke-dashoffset:241;} 45%{stroke-dashoffset:241;} 90%{stroke-dashoffset:0;} 100%{stroke-dashoffset:0;} }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container{ width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.section{ position: relative; padding: 88px 0; }
.section:nth-of-type(odd){
  background: linear-gradient(180deg, var(--accent-dim) 0%, transparent 100%), var(--surface);
}

.section-head{ max-width: 620px; margin: 0 0 48px; }
.section-head h2{
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: 0.02em;
  color: var(--text);
}
.section-head p{ color: var(--text-2); font-size: 15px; margin-top: 12px; max-width: 46ch; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  border-radius: var(--radius-sm); padding: 12px 24px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary{ background: var(--accent); color: #061121; }
.btn-primary:hover{ background: #ffffff; transform: translateY(-1px); }
.btn-outline{ border: 1px solid var(--border-2); color: var(--text-2); border-radius: 10px; }
.btn-outline:hover{ border-color: var(--accent-2); background: var(--accent-dim); color: var(--text); }
.btn-sm{ padding: 9px 16px; font-size: 13px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(8, 17, 32, 0.55);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.site-header .container{ display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand-lockup{ display: flex; align-items: center; gap: 10px; }
.brand-lockup img{ width: 30px; height: 30px; }
.brand-lockup span{ font-family: var(--font-display); font-size: 20px; letter-spacing: 0.05em; color: var(--text); }

.header-nav{ display: flex; align-items: center; gap: 24px; }
.header-nav a:not(.btn){ font-size: 14px; color: var(--text-2); transition: color 0.2s ease; }
.header-nav a:not(.btn):hover{ color: var(--text); }

@media (max-width: 720px){
  .header-nav a:not(.btn){ display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero{ padding: 148px 0 88px; }

.hero-inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1{
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 4px 0 20px;
}

.hero-lede{ color: var(--text-2); font-size: 17px; max-width: 44ch; margin-bottom: 32px; }

.hero-actions{ display: flex; gap: 12px; flex-wrap: wrap; }

.hero-langs{
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
  padding-left: 28px;
}

.lang-line{
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-2);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 14px;
  transition: color 0.2s ease;
}
.lang-line:last-child{ border-bottom: none; }
.lang-line:hover{ color: var(--text); }

.lang-tag{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}

@media (max-width: 860px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-langs{ border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 24px; }
}

/* ============================================================
   STATISTIK
   ============================================================ */
.stat-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stat-item{
  background: var(--bg);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value{
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  color: var(--text);
}

.stat-label{ font-size: 13px; color: var(--text-3); }

@media (max-width: 720px){
  .stat-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   CORPUS TABLE
   ============================================================ */
.corpus-table{
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.corpus-row{
  display: grid;
  grid-template-columns: 260px 100px 1fr;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.corpus-row:last-child{ border-bottom: none; }

.corpus-row-head{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-3);
  background: var(--surface);
}

.corpus-name{ font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.corpus-lang{ font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); }
.corpus-row:not(.corpus-row-head) span:last-child{ font-size: 14px; color: var(--text-2); }

@media (max-width: 720px){
  .corpus-row{ grid-template-columns: 1fr; gap: 4px; }
  .corpus-row-head{ display: none; }
  .corpus-name{ font-size: 14px; }
}

/* ============================================================
   FOOTER (identik dengan meaecosystem.com)
   ============================================================ */
.site-footer{ border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner{ display: flex; flex-direction: column; gap: 10px; }
.footer-row{ display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-brand{ display: flex; align-items: center; gap: 8px; }

.footer-logo-animated{ width: 20px; height: auto; flex-shrink: 0; }
.footer-logo-animated #footer-box-left{
  stroke-dasharray: 366; stroke-dashoffset: 366; animation: meaFooterDrawLeft 2.4s ease-in-out infinite;
}
.footer-logo-animated #footer-box-right{
  stroke-dasharray: 241; stroke-dashoffset: 241; animation: meaFooterDrawRight 2.4s ease-in-out infinite;
}
@keyframes meaFooterDrawLeft{ 0%{stroke-dashoffset:366;} 45%{stroke-dashoffset:0;} 100%{stroke-dashoffset:0;} }
@keyframes meaFooterDrawRight{ 0%{stroke-dashoffset:241;} 45%{stroke-dashoffset:241;} 90%{stroke-dashoffset:0;} 100%{stroke-dashoffset:0;} }
@media (prefers-reduced-motion: reduce){
  .footer-logo-animated #footer-box-left, .footer-logo-animated #footer-box-right{ animation: none; stroke-dashoffset: 0; }
  #box-left, #box-right{ animation: none !important; stroke-dashoffset: 0 !important; }
}

.footer-links{ display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--text-2); }
.footer-links a:hover{ color: var(--accent-2); }

.footer-social{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.footer-social a{
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  color: var(--text-2);
  transition: color .15s ease, background-color .15s ease, transform .15s ease;
}
.footer-social a svg{ width: 13px; height: 13px; }
.footer-social a:hover{ color: var(--accent); background: var(--accent-dim); transform: translateY(-1px); }
.footer-social a:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

.footer-sep-vert{ width: 1px; height: 14px; background: var(--border-2); }

.footer-meta{ display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.footer-copyright{ font-size: 12px; color: var(--text-3); }

@media (max-width: 560px){
  .footer-row{ flex-direction: column; align-items: flex-start; }
}
