/* ============================================================
   AppNGen landing — design system
   Near-black developer aesthetic · blue signature accent
   Space Grotesk (display) + IBM Plex Sans (body) + Plex Mono
   ============================================================ */

:root {
  --bg:          #0A0C12;
  --bg-2:        #0E1118;
  --surface:     #141823;
  --surface-2:   #1A1F2C;
  --border:      rgba(255, 255, 255, 0.08);
  --border-2:    rgba(255, 255, 255, 0.14);

  --text:        #EAECEF;
  --muted:       #99A2B2;
  --faint:       #69728A;

  --accent:      #4F8CFF;   /* blue — signature */
  --accent-deep: #2E6BF0;   /* deeper blue — button gradient + shadows */
  --accent-ink:  #FFFFFF;   /* text on accent */
  --cyan:        #5FE3E0;   /* sparingly, gradient + hero glow */

  --radius:      14px;
  --radius-lg:   22px;
  --maxw:        1140px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }

/* brand mark colors driven by CSS (reliable across browsers) */
.brand-mark rect { fill: var(--accent); }
.brand-mark path { stroke: #fff; }

/* ---------- ambient background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.5;
}
.bg-glow {
  position: fixed; top: -260px; left: 50%; transform: translateX(-50%);
  width: 920px; height: 720px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(79, 140, 255, 0.20), transparent 70%),
    radial-gradient(closest-side, rgba(95, 227, 224, 0.10), transparent 70%);
  background-position: 30% 30%, 75% 20%;
  background-repeat: no-repeat;
  filter: blur(8px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  padding: 0.62em 1.15em; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-lg { padding: 0.85em 1.5em; font-size: 1.02rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.5);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -8px rgba(79, 140, 255, 0.6);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-2); color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.5rem;
  backdrop-filter: blur(10px);
}
.nav::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 100%;
  background: linear-gradient(var(--bg), rgba(10, 12, 18, 0.6));
  border-bottom: 1px solid var(--border);
  z-index: -1; opacity: 0; transition: opacity 0.3s;
}
.nav.scrolled::after { opacity: 1; }

.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand-mark { display: inline-flex; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; font-size: 0.95rem; color: var(--muted); }
.nav-links a { transition: color 0.18s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 0.6rem; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: sticky; top: 64px; z-index: 49;
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1rem 1.5rem 1.4rem;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
}
.mobile-menu a { padding: 0.6rem 0; color: var(--muted); font-family: var(--font-display); }
.mobile-menu a.btn { color: var(--accent-ink); margin-top: 0.4rem; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 1.5rem 3rem;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.02em;
  color: var(--muted); background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border); padding: 0.35rem 0.8rem; border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}
.eyebrow:hover { border-color: var(--border-2); color: var(--text); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.hero h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); margin: 1.3rem 0 0; font-weight: 700; }
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--cyan) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lead { color: var(--muted); font-size: 1.15rem; max-width: 34rem; margin: 1.4rem 0 2rem; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.4rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); }

/* ---------- hero product mock: a generated website in a browser ---------- */
.hero-demo { position: relative; }
.browser {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.browser-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.tl { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.tl.red { background: #ff5f57; } .tl.amber { background: #febc2e; } .tl.green { background: #28c840; }
.url {
  margin-left: 0.6rem; flex: 1; display: flex; align-items: center; gap: 0.4rem; justify-content: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.32rem 0.7rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
}
.url svg { opacity: 0.7; }

/* rendered (light) website inside the frame */
.viewport { position: relative; background: #F6F8FC; overflow: hidden; }
.site { display: grid; grid-template-columns: 58px 1fr; min-height: 300px; }
.site-side {
  background: #0E1320; padding: 14px 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.side-logo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }
.side-item { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); }
.side-item.active { background: rgba(79, 140, 255, 0.28); box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.6); }

.site-main { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; color: #0E1320; }
.site-top { display: flex; align-items: center; justify-content: space-between; }
.site-title strong { font-family: var(--font-display); font-size: 0.98rem; color: #0E1320; display: block; }
.site-title span { font-size: 0.72rem; color: #6B7686; }
.site-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--cyan)); }

.site-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  background: #fff; border: 1px solid #E6EAF1; border-radius: 11px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
  animation: fadeUp 0.5s var(--ease) both;
}
.stat:nth-child(2) { animation-delay: 0.08s; }
.stat:nth-child(3) { animation-delay: 0.16s; }
.stat-label { font-size: 0.62rem; color: #8A93A3; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-num { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: #0E1320; }
.stat-trend { font-size: 0.66rem; font-weight: 500; }
.stat-trend.up { color: #16A36B; }
.stat-trend.down { color: #E1574B; }

.site-chart {
  background: #fff; border: 1px solid #E6EAF1; border-radius: 11px; padding: 14px 14px 12px;
  display: flex; align-items: flex-end; gap: 8px; height: 118px;
}
.site-chart span {
  flex: 1; height: var(--h);
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  border-radius: 5px 5px 0 0; transform-origin: bottom;
  animation: grow 0.9s var(--ease) both;
}
.site-chart span:nth-child(2) { animation-delay: 0.07s; }
.site-chart span:nth-child(3) { animation-delay: 0.14s; }
.site-chart span:nth-child(4) { animation-delay: 0.21s; }
.site-chart span:nth-child(5) { animation-delay: 0.28s; }
.site-chart span:nth-child(6) { animation-delay: 0.35s; }
.site-chart span:nth-child(7) { animation-delay: 0.42s; }

@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* centered "describe your app" prompt box, overlaid on the rendered site */
.prompt-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem;
  background: linear-gradient(180deg, rgba(246, 248, 252, 0.4), rgba(246, 248, 252, 0.78));
  backdrop-filter: blur(2px);
}
.prompt-card {
  width: min(88%, 370px);
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #E2E7F0; border-radius: 14px;
  padding: 12px 12px 12px 15px;
  box-shadow: 0 22px 50px -18px rgba(20, 40, 80, 0.4), 0 2px 6px rgba(20, 40, 80, 0.06);
}
.prompt-spark { color: var(--accent); flex: none; display: flex; }
.prompt-text {
  flex: 1; min-height: 1.25em; line-height: 1.45;
  font-family: var(--font-body); font-size: 0.9rem; color: #0E1320;
}
.prompt-text .caret {
  display: inline-block; width: 2px; height: 1.05em; background: var(--accent);
  margin-left: 1px; transform: translateY(2px); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.prompt-go {
  flex: none; font-family: var(--font-display); font-weight: 500; font-size: 0.76rem;
  color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  border-radius: 999px; padding: 0.42rem 0.8rem;
}

.demo-pill {
  position: absolute; bottom: -16px; right: 18px;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-2);
  padding: 0.45rem 0.85rem; border-radius: 999px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.6); } 70% { box-shadow: 0 0 0 10px rgba(79, 140, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 140, 255, 0); } }

/* ---------- trust strip ---------- */
.strip {
  max-width: var(--maxw); margin: 1.5rem auto 0; padding: 2rem 1.5rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-align: center;
}
.strip > p { font-family: var(--font-mono); font-size: 0.82rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.strip-items {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.8rem;
  margin-top: 1rem; color: var(--muted); font-size: 0.95rem;
}
.strip-items i { color: var(--faint); font-style: normal; }

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) 1.5rem; }
.section-head { max-width: 42rem; margin-bottom: 3rem; }
.kicker {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0.8rem 0 0.6rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.6rem;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.step:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--surface-2); }
.step-num { font-family: var(--font-mono); color: var(--accent); font-size: 0.95rem; margin-bottom: 1.1rem; }
.step h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.98rem; }

/* feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.7rem 1.5rem;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--surface-2); }
.card-ico {
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.3rem;
  background: rgba(79, 140, 255, 0.10); border: 1px solid rgba(79, 140, 255, 0.25);
  border-radius: 12px; margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; align-items: start; }
.price {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.7rem;
  display: flex; flex-direction: column; gap: 1.4rem;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.price:hover { transform: translateY(-4px); border-color: var(--border-2); }
.price.featured {
  border-color: rgba(79, 140, 255, 0.5);
  background: linear-gradient(180deg, rgba(79, 140, 255, 0.08), var(--surface) 40%);
  box-shadow: 0 30px 70px -40px rgba(79, 140, 255, 0.5);
}
.badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: var(--accent-ink);
  padding: 0.28rem 0.8rem; border-radius: 999px; font-weight: 500;
}
.price header h3 { font-size: 1.2rem; }
.amount { font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1; margin: 0.7rem 0 0.6rem; }
.amount .cur { font-size: 1.4rem; vertical-align: super; color: var(--muted); margin-right: 2px; }
.amount .per { font-size: 1rem; font-weight: 400; color: var(--faint); margin-left: 2px; }
.includes { color: var(--muted); font-size: 0.95rem; }
.includes strong { color: var(--text); }
.price ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.price li { position: relative; padding-left: 1.6rem; color: var(--muted); font-size: 0.96rem; }
.price li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.pricing-foot { text-align: center; color: var(--faint); font-size: 0.85rem; margin-top: 1.8rem; }

/* cta band */
.cta-band { max-width: var(--maxw); margin: 0 auto 4rem; padding: 0 1.5rem; }
.cta-inner {
  background:
    radial-gradient(closest-side at 50% 0%, rgba(79, 140, 255, 0.16), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; text-align: center;
}
.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-inner p { color: var(--muted); font-size: 1.1rem; margin: 0.7rem 0 1.8rem; }

/* footer */
.footer { border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-top {
  max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.5rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem;
}
.footer-links { display: flex; gap: 1.5rem; color: var(--muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: 1.2rem 1.5rem 2.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--faint);
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-demo { order: 2; max-width: 520px; }
  .steps, .feature-grid, .pricing-grid { grid-template-columns: 1fr; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 901px) { .mobile-menu { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
