/* ============================================================
   EylemROM — Professional Redesign
   Dark · Precise · Technical  (Palantir-grade)
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --bg:        #050507;
  --bg-1:      #09090d;
  --bg-2:      #0e0e15;
  --bg-3:      #13131c;
  --border:    rgba(255,255,255,0.07);
  --border-md: rgba(255,255,255,0.11);

  --white:     #ffffff;
  --text:      rgba(255,255,255,0.90);
  --muted:     rgba(255,255,255,0.42);
  --dim:       rgba(255,255,255,0.22);

  /* accent — pulled from the logo's purple/lavender */
  --accent:    #a78bfa;
  --accent-2:  #e879f9;
  --accent-dim: rgba(167,139,250,0.12);
  --accent-border: rgba(167,139,250,0.22);

  --radius:    6px;
  --radius-lg: 10px;

  --mono: 'JetBrains Mono', 'Fira Mono', 'Consolas', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.1rem; }

p { color: var(--muted); line-height: 1.75; }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--mono); }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

section { padding: 100px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: none; }

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0; z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(5,5,7,0.80);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(5,5,7,0.95); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--white);
}
.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 30%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  border-radius: var(--radius);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }

.nav-cta {
  padding: 7px 16px !important;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent) !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  transition: background 0.2s, color 0.2s !important;
}
.nav-cta:hover { background: rgba(167,139,250,0.2) !important; color: var(--white) !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.nav-hamburger span { width: 22px; height: 1.5px; background: var(--muted); border-radius: 1px; transition: 0.3s; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--white);
  color: var(--bg);
  border-color: var(--white);
}
.btn-primary:hover { background: rgba(255,255,255,0.88); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-md);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }

.btn-accent {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-border);
}
.btn-accent:hover { background: rgba(167,139,250,0.2); color: var(--white); }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: 60px;
  gap: 64px;
}

.hero-left { padding: 80px 0; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  font-family: var(--mono);
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero-title { color: var(--white); margin-bottom: 20px; }
.hero-title em { font-style: normal; color: var(--accent); }

.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.75;
}

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

.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.stat-item {}
.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}
.hero-image-wrap {
  position: relative;
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-md);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}
.hero-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(5,5,7,0.7) 100%);
}

/* ── Section label ────────────────────────────────────────── */
.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 12px;
}
.section-title { color: var(--white); margin-bottom: 14px; }
.section-desc { font-size: 0.95rem; color: var(--muted); max-width: 560px; line-height: 1.75; }

/* ── Devices grid ─────────────────────────────────────────── */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 48px;
}
.device-cell {
  background: var(--bg-1);
  padding: 28px 24px;
  transition: background 0.2s;
}
.device-cell:hover { background: var(--bg-2); }
.device-codename {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.device-name { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.device-model { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); margin-bottom: 12px; }
.device-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4ade80;
}
.device-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #4ade80; display: block; }

.device-note {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--mono);
}
.device-note strong { color: var(--text); }

/* ── ROM releases table ───────────────────────────────────── */
.releases-wrap { margin-top: 48px; }

.release-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.release-item:hover { border-color: var(--border-md); }

.release-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-1);
  cursor: pointer;
  user-select: none;
}
.release-header:hover { background: var(--bg-2); }

.release-title { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.release-meta { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); }

.release-tags { display: flex; gap: 6px; align-items: center; }
.tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--mono);
}
.tag-stable  { background: rgba(74,222,128,0.1); color: #4ade80; border: 1px solid rgba(74,222,128,0.2); }
.tag-beta    { background: rgba(251,191,36,0.1); color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
.tag-new     { background: rgba(167,139,250,0.12); color: var(--accent); border: 1px solid var(--accent-border); }
.tag-android { background: rgba(255,255,255,0.05); color: var(--muted); border: 1px solid var(--border); }

.release-actions { display: flex; gap: 8px; }

.release-body {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: var(--bg);
  border-top: 0 solid var(--border);
}
.release-body.open {
  max-height: 300px;
  padding: 20px 24px;
  border-top-width: 1px;
}

.release-changelog {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.75;
  font-family: var(--mono);
}
.release-changelog li { margin-bottom: 4px; list-style: none; }
.release-changelog li::before { content: '— '; color: var(--dim); }

/* ── Flash guide ──────────────────────────────────────────── */
.flash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 48px;
}
.flash-step {
  background: var(--bg-1);
  padding: 32px 28px;
  transition: background 0.2s;
}
.flash-step:hover { background: var(--bg-2); }

.step-num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 14px;
}
.flash-step h3 { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.flash-step p, .flash-step ul { font-size: 0.83rem; color: var(--muted); line-height: 1.8; }
.flash-step ul { list-style: none; }
.flash-step ul li { padding: 2px 0; }
.flash-step ul li::before { content: '→ '; color: var(--dim); font-family: var(--mono); }
.flash-step a { color: var(--accent); transition: color 0.2s; }
.flash-step a:hover { color: var(--white); }

.warning-strip {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: rgba(251,113,133,0.06);
  border: 1px solid rgba(251,113,133,0.18);
  margin: 36px 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.7;
}
.warning-strip strong { color: #fca5a5; }
.warning-icon { color: #fca5a5; font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

.tools-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.tool-card {
  flex: 1;
  min-width: 200px;
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.2s, background 0.2s;
}
.tool-card:hover { border-color: var(--border-md); background: var(--bg-2); }
.tool-name { font-size: 0.88rem; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.tool-desc { font-size: 0.75rem; color: var(--muted); }

/* ── Community ────────────────────────────────────────────── */
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 48px;
}
.community-card {
  padding: 24px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.community-card:hover {
  border-color: var(--border-md);
  background: var(--bg-2);
  transform: translateY(-2px);
}
.community-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.community-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.community-card p { font-size: 0.8rem; color: var(--muted); }
.community-arrow { margin-top: auto; font-size: 0.78rem; color: var(--dim); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.92rem; color: var(--white); }
.footer-brand-img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; object-position: center 30%; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 0.8rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.76rem; color: var(--dim); }

/* ── Developers page ──────────────────────────────────────── */
.devs-page-hero {
  padding: 130px 0 64px;
}
.devs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 32px;
  transition: color 0.2s;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.devs-back:hover { color: var(--white); }

.devs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding-bottom: 80px;
}

.dev-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.dev-card:hover { border-color: var(--border-md); }

.dev-card-top-bar { height: 2px; }
.dev-card-top-bar.gold { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.dev-card-top-bar.blue { background: linear-gradient(90deg, #60a5fa, var(--accent-2)); }

.dev-card-header { padding: 28px 28px 22px; border-bottom: 1px solid var(--border); }
.dev-card-body   { padding: 24px 28px 28px; }

.dev-header-row { display: flex; align-items: flex-start; gap: 16px; }
.dev-avatar {
  width: 60px; height: 60px;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900;
  flex-shrink: 0;
  overflow: hidden;
}
.dev-avatar img { width: 100%; height: 100%; object-fit: cover; }

.dev-role {
  font-size: 0.67rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-family: var(--mono);
  margin-bottom: 4px;
}
.dev-name { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 6px; letter-spacing: -0.03em; }

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(29,155,240,0.12);
  border: 1px solid rgba(29,155,240,0.25);
  font-size: 0.65rem; font-weight: 700;
  color: #60b8f8;
  text-transform: uppercase; letter-spacing: 0.07em;
  font-family: var(--mono);
}
.verified-check {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 7px; font-weight: 900;
}

.dev-bio { font-size: 0.83rem; color: var(--muted); line-height: 1.7; margin-top: 12px; }

.dev-facts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.dev-fact {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 0.82rem;
}
.fact-key {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  min-width: 80px;
  letter-spacing: 0.04em;
}
.fact-val { color: var(--text); }

.socials-heading {
  font-size: 0.67rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); font-family: var(--mono);
  margin-bottom: 10px;
}
.socials-list { display: flex; flex-direction: column; gap: 6px; }

.social-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  text-decoration: none; color: var(--text);
  font-size: 0.83rem;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.social-row:hover { border-color: var(--border-md); background: var(--bg-2); transform: translateX(3px); }

.social-ico {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.ico-tw  { background: rgba(29,155,240,0.12); border: 1px solid rgba(29,155,240,0.2); }
.ico-tg  { background: rgba(0,136,204,0.12); border: 1px solid rgba(0,136,204,0.2); }
.ico-tk  { background: rgba(255,0,80,0.10); border: 1px solid rgba(255,0,80,0.18); }
.ico-ig  { background: rgba(225,48,108,0.12); border: 1px solid rgba(225,48,108,0.2); }
.ico-xda { background: rgba(243,113,33,0.10); border: 1px solid rgba(243,113,33,0.2); }
.ico-yt  { background: rgba(255,0,0,0.10); border: 1px solid rgba(255,0,0,0.18); }
.ico-gh  { background: rgba(255,255,255,0.05); border: 1px solid var(--border); }

.social-info { flex: 1; }
.social-name   { font-weight: 600; font-size: 0.83rem; color: var(--white); }
.social-handle { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }
.social-arrow  { color: var(--dim); font-size: 0.75rem; }

.social-row .verified-badge { margin-left: 6px; }

/* ── Fade-in ───────────────────────────────────────────────── */
.appear {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.appear.in { opacity: 1; transform: none; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 80px; min-height: auto; }
  .hero-left { padding: 60px 0 0; }
  .hero-right { justify-content: center; }
  .hero-image-wrap { max-width: 380px; }
  .devices-grid { grid-template-columns: repeat(2, 1fr); }
  .flash-grid { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .devs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 60px; left: 0; right: 0;
    background: rgba(5,5,7,0.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 16px; border-bottom: 1px solid var(--border);
    gap: 2px;
  }
  .nav-links.open a { padding: 12px 14px; }
  .nav-hamburger { display: flex; }

  .devices-grid { grid-template-columns: 1fr 1fr; }
  .flash-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  section { padding: 64px 0; }
  .tools-row { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 420px) {
  .devices-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
