/* ═══════════════════════════════════
   Appnow Click — App Stylesheet
   © Appnow Click 2026
   Matrix-inspired developer editor
   ═══════════════════════════════════ */

/* ═══ FONTS ═══ */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Syne';
  font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/syne-latin.woff2) format('woff2');
}

/* ═══ VARIABLES ═══ */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-raised: #1a1a1a;
  --border: #1e1e1e;
  --border-accent: #2a2a2a;
  --text: #c8c8c8;
  --text-dim: #777777;
  --text-muted: #555555;
  --accent: #00ff41;
  --accent-dim: #00cc33;
  --accent-glow: rgba(0, 255, 65, 0.06);
  --accent-bright: #33ff66;
  --white: #e8e8e8;
  --terminal-green: #00ff41;
  --terminal-dim: #00cc33;
  --danger: #ff3333;
}

/* ═══ BASE ═══ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: 'JetBrains Mono', monospace; background: var(--bg);
  color: var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--bg); }

/* ═══ NAV ═══ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center;
  background: rgba(10,10,10,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); transition: all 0.3s ease;
}
.nav-logo { text-decoration: none; display: flex; align-items: center; }
.nav-logo-img { height: 24px; width: auto; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
  font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim); text-decoration: none; transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--accent); }

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 0.5rem; width: 36px; height: 36px;
  position: relative; z-index: 10000;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--accent); margin: 4px auto;
  transition: all 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding: 8rem 3rem 4rem; position: relative; overflow: hidden;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to right, var(--bg) 0%, rgba(10,10,10,0.85) 40%, rgba(10,10,10,0.4) 70%, transparent 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 30%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,65,0.015) 2px, rgba(0,255,65,0.015) 4px);
  pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-prefix {
  font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 2rem;
  opacity: 0; animation: fadeUp 0.8s ease 0.2s forwards;
}
.hero-prefix .cursor {
  display: inline-block; width: 8px; height: 1.1em; background: var(--accent);
  margin-left: 4px; vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
.hero h1 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 0.95;
  letter-spacing: -0.03em; color: var(--white); max-width: 800px;
  opacity: 0; animation: fadeUp 0.8s ease 0.4s forwards;
}
.hero h1 em {
  font-style: normal; color: var(--accent);
}
.hero-sub {
  margin-top: 2rem; font-size: 0.9rem; line-height: 1.8;
  color: var(--text-dim); max-width: 520px;
  opacity: 0; animation: fadeUp 0.8s ease 0.6s forwards;
}
.hero-cta-row {
  display: flex; gap: 1.5rem; align-items: center; margin-top: 3rem;
  opacity: 0; animation: fadeUp 0.8s ease 0.8s forwards;
}

/* Buttons */
.btn-primary {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1rem 2.5rem; background: var(--accent); color: var(--bg);
  border: none; cursor: pointer; text-decoration: none; transition: all 0.3s ease;
  border-radius: 3px;
}
.btn-primary:hover {
  background: var(--accent-bright); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,255,65,0.2);
}
.btn-ghost {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); text-decoration: none;
  padding: 1rem 0; border-bottom: 1px solid var(--border-accent); transition: all 0.3s ease;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent-dim); }

/* ═══ TERMINAL PREVIEW ═══ */
.terminal-section {
  padding: 6rem 3rem; border-top: 1px solid var(--border);
  position: relative; background-size: cover; background-position: center; background-repeat: no-repeat;
}
.terminal-section[style*="background-image"]::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(10,10,10,0.9);
  pointer-events: none;
}
.terminal-section[style*="background-image"] > * { position: relative; z-index: 1; }
.terminal-inner { max-width: 900px; margin: 0 auto; }
.terminal-label {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
}
.terminal {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
}
.terminal-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  font-size: 0.65rem; color: var(--text-muted); margin-left: 0.5rem;
}
.terminal-body {
  padding: 1.5rem; font-size: 0.8rem; line-height: 2; color: var(--text-dim);
}
.terminal-body .prompt { color: var(--accent); }
.terminal-body .cmd { color: var(--white); }
.terminal-body .output { color: var(--text-dim); }
.terminal-body .success { color: var(--accent); }
.terminal-body .path { color: #ffcc00; }

/* ═══ FEATURES ═══ */
.features {
  padding: 6rem 3rem; background: var(--surface);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  position: relative; background-size: cover; background-position: center; background-repeat: no-repeat;
}
.features[style*="background-image"]::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(10,10,10,0.88);
  pointer-events: none;
}
.features[style*="background-image"] > * { position: relative; z-index: 1; }
.features-inner { max-width: 1000px; margin: 0 auto; }
.section-label {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
}
.section-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1;
  color: var(--white); max-width: 600px; margin-bottom: 3rem;
}
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
}
.feature-card {
  padding: 2rem; background: var(--bg); transition: all 0.3s ease;
}
.feature-card:hover { background: var(--surface); }
.feature-icon {
  font-size: 1.2rem; margin-bottom: 1rem; color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}
.feature-card h3 {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.95rem; color: var(--white); margin-bottom: 0.75rem;
}
.feature-card p { font-size: 0.78rem; line-height: 1.7; color: var(--text-dim); }

/* ═══ HOW IT WORKS ═══ */
.how-section {
  padding: 6rem 3rem; border-bottom: 1px solid var(--border);
}
.how-inner { max-width: 900px; margin: 0 auto; }
.how-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem;
}
.how-step { position: relative; }
.how-step-num {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 3rem; color: var(--border-accent); line-height: 1; margin-bottom: 1rem;
}
.how-step h3 {
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  letter-spacing: 0.05em; margin-bottom: 0.75rem;
}
.how-step p { font-size: 0.78rem; line-height: 1.7; color: var(--text-dim); }

/* ═══ PWA SECTION ═══ */
.pwa-section {
  padding: 6rem 3rem; background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative; background-size: cover; background-position: center; background-repeat: no-repeat;
}
.pwa-section[style*="background-image"]::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(10,10,10,0.85);
  pointer-events: none;
}
.pwa-section[style*="background-image"] > * { position: relative; z-index: 1; }
.pwa-inner { max-width: 900px; margin: 0 auto; }
.pwa-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  margin-top: 3rem;
}
.pwa-text p { font-size: 0.85rem; line-height: 1.8; color: var(--text-dim); margin-bottom: 1.5rem; }
.pwa-text strong { color: var(--text); }
.pwa-visual {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 2rem; text-align: center;
}
.pwa-icon-display {
  width: 80px; height: 80px; margin: 0 auto 1.5rem;
  background: var(--accent-glow); border: 2px solid var(--accent-dim);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--accent);
}
.pwa-badge {
  display: inline-block; font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.4rem 1rem;
  border: 1px solid var(--accent-dim); border-radius: 3px;
  color: var(--accent);
}

/* ═══ CTA ═══ */
.cta {
  padding: 8rem 3rem; text-align: center; position: relative; overflow: hidden;
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,255,65,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.cta > * { position: relative; z-index: 1; }
.cta h2 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem); line-height: 1;
  color: var(--white); letter-spacing: -0.03em; max-width: 600px; margin: 0 auto;
}
.cta h2 em { font-style: normal; color: var(--accent); }
.cta p {
  margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-dim);
  max-width: 450px; margin-left: auto; margin-right: auto; line-height: 1.7;
}
.cta .btn-primary { margin-top: 2.5rem; }

/* ═══ FOOTER ═══ */
footer {
  padding: 2rem 2rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-left { display: flex; align-items: center; gap: 1.5rem; }
.footer-logo { display: flex; align-items: center; }
.footer-logo-img { height: 18px; width: auto; opacity: 0.4; transition: opacity 0.3s; }
.footer-logo:hover .footer-logo-img { opacity: 0.7; }
#footer-copy { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.05em; }
.footer-right { font-size: 0.65rem; }
.footer-right a {
  color: var(--text-dim); text-decoration: none; margin-left: 2rem; transition: color 0.3s ease;
}
.footer-right a:hover { color: var(--accent); }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  50% { opacity: 0; }
}
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══ MATRIX RAIN (background effect) ═══ */
.matrix-rain {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1; pointer-events: none; opacity: 0.03;
}

/* ═══ PAGE HEADER (sub-pages) ═══ */
.page-header {
  padding: 8rem 3rem 3rem; max-width: 900px; margin: 0 auto;
}
.page-header .label {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
}
.page-header h1 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1;
  color: var(--white); letter-spacing: -0.03em;
}
.page-header h1 em { font-style: normal; color: var(--accent); }
.page-header .intro {
  margin-top: 1.5rem; font-size: 0.88rem; line-height: 1.7;
  color: var(--text-dim); max-width: 600px;
}

/* ═══ CONTENT (sub-pages) ═══ */
.content {
  max-width: 900px; margin: 0 auto; padding: 0 3rem 4rem;
}
.content h2 {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1.3rem; color: var(--white); margin: 2.5rem 0 1rem; letter-spacing: -0.01em;
}
.content p { font-size: 0.88rem; line-height: 1.8; color: var(--text-dim); margin-bottom: 1.25rem; }
.content strong { color: var(--text); font-weight: 600; }
.content ul { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.content ul li {
  font-size: 0.85rem; line-height: 1.7; color: var(--text-dim);
  padding: 0.3rem 0 0.3rem 1.5rem; position: relative;
}
.content ul li::before {
  content: '>'; position: absolute; left: 0; top: 0.3rem;
  color: var(--accent); font-weight: 600;
}
.content code {
  font-size: 0.82em; background: var(--surface-raised); color: var(--accent);
  padding: 0.15rem 0.4rem; border-radius: 3px; border: 1px solid var(--border);
}

.back-link {
  display: inline-block; margin-top: 2rem;
  font-size: 0.7rem; letter-spacing: 0.05em;
  color: var(--accent); text-decoration: none; transition: color 0.3s ease;
}
.back-link:hover { color: var(--white); }

/* ═══ RESPONSIVE ═══ */

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: 1fr; gap: 3rem; }
  .pwa-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-logo-img { height: 20px; }
  .nav-hamburger { display: block; }
  .nav-links {
    display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh; height: 100dvh;
    background: #0a0a0a;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2.5rem; z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a {
    font-size: 1.2rem; letter-spacing: 0.15em; color: var(--text);
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
  }
  .nav-links a:nth-child(1) { transition-delay: 0s; }
  .nav-links a:nth-child(2) { transition-delay: 0.06s; }
  .nav-links a:nth-child(3) { transition-delay: 0.12s; }
  .nav-links.open a { opacity: 1; transform: translateY(0); }
  .nav-links a:hover { color: var(--accent); }
  .hero { padding: 7rem 1.5rem 3rem; }
  .hero-cta-row { flex-direction: column; align-items: flex-start; }
  .terminal-section { padding: 4rem 1.5rem; }
  .features { padding: 4rem 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .how-section { padding: 4rem 1.5rem; }
  .pwa-section { padding: 4rem 1.5rem; }
  .cta { padding: 5rem 1.5rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-left { flex-direction: column; gap: 0.5rem; }
  .footer-right { display: flex; gap: 1.5rem; }
  .footer-right a { margin-left: 0; }
  .page-header { padding: 7rem 1.5rem 2rem; }
  .content { padding: 0 1.5rem 3rem; }
}

@media (max-width: 480px) {
  nav { padding: 0.75rem 1rem; }
  .nav-logo-img { height: 18px; }
  .hero { padding: 5.5rem 1rem 2rem; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  .hero-prefix { font-size: 0.65rem; }
  .hero-sub { font-size: 0.8rem; }
  .btn-primary { padding: 0.85rem 1.5rem; font-size: 0.65rem; }
  .btn-ghost { font-size: 0.65rem; }
  .terminal-section { padding: 3rem 1rem; }
  .terminal-body { font-size: 0.7rem; padding: 1rem; }
  .features { padding: 3rem 1rem; }
  .feature-card { padding: 1.5rem; }
  .how-section { padding: 3rem 1rem; }
  .how-step-num { font-size: 2rem; }
  .pwa-section { padding: 3rem 1rem; }
  .cta { padding: 3rem 1rem; }
  .cta h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  footer { padding: 1.5rem 1rem; }
  .section-label { font-size: 0.6rem; }
  .section-title { font-size: clamp(1.3rem, 5vw, 1.8rem); margin-bottom: 2rem; }
  .page-header { padding: 5.5rem 1rem 2rem; }
  .content { padding: 0 1rem 2rem; }
}
