/* ==========================================================================
   Masri Cloud Academy — Design Tokens
   Palette continues the existing Masri.Cloud ecosystem identity
   (navy / teal / amber / violet, Fraunces + Inter + JetBrains Mono)
   so Academy feels like one family with music.masri.cloud, not a
   one-off skin.
   ========================================================================== */

:root {
  /* --- surfaces --- */
  --navy-950: #050810;
  --navy-900: #080d13;
  --navy-800: #0d141d;
  --panel: #0f1620;
  --card: #131b26;
  --card-hover: #17202d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* --- brand accents --- */
  --teal: #1ec9c0;
  --teal-dim: #14766f;
  --amber: #f0b84a;
  --violet: #8877ff;

  /* --- text --- */
  --ink-0: #f5f7fa;
  --ink-1: #c7d0da;
  --ink-2: #8993a3;
  --ink-3: #5b6472;

  /* --- type --- */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* --- radius / shadow --- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow-teal: 0 0 0 1px rgba(30, 201, 192, 0.4), 0 0 24px rgba(30, 201, 192, 0.25);
  --shadow-glow-amber: 0 0 0 1px rgba(240, 184, 74, 0.4), 0 0 24px rgba(240, 184, 74, 0.2);

  --header-h: 72px;
  --content-w: 1240px;
}

html[data-theme='light'] {
  --navy-950: #f4f6f8;
  --navy-900: #eef1f4;
  --navy-800: #e6e9ee;
  --panel: #ffffff;
  --card: #ffffff;
  --card-hover: #f7f8fa;
  --border: rgba(10, 15, 25, 0.08);
  --border-strong: rgba(10, 15, 25, 0.16);
  --ink-0: #0c1220;
  --ink-1: #33404f;
  --ink-2: #626f7d;
  --ink-3: #8b96a3;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(136, 119, 255, 0.10), transparent 60%),
              radial-gradient(1000px 500px at 10% 0%, rgba(30, 201, 192, 0.10), transparent 55%),
              var(--navy-900);
  color: var(--ink-1);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-0); margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #04231f;
  font-weight: 700;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; margin-top: 6px; }
.section-head p { color: var(--ink-2); max-width: 46ch; }

.section { padding-block: clamp(56px, 8vw, 96px); position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.02) 12%, rgba(255,255,255,0.02) 88%, transparent); }

/* ==========================================================================
   Signature motif: "gonjong arc" — a twin-peaked curve referencing the
   Minangkabau rumah gadang roofline, used as the wayfinding divider
   between major sections instead of a plain straight rule.
   ========================================================================== */

.gonjong-divider {
  display: block;
  width: 100%;
  height: 64px;
  color: var(--navy-900);
}
.gonjong-divider path { fill: currentColor; }
.section--alt + .section .gonjong-divider,
.section .gonjong-divider { color: var(--navy-900); }

.gonjong-mark {
  width: 22px;
  height: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dim));
  color: #04231f;
}
.btn--primary:hover { box-shadow: var(--shadow-glow-teal); }

.btn--secondary {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--ink-0);
}
.btn--secondary:hover { border-color: var(--teal); }

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink-1);
  padding: 10px 18px;
  font-size: 14px;
}
.btn--ghost:hover { border-color: var(--amber); color: var(--ink-0); }

.btn--sm { padding: 8px 14px; font-size: 13px; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(8, 13, 19, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 13, 19, 0.86);
}
html[data-theme='light'] .site-header { background: rgba(244, 246, 248, 0.75); }
html[data-theme='light'] .site-header.is-scrolled { background: rgba(244, 246, 248, 0.92); }

.nav-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink-0);
  flex-shrink: 0;
}
.brand em { color: var(--teal); font-style: normal; }
.brand span.cloud { color: var(--ink-2); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--ink-0); background: rgba(255,255,255,0.06); }

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 200px;
  color: var(--ink-3);
}
.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink-0);
  font-size: 13px;
  width: 100%;
}
.nav-search input::placeholder { color: var(--ink-3); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink-1);
  position: relative;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--teal); color: var(--ink-0); }
.icon-btn .dot {
  position: absolute;
  top: 6px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px var(--panel);
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink-0);
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Hero
   ========================================================================== */
/* =====================================================
   HERO
===================================================== */

.hero{
    position:relative;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    padding-top:var(--header-h);
}

.hero-bg{
    position:absolute;
    inset:0;
    overflow:hidden;
    z-index:0;
}

/* Background */

.hero-image{
    position:absolute;
    inset:-20px;

    background-image:url("../assets/images/coverakademi.png");
    background-size:cover;
    background-position:center center;
    background-repeat:no-repeat;

    /* Blur ringan */
    filter:blur(3px);

    /* Agar blur tidak memotong pinggir */
    transform:scale(1.08);

    /* Gambar tetap jelas */
    opacity:.92;

    animation:heroZoom 28s ease-in-out infinite alternate;
}

/* Overlay */

.hero-image::after{

    content:"";

    position:absolute;
    inset:0;

    background:

    radial-gradient(
        circle at center,
        rgba(0,0,0,.15),
        rgba(0,0,0,.55)
    ),

    linear-gradient(
        180deg,
        rgba(5,10,20,.40),
        rgba(5,10,20,.75)
    );

}

/* Aurora */

.hero-bg .aurora{
    position:absolute;
    border-radius:50%;
    filter:blur(120px);
    mix-blend-mode:screen;
    opacity:.20;
    animation:auroraMove 18s ease-in-out infinite alternate;
}

.hero-bg .aurora--teal{
    width:500px;
    height:500px;
    left:-140px;
    top:-120px;
    background:#1ec9c0;
}

.hero-bg .aurora--violet{
    width:420px;
    height:420px;
    right:-120px;
    bottom:-120px;
    background:#8877ff;
}

/* Animasi */

@keyframes heroZoom{
    from{
        transform:scale(1.08);
    }
    to{
        transform:scale(1.12);
    }
}

@keyframes auroraMove{
    from{
        transform:translate(0,0);
    }
    to{
        transform:translate(-35px,30px);
    }
}

/* Hero Content */

.hero-content{
    position:relative;
    z-index:5;

    max-width:900px;

    padding:48px;

    border-radius:28px;

    background:rgba(5,10,20,.38);

    backdrop-filter:blur(12px);

    border:1px solid rgba(255,255,255,.08);

    box-shadow:0 20px 60px rgba(0,0,0,.35);
}}

.hero h1{

    color:#fff;

    text-shadow:

        0 4px 10px rgba(0,0,0,.5),

        0 10px 30px rgba(0,0,0,.6);

}

.hero-tagline{

    color:#ffffffdd;

    text-shadow:

        0 2px 8px rgba(0,0,0,.45);

}

.hero .lede{

    color:#ffffffcc;

    text-shadow:

        0 2px 10px rgba(0,0,0,.5);

}
.hero-cta .btn{

    box-shadow:

        0 8px 24px rgba(0,0,0,.25);

}
.hero-bg::before{

    content:"";

    position:absolute;

    inset:0;

    background:

    radial-gradient(
        circle,
        transparent 30%,
        rgba(0,0,0,.35) 100%
    );

    z-index:1;

}


/* ==========================================================================
   Stats
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 20px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stat-card .num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--teal);
}
.stat-card .label { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* ==========================================================================
   Category filter
   ========================================================================== */

.category-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 40px;
  scrollbar-width: thin;
}
.category-scroller::-webkit-scrollbar { height: 6px; }
.category-scroller::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }

.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--teal); color: var(--ink-0); }
.chip.is-active {
  background: linear-gradient(135deg, rgba(30,201,192,0.18), rgba(136,119,255,0.14));
  border-color: var(--teal);
  color: var(--ink-0);
}

/* ==========================================================================
   Featured carousel
   ========================================================================== */

.featured-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}
.featured-card {
  scroll-snap-align: start;
  flex: 0 0 min(720px, 88vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  box-shadow: var(--shadow-card);
}
.featured-media {
  position: relative;
  background: linear-gradient(135deg, rgba(30,201,192,0.16), rgba(136,119,255,0.12));
  aspect-ratio: 16/10;
  overflow: hidden;
}
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-media .badge-live {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(4, 20, 18, 0.85);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(30,201,192,0.4);
}
.featured-body { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.featured-body h3 { font-size: 1.6rem; }
.featured-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); font-family: var(--font-mono); }
.featured-meta .rating { color: var(--amber); }
.featured-actions { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }

/* ==========================================================================
   Game / academy grids
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.game-card, .academy-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.game-card:hover, .academy-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}

.game-card .thumb {
  height: 110px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(30,201,192,0.14), rgba(136,119,255,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.game-card h4, .academy-card h4 { font-size: 1.05rem; font-weight: 600; color: var(--ink-0); }
.game-card p, .academy-card p { font-size: 13px; color: var(--ink-2); }

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-top: auto;
}
.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--violet));
}

.game-card .tag-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }

.academy-card .icon { font-size: 1.8rem; }
.academy-card .modules { font-family: var(--font-mono); font-size: 11px; color: var(--teal); }

/* ==========================================================================
   Roadmap
   ========================================================================== */

.roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.roadmap::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 10%, var(--border-strong) 90%, transparent);
  display: none;
}
.roadmap-year {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
}
.roadmap-year .year {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 1.6rem;
  font-weight: 700;
  display: block;
  margin-bottom: 14px;
}
.roadmap-year ul { display: flex; flex-direction: column; gap: 10px; }
.roadmap-year li {
  font-size: 13.5px;
  color: var(--ink-1);
  padding-left: 18px;
  position: relative;
}
.roadmap-year li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* ==========================================================================
   Leaderboard
   ========================================================================== */

.leaderboard-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.lb-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
table.lb-table { width: 100%; border-collapse: collapse; }
table.lb-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
table.lb-table td { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.lb-table tr:last-child td { border-bottom: none; }
table.lb-table tbody tr { transition: background-color 0.2s ease; }
table.lb-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--ink-1);
}
.lb-table tbody tr:nth-child(1) .rank-badge { background: var(--amber); color: #241a00; }
.lb-table tbody tr:nth-child(2) .rank-badge { background: #c7ccd6; color: #1a1d23; }
.lb-table tbody tr:nth-child(3) .rank-badge { background: #c8834a; color: #241300; }
.lb-name { font-weight: 600; color: var(--ink-0); }
.lb-school { color: var(--ink-3); font-size: 12px; }
.lb-xp { font-family: var(--font-mono); color: var(--teal); }

/* ==========================================================================
   Achievements
   ========================================================================== */

.badge-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.badge-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 14px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge-item .icon { font-size: 2rem; margin-bottom: 10px; }
.badge-item .label { font-size: 12.5px; color: var(--ink-1); font-weight: 500; }
.badge-item[data-tier='rare'] { border-color: rgba(136,119,255,0.4); }
.badge-item[data-tier='epic'] { border-color: rgba(240,184,74,0.4); }
.badge-item[data-tier='legendary'] {
  border-color: rgba(30,201,192,0.5);
  box-shadow: var(--shadow-glow-teal);
}
.badge-item:hover { transform: translateY(-4px) scale(1.02); }

/* ==========================================================================
   News
   ========================================================================== */

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.news-card time { font-size: 12px; color: var(--ink-3); }
.news-card h4 { font-size: 1.05rem; }
.news-card p { font-size: 13px; color: var(--ink-2); }

/* ==========================================================================
   Community
   ========================================================================== */

.community-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.community-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.community-card:hover { transform: translateY(-3px); border-color: var(--teal); }
.community-card .icon { font-size: 1.8rem; }
.community-card .name { font-size: 13px; font-weight: 600; color: var(--ink-0); }

/* ==========================================================================
   Profile strip
   ========================================================================== */

.profile-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 28px;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: #04120f;
}
.profile-info .name { color: var(--ink-0); font-weight: 600; }
.profile-info .level { font-family: var(--font-mono); font-size: 12px; color: var(--amber); margin-top: 4px; }
.profile-xp-bar { margin-top: 10px; width: 100%; max-width: 320px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 56px 28px;
  background: var(--navy-950);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h5 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 13.5px; color: var(--ink-2); transition: color 0.2s ease; }
.footer-grid a:hover { color: var(--teal); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Install / toast
   ========================================================================== */

.install-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transform: translateY(120%);
  transition: transform 0.4s ease;
}
.install-toast.is-visible { transform: translateY(0); }
.install-toast p { font-size: 13px; color: var(--ink-1); max-width: 22ch; }

/* ==========================================================================
   Skeleton loading
   ========================================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 37%, var(--card) 63%);
  background-size: 400% 100%;
  animation: skeletonWave 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes skeletonWave { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .community-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .nav-links, .nav-search { display: none; }
  .nav-toggle { display: inline-flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .profile-strip { grid-template-columns: 1fr; text-align: center; }
  .profile-xp-bar { margin-inline: auto; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
