/* ── Custom Properties ── */
:root {
  --bg:         #1c1c1e;
  --bg-panel:   #2c2c2e;
  --bg-btn:     #3a3a3c;
  --text:       #ffffff;
  --text-muted: rgba(255,255,255,0.55);
  --accent:     #0a84ff;
  --accent-o:   #ff9f0a;
  --border:     rgba(255,255,255,0.08);
  --radius:     12px;
  --radius-sm:  8px;
  --nav-h:      60px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ── */
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 600; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
p { color: rgba(255,255,255,0.8); }
code { font-family: 'SF Mono', 'Fira Code', monospace; color: var(--accent); font-size: .9em; }

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--alt { background: var(--bg-panel); }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(28,28,30,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.nav__brand { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.nav__brand:hover { text-decoration: none; color: var(--text); }
.nav__links { display: flex; gap: 32px; }
.nav__links a { color: var(--text-muted); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav__links a:hover,
.nav__links a.active { color: var(--accent); text-decoration: none; }
.nav__right { display: flex; align-items: center; gap: 16px; }
.lang-toggle { display: flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 600; }
.lang-toggle a { padding: 3px 8px; border-radius: 6px; color: var(--text-muted); transition: .15s; }
.lang-toggle a.active { background: var(--bg-btn); color: var(--text); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; display: block; }
.mobile-menu { display: none; flex-direction: column; background: var(--bg-panel); border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 24px; color: var(--text-muted); border-bottom: 1px solid var(--border); font-size: 15px; }
.mobile-menu a.active,
.mobile-menu a:hover { color: var(--accent); background: rgba(10,132,255,.07); text-decoration: none; }
.mobile-lang { padding: 12px 24px; display: flex; gap: 16px; }
.mobile-lang a { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.mobile-lang a.active { color: var(--accent); }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(160deg, #1c1c1e 0%, #2c2c2e 100%);
  text-align: center;
}
.hero__eyebrow {
  display: inline-block; margin-bottom: 16px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: rgba(10,132,255,.12);
  padding: 4px 14px; border-radius: 100px;
}
.hero h1 { margin-bottom: 20px; }
.hero__sub { font-size: clamp(17px, 2.5vw, 20px); color: rgba(255,255,255,.65); max-width: 560px; margin: 0 auto 40px; }
.hero__btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s; text-decoration: none !important; border: none;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #2a94ff; }
.btn--secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn--secondary:hover { background: rgba(10,132,255,.1); }
.btn--download { background: var(--accent-o); color: #000; font-weight: 700; font-size: 16px; padding: 14px 36px; }
.btn--download:hover { background: #ffa820; }

/* ── Cards ── */
.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card__icon { font-size: 32px; margin-bottom: 14px; }
.card__title { margin-bottom: 10px; }
.card__body { color: var(--text-muted); font-size: 15px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Architecture Diagram ── */
.arch-diagram { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0; margin: 40px 0 32px; }
.arch-box { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 24px; text-align: center; min-width: 160px; }
.arch-box__layer { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 4px; }
.arch-box__name { font-size: 16px; font-weight: 700; }
.arch-box__sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.arch-arrow { display: flex; align-items: center; padding: 0 12px; color: var(--accent-o); font-size: 22px; flex-shrink: 0; }
.arch-desc { max-width: 640px; margin: 0 auto; color: rgba(255,255,255,.7); text-align: center; font-size: 15px; }

/* ── Masonry Gallery ── */
.masonry-grid {
  columns: 8;
  column-gap: 8px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color .15s;
  background: var(--bg-panel);
  padding: 6px;
}
.masonry-item:hover { border-color: var(--accent); }
.masonry-item img {
  display: block;
  width: auto;       /* natural width — never upscale */
  max-width: 100%;   /* but shrink if column is narrower */
  height: auto;
  margin: 0 auto;    /* center when narrower than cell */
}

@media (max-width: 1024px) { .masonry-grid { columns: 5; } }
@media (max-width: 768px)  { .masonry-grid { columns: 4; } }
@media (max-width: 480px)  { .masonry-grid { columns: 2; } }

/* ── Lightbox ── */
.lightbox { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.92); align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius-sm); }
.lightbox__close { position: absolute; top: 20px; right: 24px; color: var(--text-muted); font-size: 36px; cursor: pointer; background: none; border: none; line-height: 1; }

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, rgba(10,132,255,.12) 0%, rgba(255,159,10,.08) 100%);
  border: 1px solid rgba(10,132,255,.2); border-radius: var(--radius);
  padding: 56px 40px; text-align: center;
}
.cta-banner h2 { margin-bottom: 12px; }
.cta-banner p { color: var(--text-muted); margin-bottom: 28px; }

/* ── Section Heading ── */
.section__heading { margin-bottom: 12px; }
.section__sub { color: var(--text-muted); font-size: 17px; max-width: 600px; margin-bottom: 48px; }

/* ── Feature Groups (features.php) ── */
.feature-group { margin-bottom: 64px; }
.feature-group__header { padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.feature-group__tagline { color: rgba(255,255,255,.65); font-style: italic; font-size: 16px; margin-top: 8px; line-height: 1.5; }
.feature-list { display: flex; flex-direction: column; }
.feature-list li {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  color: rgba(255,255,255,.8); display: flex; align-items: baseline; gap: 10px; font-size: 15px;
}
.feature-list li::before { content: '▸'; color: var(--accent); flex-shrink: 0; font-size: 12px; }
.feature-list li:last-child { border-bottom: none; }

/* ── Form ── */
.form-wrap { max-width: 480px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.form-group input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-panel); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; font-family: inherit; transition: border-color .15s;
}
.form-group input:focus { outline: none; border-color: var(--accent); }
.form-group input::placeholder { color: rgba(255,255,255,.3); }
.privacy-note { font-size: 13px; color: var(--text-muted); margin-top: 16px; text-align: center; }

/* ── Status Banners ── */
.banner { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 28px; font-size: 15px; }
.banner--success { background: rgba(52,199,89,.12); border: 1px solid rgba(52,199,89,.3); color: #34c759; }
.banner--info    { background: rgba(10,132,255,.12); border: 1px solid rgba(10,132,255,.3); color: #5faaff; }
.banner--error   { background: rgba(255,59,48,.12);  border: 1px solid rgba(255,59,48,.3);  color: #ff6b60; }
.download-section { text-align: center; padding: 32px; background: var(--bg-panel); border-radius: var(--radius); border: 1px solid var(--border); margin-top: 24px; }
.download-section h3 { margin-bottom: 8px; }
.download-section p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* ── Beta Hero ── */
.beta-hero { text-align: center; padding: 60px 0 40px; }
.beta-hero h1 { margin-bottom: 16px; }
.beta-hero p { color: rgba(255,255,255,.65); max-width: 520px; margin: 0 auto 40px; font-size: 17px; }
.beta-perks { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.beta-perk { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); font-size: 14px; }
.beta-perk::before { content: '✓'; color: #34c759; font-weight: 700; }

/* ── System Requirements ── */
.req-note {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
  margin-top: 24px; font-size: 13px; color: var(--text-muted);
}
.req-note span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.req-note span::before { content: '✓'; color: var(--accent); font-weight: 700; font-size: 11px; }

.req-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 48px;
}
.req-card__title { font-size: 17px; font-weight: 600; margin-bottom: 20px; }
.req-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 40px; }
.req-item { display: flex; gap: 8px; font-size: 14px; align-items: baseline; }
.req-item__label { color: var(--text-muted); white-space: nowrap; min-width: 110px; flex-shrink: 0; }
.req-item__value { color: var(--text); }
.req-item--opt .req-item__label { font-style: italic; }
.req-item--opt .req-item__value { color: var(--text-muted); }

/* inline requirements strip (hero, download section) */
.req-strip {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  justify-content: center; margin-top: 20px;
}
.req-strip-item {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  background: var(--bg-btn); border-radius: 6px;
  padding: 4px 10px; white-space: nowrap;
}
.req-strip-item--accent { color: var(--accent); border: 1px solid rgba(10,132,255,.25); background: rgba(10,132,255,.07); }

@media (max-width: 768px) {
  .req-grid { grid-template-columns: 1fr; }
  .req-note { gap: 10px; }
}

/* ── How It Works Steps ── */
.steps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 40px; }
.step-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 28px 28px 24px; position: relative; overflow: hidden; }
.step-num { font-size: 64px; font-weight: 700; color: rgba(10,132,255,.08); position: absolute; top: 8px; right: 16px; line-height: 1; pointer-events: none; }
.step-card h3 { margin-bottom: 10px; font-size: 18px; }
.step-card p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* ── Leveler Callout ── */
.leveler-callout {
  background: linear-gradient(135deg, rgba(255,159,10,.1) 0%, rgba(255,159,10,.04) 100%);
  border: 1.5px solid rgba(255,159,10,.4);
  border-radius: var(--radius);
  padding: 36px 40px;
  display: flex; align-items: flex-start; gap: 28px;
}
.leveler-callout__icon { font-size: 44px; flex-shrink: 0; line-height: 1; }
.leveler-callout__tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-o); margin-bottom: 8px; }
.leveler-callout__title { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.leveler-callout__body { color: rgba(255,255,255,.75); font-size: 15px; line-height: 1.65; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; color: var(--text-muted); font-size: 13px; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__right .lang-toggle { display: none; }
  .hamburger { display: flex; }
  .cards-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .arch-diagram { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); }
  .hero { padding: 60px 0 48px; }
  .section { padding: 56px 0; }
  .cta-banner { padding: 40px 24px; }
  .beta-perks { gap: 16px; flex-direction: column; align-items: center; }
  .leveler-callout { flex-direction: column; padding: 28px 24px; }
}

/* ── Auth ── */
.form-wrap--wide { max-width: 560px; }

.form-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.form-row .form-group { margin-bottom: 0; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

#otp { font-size: 1.5rem; letter-spacing: 0.3em; text-align: center; }

.nav__auth-link {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  transition: color .15s; text-decoration: none;
}
.nav__auth-link:hover { color: var(--text); text-decoration: none; }
.nav__auth-link--logout { color: rgba(255,59,48,.75); }
.nav__auth-link--logout:hover { color: #ff3b30; }

.mobile-logout {
  padding: 14px 24px; color: rgba(255,59,48,.75);
  border-bottom: 1px solid var(--border); font-size: 15px;
  display: block; text-decoration: none;
}
.mobile-logout:hover { color: #ff3b30; background: rgba(255,59,48,.07); }

/* ── Admin / Account shared ── */
.subnav {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 16px 0 0; margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.subnav a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: background .15s, color .15s;
}
.subnav a:hover { color: var(--text); background: var(--bg-btn); text-decoration: none; }
.subnav a.active { color: var(--accent); background: rgba(10,132,255,.1); }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600;
           color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em;
           border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.badge--admin    { background: rgba(255,159,10,.15); color: var(--accent-o); }
.badge--beta     { background: rgba(10,132,255,.15); color: var(--accent); }
.badge--customer { background: rgba(52,199,89,.15);  color: #34c759; }
.badge--guest    { background: rgba(255,255,255,.08); color: var(--text-muted); }
.badge--expired  { background: rgba(255,59,48,.15);  color: #ff3b30; }
.badge--valid    { background: rgba(52,199,89,.15);  color: #34c759; }
.badge--wildcard { background: rgba(255,159,10,.15); color: var(--accent-o); }

.btn--sm { padding: 6px 14px; font-size: 13px; }
.btn--danger { background: rgba(255,59,48,.15); color: #ff3b30; border: 1px solid rgba(255,59,48,.3); }
.btn--danger:hover { background: rgba(255,59,48,.25); }
.btn--ghost { background: var(--bg-btn); color: var(--text-muted); }
.btn--ghost:hover { color: var(--text); }

.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 40px; }
.stat-card { background: var(--bg-panel); border: 1px solid var(--border);
             border-radius: var(--radius); padding: 24px 28px; }
.stat-card__num  { font-size: 36px; font-weight: 700; color: var(--accent); }
.stat-card__label{ font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.panel { background: var(--bg-panel); border: 1px solid var(--border);
         border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.panel__title { font-size: 16px; font-weight: 600; margin-bottom: 20px; }

.search-bar { display: flex; gap: 10px; margin-bottom: 24px; }
.search-bar input { flex: 1; padding: 10px 14px; background: var(--bg-panel);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-family: inherit; }
.search-bar input:focus { outline: none; border-color: var(--accent); }

.form-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

@media (max-width: 768px) { .stat-grid { grid-template-columns: 1fr; } }
