@font-face {
  font-family: 'Questrial-Regular';
  src: url('../fonts/Questrial-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #0e0e10;
  --surface: #18181c;
  --surface2: #222228;
  --surface3: #2a2a32;
  --border: #333340;
  --accent: #5b8af0;
  --accent-glow: rgba(91, 138, 240, 0.3);
  --accent2: #e05b7a;
  --text: #e8e8f0;
  --text2: #9898b0;
  --text3: #5a5a70;
  --green: #4ecb83;
  --canvas-bg: #1a1a20;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--canvas-bg);
  color: var(--text);
  font-family: 'Questrial-Regular', 'Space Grotesk', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  padding-top: 40px;
}

html.nav-menu-locked,
body.nav-menu-locked {
  overflow: hidden;
  height: 100%;
}

body.nav-menu-locked .preview-cta {
  visibility: hidden;
}

/* NAVBAR */
nav {
  height: 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1250;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  font-family: 'Press Start 2P', monospace;
  color: var(--accent);
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 20px;
  line-height: 1.2;
}

.nav-hamburger-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: 0.2s;
}

.nav-hamburger-spacer {
  display: none;
}

.nav-hamburger-btn:hover {
  background: var(--surface2);
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* LANGUAGE SWITCHER */
.lang-switcher {
  position: relative;
  margin-right: 16px;
}

.lang-current {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.lang-current:hover {
  background: var(--surface3);
  border-color: var(--text3);
}

.lang-current i {
  font-size: 10px;
  color: var(--text2);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1100;
}

.lang-dropdown.open {
  display: flex;
}

.lang-option {
  background: none;
  border: none;
  color: var(--text2);
  text-align: left;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  font-family: 'Questrial-Regular', 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: 0.15s;
}

.lang-option:hover {
  background: var(--surface3);
  color: var(--text);
}

.lang-option.active {
  color: var(--accent);
  font-weight: 600;
}

/* SITE NAV MENU (hamburger next to the logo: Editor / FAQ / Privacy / Terms) */
.nav-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.75);
  z-index: 1200;
  display: none;
}

.nav-menu-overlay.open {
  display: none;
}

.nav-menu-dropdown {
  position: fixed;
  top: 40px;
  left: 0;
  min-width: 280px;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
  padding: 8px;
  z-index: 1201;
  display: none;
  flex-direction: column;
  gap: 6px;
}

.nav-menu-dropdown.open {
  display: flex;
}

.nav-menu-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.15s;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-menu-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-menu-item:hover {
  background: var(--surface3);
  border-color: var(--text3);
}

.nav-menu-item i {
  width: 16px;
  text-align: center;
  color: var(--accent);
}

.nav-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 0 4px;
}

.nav-menu-socials {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 0;
  margin-top: 2px;
}

.nav-menu-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  transition: background 0.15s;
}

.nav-menu-socials a:hover {
  background: var(--surface3);
}

.social-icon {
  width: 26px;
  height: 26px;
  display: block;
  color: #fff;
}

.nav-lang-sheet {
  display: none;
}

.launch-btn {
  background: var(--accent);
  color: white;

  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
  border: 1px solid transparent;
}

.launch-btn:hover {
  background: #4a78e0;
  box-shadow: 0 0 15px var(--accent-glow);
}

/* HERO SECTION */
.hero {
  padding: 24px 0px 16px;
  text-align: center;
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
}

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  display: block;
}

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 20px;
  color: var(--text2);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: 0.2s;
}

.btn-secondary:hover {
  background: var(--surface3);
  border-color: var(--text3);
}

/* APP MOCKUP */
.app-preview {
  max-width: 800px;
  margin: 0px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  overflow: hidden;
  position: relative;
}

.preview-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  padding: 20px 56px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
  z-index: 10;
}

.preview-cta:hover {
  background: #4a78e0;
  box-shadow: 0 0 30px var(--accent-glow), 0 8px 40px rgba(0,0,0,0.5);
  transform: translate(-50%, -52%);
}

.preview-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  background: #4a4a55; /* Placeholder */
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P';
  color: var(--text3);
  font-size: 10px;
  text-transform: uppercase;
  background-image: 
    linear-gradient(45deg, #3a3a45 25%, transparent 25%),
    linear-gradient(-45deg, #3a3a45 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #3a3a45 75%),
    linear-gradient(-45deg, transparent 75%, #3a3a45 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
}

/* FEATURES */
.features {
  padding: 20px 40px 40px;
  background: var(--canvas-bg);
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
}

.section-title h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text2);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  transition: 0.3s;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "desc desc";
  align-items: center;
  column-gap: 14px;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.feature-card i {
  grid-area: icon;
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 0;
}

.feature-card h3 {
  grid-area: title;
  font-size: 20px;
  margin-bottom: 0;
}

.feature-card p {
  grid-area: desc;
  color: var(--text2);
  font-size: 15px;
  margin-top: 15px;
}

.about-teaser {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px 70px;
  text-align: center;
}

.about-teaser h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.about-teaser p {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.about-teaser a {
  color: var(--accent);
  text-decoration: none;
}

.about-teaser a:hover {
  text-decoration: underline;
}

/* THEMES BAR */
.themes-section {
  padding: 80px 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.theme-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.theme-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text2);
}

.theme-badge.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* FOOTER */
footer {
  padding: 30px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-logo {
  font-family: 'Press Start 2P', cursive;
  color: var(--text3);
  font-size: 14px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-links a {
  color: var(--text3);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text);
}

.copyright {
  font-size: 13px;
  color: var(--text3);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .hero h1 { font-size: 26px; }
  .nav-links { display: none; }
  .hero-btns { flex-direction: column; }

  nav {
    height: auto;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
    border-bottom: none;
  }

  .nav-left {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 18px 0 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
  }

  .nav-hamburger-spacer {
    display: none;
  }

  .logo-text {
    font-size: 22px;
    font-weight: normal;
    letter-spacing: 1.5px;
    line-height: 1.2;
  }

  .nav-hamburger-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    padding: 6px;
  }

  .lang-switcher {
    display: none;
  }

  .nav-menu-dropdown {
    left: 0;
    right: 0;
    top: 62px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 0 0 10px 10px;
    border: none;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    display: flex !important;
  }

  .nav-menu-dropdown.open {
    transform: translateY(0);
  }

  .nav-menu-overlay.open {
    display: block !important;
  }

  .nav-lang-sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    z-index: 1201;
    transform: translateY(120%);
    transition: transform 0.25s ease;
  }

  .nav-lang-sheet.open {
    transform: translateY(0);
  }

  .nav-lang-sheet-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 4px 10px;
    text-align: center;
  }

  .nav-lang-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .nav-lang-sheet .lang-option {
    text-align: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
  }

  .hero {
    padding: 24px 12px 12px;
  }

  .hero p {
    font-size: 16px;
    padding: 0 4px;
    margin-bottom: 24px;
  }

  .app-preview {
    max-width: 100%;
    margin: 0 4px;
    padding: 6px;
    border-radius: 10px;
  }

  .preview-img {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    font-size: 8px;
    line-height: 1.5;
    text-align: center;
    word-break: break-word;
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
  }

  .preview-cta {
    font-size: 16px;
    padding: 14px 20px;
    border-radius: 8px;
    white-space: normal;
    text-align: center;
    width: 82%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  }

  .features {
    padding: 20px 16px 60px;
  }

  .section-title {
    margin-bottom: 32px;
  }

  .section-title h2 {
    font-size: 26px;
  }

  .section-title p {
    font-size: 15px;
    padding: 0 8px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px;
  }

  .feature-card i {
    font-size: 26px;
  }

  .feature-card h3 {
    font-size: 18px;
  }

  .feature-card p {
    margin-top: 14px;
  }

  .about-teaser {
    padding: 10px 20px 40px;
  }

  .about-teaser h2 {
    font-size: 26px;
  }

  .about-teaser p {
    font-size: 14px;
  }

  .themes-section {
    padding: 40px 16px;
  }

  footer {
    padding: 40px 16px;
  }

  .footer-links {
    display: none;
  }
}

@media (max-width: 420px) {
  .hero p {
    font-size: 14px;
  }

  .preview-cta {
    font-size: 15px;
    padding: 14px 16px;
    width: 88%;
    min-height: 46px;
  }

  .preview-img {
    font-size: 8px;
    padding: 12px;
  }

  .feature-card {
    padding: 20px;
  }

  .section-title h2 {
    font-size: 22px;
  }

  .about-teaser h2 {
    font-size: 22px;
  }
}
