/* ============================================================
   FelixCraft · Home v15 — Ethereal Minimalism
   ============================================================ */

/* ── Loading ────────────────────────────────────────────── */
#loading-screen {
  position: fixed; inset: 0; z-index: 99999;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity 0.6s ease;
}
#loading-screen.hide { opacity: 0; pointer-events: none; }
.loader { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.loader-logo img {
  width: 48px; height: 48px; border-radius: 14px;
  animation: loaderFloat 2.2s ease-in-out infinite;
}
@keyframes loaderFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.loader-bar { width: 80px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.loader-fill { width: 35%; height: 100%; background: var(--gradient); border-radius: 2px; animation: loaderSlide 1.4s ease-in-out infinite; }
@keyframes loaderSlide { 0%{transform:translateX(-120%)} 100%{transform:translateX(500%)} }
.loader-text { font: 600 0.55rem/1 var(--font); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar-container {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: center; padding-inline: 20px;
  pointer-events: none;
  transition: all 0.4s var(--ease);
}
body.scrolled .navbar-container { top: 10px; }
body.ui-hidden .navbar-container { opacity: 0; pointer-events: none; transform: translateY(-16px); }

.ui-restore-btn {
  position: fixed; top: 16px; right: 20px; z-index: 1001;
  display: none; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--muted); font-size: 0.75rem;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ui-restore-btn:hover { color: var(--accent); border-color: var(--accent); box-shadow: var(--shadow-md); }
body.ui-hidden .ui-restore-btn { display: grid; }

.navbar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 4px;
  width: min(1060px,100%); min-height: 46px;
  padding: 4px 6px 4px 16px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
body.scrolled .navbar { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
[data-theme="dark"] .navbar { background: rgba(9,9,11,0.80); }

.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.86rem; color: var(--ink); flex-shrink: 0; }
.nav-brand img { width: 26px; height: 26px; border-radius: 8px; transition: transform 0.3s var(--ease); }
.nav-brand:hover img { transform: scale(1.08) rotate(-4deg); }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-item { padding: 6px 14px; border-radius: var(--r-pill); color: var(--muted); font-size: 0.76rem; font-weight: 500; white-space: nowrap; transition: color 0.2s ease, background 0.2s ease; }
.nav-item:hover { color: var(--ink); background: var(--accent-subtle); }
.nav-item.active { color: var(--accent); background: var(--accent-subtle); }

.nav-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; margin-left: 8px; }

#hero-clock {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 28px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--accent-subtle); color: var(--accent);
  font: 500 0.58rem/1 var(--mono); letter-spacing: 0.04em;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
#hero-clock i { font-size: 0.58rem; opacity: 0.55; }
#hero-clock:hover { background: rgba(14,165,233,0.08); border-color: var(--accent); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border: none; border-radius: var(--r-pill);
  background: var(--accent); color: #fff;
  font: 500 0.76rem var(--font); cursor: pointer; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(14,165,233,0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { background: var(--accent2); box-shadow: 0 4px 12px rgba(14,165,233,0.30); }

/* Mobile Nav */
.nav-menu-toggle { display: none; color: var(--ink2); border-color: var(--line); background: transparent; }
.nav-menu-toggle span, .nav-menu-toggle span::before, .nav-menu-toggle span::after {
  display: block; width: 14px; height: 1.5px; margin: auto;
  border-radius: 99px; background: currentColor; content: "";
  transition: transform 0.24s ease, opacity 0.18s ease;
}
.nav-menu-toggle span::before { transform: translateY(-4px); }
.nav-menu-toggle span::after { transform: translateY(3px); }
.nav-menu-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.nav-menu-toggle[aria-expanded="true"] span::before { transform: translateY(0) rotate(90deg); }
.nav-menu-toggle[aria-expanded="true"] span::after { opacity: 0; }

@media (max-width: 880px) {
  .nav-menu-toggle { display: inline-grid; place-items: center; }
  .nav-brand span { display: none; }
  .nav-links { display: none; }
  .nav-cta span { display: none; }
  .navbar.menu-open { border-radius: 20px; }
  .navbar.menu-open .nav-links {
    display: flex; flex-wrap: wrap; gap: 4px; order: 5; width: 100%;
    padding: 8px 4px 6px; border-top: 1px solid var(--line);
    animation: navDrop 0.25s var(--ease) both;
  }
  @keyframes navDrop { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:none} }
  .navbar.menu-open .nav-item { flex: 1 1 calc(33.333% - 8px); justify-content: center; }
}
@media (max-width: 540px) {
  .navbar-container { top: 12px; padding-inline: 12px; }
  #hero-clock #ui-eye-icon, #hero-clock #video-pause-icon { display: none; }
}

body.ui-hidden #hero-clock { opacity: 1 !important; pointer-events: auto !important; }
body.lang-changing, body.theme-changing { opacity: 0; transition: opacity 0.25s ease; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start;
  min-height: 100svh; padding: 0 0 120px;
  overflow: hidden;
}

.hero-bg-container {
  position: absolute; inset: 0; z-index: 0;
  background: var(--bg);
  transition: filter 0.8s ease;
}
.hero-bg-container::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(14,165,233,0.05), transparent),
    radial-gradient(ellipse 50% 35% at 80% 10%, rgba(6,182,212,0.03), transparent);
}
[data-theme="dark"] .hero-bg-container::before {
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(56,189,248,0.08), transparent),
    radial-gradient(ellipse 50% 35% at 80% 10%, rgba(34,211,238,0.05), transparent);
}

.hero-bg-image, .hero-bg-video { position: absolute; inset: 0; opacity: 0; z-index: 0; transition: opacity 1.2s ease; }
.hero-bg-image { background-size: cover; background-position: center; }
.hero-bg-video video {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%; width: auto; height: auto;
  transform: translate(-50%,-50%); object-fit: cover;
  filter: brightness(0.40) saturate(0.80);
}
.hero-bg-image.active, .hero-bg-video.active { opacity: 1; }

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, var(--bg) 100%);
  transition: opacity 0.6s ease;
}
body.ui-hidden .hero-overlay { opacity: 0.2; }

.hero-inner {
  position: relative; z-index: 2;
  width: min(1100px, calc(100% - 48px)); margin-inline: auto;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
body.ui-hidden .hero-inner { opacity: 0; transform: translateY(12px); pointer-events: none; }

.hero h1 {
  max-width: 680px;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700; line-height: 0.98; letter-spacing: -0.05em;
  color: var(--ink);
}
.hero h1 .accent-word {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-p {
  max-width: 420px; margin-top: 22px;
  color: var(--muted);
  font-size: clamp(0.88rem,1.2vw,0.95rem); line-height: 1.80;
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; }

.ip-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-xs);
}
.ip-chip:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(14,165,233,0.10); }
.ip-chip .mono { color: var(--ink2); font: 500 0.76rem var(--mono); }
.ip-chip .fa-server { color: var(--accent); font-size: 0.72rem; }
.ip-chip .fa-copy { color: var(--muted); font-size: 0.72rem; opacity: 0.4; transition: opacity 0.2s ease; }
.ip-chip:hover .fa-copy { opacity: 1; }

.hero-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 0.48rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.35;
  animation: scrollHint 3s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.35; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.65; }
}
.hero-scroll-hint i { font-size: 0.72rem; }

/* ── About ──────────────────────────────────────────────── */
.about-card { max-width: 720px; margin: 0 auto; padding: clamp(32px,5vw,52px); }
.about-card p { font-size: 0.92rem; line-height: 1.90; }
.about-card p + p { margin-top: 16px; }

.about-motto { max-width: 720px; margin: 32px auto 0; text-align: center; }
.motto-text {
  font-size: clamp(1rem, 2vw, 1.3rem); font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 720px; margin: 32px auto 0; }
@media (max-width: 500px) { .about-values { grid-template-columns: repeat(2, 1fr); } }
.value-item {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.value-item:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.value-icon {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 11px; background: var(--gradient); color: #fff; font-size: 0.85rem;
  box-shadow: 0 2px 10px rgba(14,165,233,0.20);
}
.value-item span { font-size: 0.76rem; font-weight: 500; color: var(--ink2); }

/* ── Timeline ───────────────────────────────────────────── */
.timeline { position: relative; max-width: 680px; margin: 0 auto; padding-left: 44px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 20px; bottom: 20px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent3), transparent);
}
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -40px; top: 18px;
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent);
  transition: box-shadow 0.2s ease;
  box-shadow: 0 0 0 4px var(--accent-subtle);
}
.timeline-item:hover .timeline-dot { box-shadow: 0 0 0 7px var(--accent-subtle); }
.timeline-content { padding-left: 10px; }
.timeline-year {
  display: inline-block;
  font: 600 1.5rem/1 var(--mono); letter-spacing: -0.02em;
  color: var(--accent); margin-bottom: 10px;
  padding: 4px 14px; border-radius: var(--r-sm); background: var(--accent-subtle);
}
.timeline-card { padding: 22px 24px; }
.timeline-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.timeline-icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent-subtle); color: var(--accent); font-size: 0.78rem; flex-shrink: 0;
}
.timeline-card h3 { font-size: 0.95rem; font-weight: 600; }
.timeline-card p { font-size: 0.84rem; line-height: 1.75; }
.timeline-partners { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.timeline-highlight {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 6px 14px;
  border-radius: var(--r-pill); background: var(--accent-subtle);
  color: var(--accent); font-size: 0.70rem; font-weight: 500;
}

/* ── Team ───────────────────────────────────────────────── */
.bento { display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.team-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }

.member-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px;
  position: relative; overflow: hidden;
}
.member-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.member-card:hover::after { transform: scaleX(1); }

.member-avatar {
  width: 44px; height: 44px; border-radius: 11px; object-fit: cover;
  border: 2px solid var(--line);
  transition: border-color 0.25s ease;
}
.member-card:hover .member-avatar { border-color: var(--accent); }
.member-top { display: flex; align-items: center; gap: 10px; }
.member-name { font-size: 0.86rem; font-weight: 600; }
.member-role {
  display: inline-flex; margin-top: 3px; padding: 2px 9px;
  border-radius: var(--r-pill); background: var(--accent-subtle);
  color: var(--accent); font-size: 0.58rem; font-weight: 500; width: fit-content;
}
.member-focus, .member-detail { font-size: 0.75rem; line-height: 1.65; }
.member-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
}
.member-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.member-arrow {
  display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); font-size: 0.56rem;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.member-card:hover .member-arrow { background: var(--gradient); border-color: transparent; color: #fff; }

/* Feature card (CEO) */
.member-card.feature {
  grid-column: span 2;
  display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  column-gap: 18px; align-items: center; padding: 24px 28px;
}
.member-card.feature .member-avatar { width: 72px; height: 72px; border-radius: 18px; }
.member-card.feature .member-name { font-size: 1.1rem; }
.member-card.feature .member-detail { grid-column: 2/3; }
.member-card.feature .member-foot { grid-row: 3; grid-column: 2/3; }
.member-card.feature .member-arrow { grid-column: 3; grid-row: 1/3; width: 36px; height: 36px; }

/* Join card */
.join-card {
  justify-content: center; gap: 12px;
  border-style: dashed; background: var(--accent-subtle) !important;
}
.join-card::after { display: none; }
.join-card:hover { border-color: var(--accent); }
.join-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg,#5865f2,#8b95f8); color: #fff; font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(88,101,242,0.30);
}
.join-card .member-name { color: var(--accent); }
.join-card p { font-size: 0.75rem; }

@media (max-width: 960px) {
  .team-grid { grid-template-columns: repeat(auto-fit,minmax(min(260px,100%),1fr)); }
  .member-card.feature { grid-column: 1/-1; }
}
@media (max-width: 520px) {
  .member-card.feature { grid-template-columns: auto minmax(0,1fr); }
  .member-card.feature .member-avatar { width: 56px; height: 56px; }
  .member-card.feature .member-arrow { display: none; }
  .member-card.feature .member-detail, .member-card.feature .member-foot { grid-column: 1/-1; }
}
@media (max-width: 820px) { .bento { grid-template-columns: 1fr; } }

/* ── Partners ───────────────────────────────────────────── */
.partners-section .section-head { margin-bottom: 28px; }
.partner-marquee { display: flex; gap: 12px; overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); }
.marquee-track { display: flex; flex-shrink: 0; gap: 12px; min-width: max-content; animation: marquee 45s linear infinite; }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-100%)} }
.partner-marquee:hover .marquee-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
.partner-tile {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 60px; padding: 12px 20px; min-width: 170px;
}
.partner-tile img { max-height: 20px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.20; transition: all 0.35s ease; }
.partner-tile span { color: var(--muted); font-weight: 500; font-size: 0.76rem; transition: color 0.35s ease; }
.partner-tile:hover img { filter: none; opacity: 1; transform: scale(1.05); }
.partner-tile:hover span { color: var(--accent); }
.partners-more { display: flex; justify-content: center; margin-top: 20px; }

/* ── Projects ───────────────────────────────────────────── */
.project-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.project-card { display: flex; flex-direction: column; overflow: hidden; }
.project-media { position: relative; height: 170px; overflow: hidden; background: var(--card2); }
.project-media img { width:100%; height:100%; object-fit:cover; transition: transform 0.6s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.05); }
.project-media.is-empty { display: grid; place-items: center; color: var(--muted); }
.project-media.is-empty i { font-size: 1.3rem; opacity: 0.10; }
.project-media.is-empty span { font-size: 0.62rem; opacity: 0.25; }
.project-body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 16px; }
.project-body h3 { font-size: 0.92rem; font-weight: 600; }
.project-body > p { font-size: 0.78rem; line-height: 1.65; }
.project-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.project-cta { margin-top: auto; padding-top: 8px; }
.project-cta .btn { width: 100%; padding-block: 9px; font-size: 0.78rem; }
.project-card.span-full { grid-column: 1/-1; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
.project-card.span-full .project-media { height: 100%; min-height: 220px; }
.project-card.span-full .project-body { justify-content: center; padding: clamp(24px,3.5vw,40px); }
.project-card.span-full .project-cta { display: flex; gap: 8px; }
.project-card.span-full .project-cta .btn { width: auto; flex: 1; }
@media (max-width: 960px) {
  .project-card.span-full { grid-template-columns: 1fr; }
  .project-card.span-full .project-media { height: 170px; min-height: 0; }
}
@media (max-width: 820px) { .project-grid { grid-template-columns: 1fr; } }

/* ── Gallery ────────────────────────────────────────────── */
.gallery-container { position: relative; overflow: hidden; padding: 8px 0; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 20px; padding: 4px 20px; scrollbar-width: none; cursor: grab; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:active { cursor: grabbing; }
.gallery-item {
  flex: 0 0 auto; width: min(320px,70vw); aspect-ratio: 16/10;
  margin-right: 12px; scroll-snap-align: center;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.gallery-item:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(14,165,233,0.10); }
.gallery-item img { width:100%; height:100%; object-fit:cover; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item img.broken {
  opacity: 1 !important;
  object-fit: contain;
  padding: 20%;
  filter: grayscale(1) opacity(0.25);
}
.gallery-item .gallery-placeholder {
  display: none;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--accent-subtle), var(--bg2));
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 0.70rem; font-weight: 500;
}
.gallery-item .gallery-placeholder i {
  font-size: 1.2rem; opacity: 0.25;
}
.gallery-item .gallery-placeholder span {
  font-size: 0.60rem; opacity: 0.40;
}
.gallery-item.has-error img { display: none; }
.gallery-item.has-error .gallery-placeholder { display: flex; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--card); color: var(--ink); font-size: 0.62rem; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gallery-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
@media (max-width:480px) { .gallery-item { width: min(260px,74vw); } }

/* ── Features ──────────────────────────────────────────── */
.features-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px;
  position: relative; overflow: hidden;
}
.feature-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.feature-card:hover::after { transform: scaleX(1); }

.feature-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 13px;
  background: var(--accent-subtle); color: var(--accent);
  font-size: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover .feature-icon {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 14px rgba(14,165,233,0.25);
}

.feature-body { flex: 1; }
.feature-body h3 {
  font-size: 1.0rem; font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.feature-body p {
  font-size: 0.82rem; line-height: 1.70; color: var(--muted);
}

.feature-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: rgba(34,197,94,0.07); color: #16a34a;
  font-size: 0.62rem; font-weight: 600; width: fit-content;
}

.feature-highlight {
  background: linear-gradient(135deg, var(--accent-subtle), transparent);
  border-color: rgba(14,165,233,0.12);
}
.feature-highlight:hover {
  border-color: rgba(14,165,233,0.25);
  box-shadow: 0 4px 20px rgba(14,165,233,0.08);
}

.feature-card.feature-highlight .feature-icon {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 14px rgba(14,165,233,0.25);
}

@media (max-width: 820px) {
  .features-grid { grid-template-columns: 1fr; }
}
@media (min-width: 821px) and (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Footer ─────────────────────────────────────────────── */
footer { padding: 16px 0 24px; border-top: 1px solid var(--line); }
.footer-card { padding: clamp(24px,3.5vw,48px); background: transparent !important; border: none !important; box-shadow: none !important; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.3fr; gap: clamp(20px,3vw,40px); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 34px; height: 34px; border-radius: 9px; }
.footer-brand h2 { font-size: 0.84rem; font-weight: 600; }
.footer-col > p { font-size: 0.80rem; line-height: 1.75; }
.footer-col h4 { margin-bottom: 14px; color: var(--accent); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul a { color: var(--muted); font-size: 0.80rem; transition: color 0.2s ease; }
.footer-col ul a:hover { color: var(--accent); }
.footer-contact p { display: flex; align-items: baseline; gap: 7px; margin-bottom: 8px; font-size: 0.80rem; }
.footer-contact i { color: var(--accent); }
.footer-tagline { padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.70rem !important; }
.social-links { display: flex; gap: 6px; margin-top: 14px; }
.social-btn {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--muted); font-size: 0.78rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.social-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-subtle); }
.discord-status {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 9px 16px;
  border: 1px solid rgba(88,101,242,0.15); border-radius: var(--r-md);
  background: rgba(88,101,242,0.02);
}
.discord-icon { position: relative; display: grid; place-items: center; }
.discord-icon > i { color: #5865f2; font-size: 1.1rem; }
.discord-dot { position: absolute; right: -2px; bottom: -1px; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; border: 2px solid var(--card); }
.discord-metric { display: flex; flex-direction: column; line-height: 1.3; }
.discord-metric small { color: var(--muted); font-size: 0.50rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.discord-metric strong { font-size: 0.82rem; font-weight: 600; }
.discord-online strong { color: #16a34a; }
.discord-divider { width: 1px; height: 18px; background: var(--line); }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.68rem; text-align: center; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Modals ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 20px;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-panel { width: min(640px,100%); max-height: min(640px,90vh); overflow: auto; padding: clamp(20px,3.5vw,32px); transform: translateY(12px) scale(0.98); transition: transform 0.35s var(--ease); }
.modal-overlay.show .modal-panel { transform: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.modal-title { font-size: 1.05rem; font-weight: 600; margin-top: 4px; }
.modal-close { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 0.72rem; cursor: pointer; background: transparent; transition: color 0.2s ease, border-color 0.2s ease; }
.modal-close:hover { color: var(--accent); border-color: var(--accent); }
.partners-all-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); gap: 8px; }
.partners-all-grid .partner-tile { min-height: 52px; padding: 10px 14px; }

.image-modal { position: fixed; inset: 0; z-index: 5200; display: flex; flex-direction: column; background: rgba(9,9,11,0.97); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.image-modal.show { opacity: 1; pointer-events: all; }
.image-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #fff; }
.image-modal-title { font-weight: 500; font-size: 0.78rem; }
.image-counter { padding: 3px 10px; border: 1px solid rgba(255,255,255,0.06); border-radius: var(--r-sm); color: rgba(255,255,255,0.6); font: 500 0.62rem var(--mono); }
.image-modal-close { padding: 6px 14px; border: 1px solid rgba(255,255,255,0.06); border-radius: var(--r-sm); background: transparent; color: #fff; font: 500 0.70rem var(--font); cursor: pointer; transition: background 0.2s ease; }
.image-modal-close:hover { background: rgba(255,255,255,0.06); }
.image-modal-content { position: relative; flex: 1; display: grid; place-items: center; padding: 12px; }
.image-modal-content img { max-width: 90%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 10px; }
.image-modal-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.06); border-radius: 50%; background: transparent; color: #fff; font-size: 0.72rem; cursor: pointer; transition: background 0.2s ease; }
.image-modal-nav:hover { background: rgba(255,255,255,0.06); }
.image-modal-nav.prev { left: 14px; }
.image-modal-nav.next { right: 14px; }
.image-thumbnails { display: flex; gap: 5px; justify-content: safe center; padding: 10px 16px 14px; overflow-x: auto; }
.thumbnail-item { flex-shrink: 0; width: 54px; height: 36px; border: 2px solid transparent; border-radius: 5px; overflow: hidden; cursor: pointer; opacity: 0.20; transition: opacity 0.2s ease, border-color 0.2s ease; }
.thumbnail-item:hover { opacity: 0.50; }
.thumbnail-item.active { border-color: var(--accent); opacity: 1; }
.thumbnail-item img { width:100%; height:100%; object-fit:cover; }

/* ── Utilities ──────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 4000;
  padding: 9px 22px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg);
  font-weight: 500; font-size: 0.76rem;
  opacity: 0; transform: translateX(-50%) translateY(8px);
  pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.scroll-top-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: var(--gradient); color: #fff; font-size: 0.78rem; cursor: pointer;
  box-shadow: 0 2px 10px rgba(14,165,233,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { box-shadow: 0 4px 18px rgba(14,165,233,0.35); }

.page-exit { position: fixed; inset: 0; z-index: 9999; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.page-exit.active { opacity: 1; pointer-events: all; }

img[loading="lazy"] { opacity: 0; transition: opacity 0.4s ease; }
img[loading="lazy"].loaded { opacity: 1; }

.gsap-fade, .gsap-up, .gsap-left, .gsap-right, .gsap-scale { opacity: 0; }
