/* ============ TOKENS ============ */
:root {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --bg-card: #131c31;
  --bg-card-2: #182137;
  --line: #25304a;
  --text: #e8eefc;
  --muted: #9fb0cf;
  --accent: #34d399;
  --accent-2: #6366f1;
  --accent-3: #38bdf8;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.65);
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
section { scroll-margin-top: 80px; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(11,17,32,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.brand-mark { display: grid; place-items: center; }
.brand-accent { background: linear-gradient(90deg,var(--accent),var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(10px,2vw,26px); font-weight: 500; }
.nav a { color: var(--muted); transition: color .2s; font-size: 15px; }
.nav a:hover { color: var(--text); }
.nav .nav-cta {
  color: #06231a; background: linear-gradient(90deg,var(--accent),var(--accent-3));
  padding: 9px 16px; border-radius: 999px; font-weight: 700;
}
.nav .nav-cta:hover { color: #06231a; filter: brightness(1.08); }
.lang-switch { display: flex; gap: 4px; padding-left: 8px; border-left: 1px solid var(--line); }
.lang-btn {
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  padding: 4px 5px; cursor: pointer; line-height: 0; opacity: .5; transition: .2s;
}
.lang-btn:hover { opacity: .85; }
.lang-btn.active { opacity: 1; border-color: var(--line); background: var(--bg-card); }
.nav a { white-space: nowrap; }
@media (max-width: 720px) { .nav .nav-cta, .nav a:not(.nav-cta) { font-size: 13px; } .nav a:nth-child(1),.nav a:nth-child(2) { display: none; } }

/* ============ LAYOUT ============ */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px,9vw,110px) clamp(16px,4vw,40px); }
.section-alt { background:
  radial-gradient(1200px 400px at 50% -10%, rgba(99,102,241,.10), transparent 60%),
  var(--bg-soft); max-width: none; }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { max-width: 720px; margin: 0 auto clamp(36px,5vw,56px); text-align: center; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  padding: 5px 12px; border: 1px solid rgba(52,211,153,.3); border-radius: 999px;
  background: rgba(52,211,153,.07); margin-bottom: 18px;
}
.eyebrow.light { color: #d8fbef; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.section-head h2 { font-size: clamp(28px,4.5vw,42px); font-weight: 800; }
.section-sub { margin-top: 16px; color: var(--muted); font-size: clamp(16px,2vw,18px); }

/* ============ HERO ============ */
.hero { position: relative; overflow: hidden; padding: clamp(60px,11vw,140px) clamp(16px,4vw,40px) clamp(40px,7vw,90px); }
.hero-inner { max-width: 880px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.hero-glow {
  position: absolute; inset: -30% -10% auto; height: 700px; z-index: 1;
  background:
    radial-gradient(600px 360px at 30% 20%, rgba(52,211,153,.22), transparent 60%),
    radial-gradient(620px 380px at 72% 30%, rgba(99,102,241,.24), transparent 62%),
    radial-gradient(500px 320px at 50% 60%, rgba(56,189,248,.16), transparent 60%);
  filter: blur(8px);
}
.kicker {
  display: inline-block; color: var(--muted); font-weight: 600; font-size: 14px;
  letter-spacing: .04em; padding: 7px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.03); margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(34px,6.2vw,62px); font-weight: 900; letter-spacing: -0.03em;
  background: linear-gradient(180deg,#fff 30%,#bcd0f5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 22px auto 0; max-width: 640px; color: var(--muted); font-size: clamp(17px,2.3vw,21px); }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 16px;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s, filter .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(90deg,var(--accent),var(--accent-3)); color: #06231a; box-shadow: 0 14px 34px -12px rgba(52,211,153,.6); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.09); }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.hero-stats {
  margin-top: 48px; display: flex; gap: clamp(20px,5vw,60px); justify-content: center; flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: clamp(24px,3vw,32px); font-weight: 800; background: linear-gradient(90deg,var(--accent),var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { color: var(--muted); font-size: 14px; }

/* ============ STEPS ============ */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 20px; }
.step {
  position: relative; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px 24px; transition: transform .2s, border-color .2s;
}
.step:hover { transform: translateY(-4px); border-color: rgba(52,211,153,.4); }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  font-weight: 800; font-size: 18px; color: #06231a; margin-bottom: 16px;
  background: linear-gradient(135deg,var(--accent),var(--accent-3));
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ============ PROMPT CARD ============ */
.prompt-card {
  margin-top: 40px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  max-width: 820px; margin-left: auto; margin-right: auto;
}
.prompt-card-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; background: var(--bg-card-2); border-bottom: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.prompt-card-title { margin-left: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.prompt-card-body { padding: 22px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.prompt-card-body code {
  flex: 1; min-width: 220px; font-family: inherit; font-size: 16px;
  color: #d6e2ff; line-height: 1.6; background: transparent;
}
.btn-copy {
  background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4); color: var(--accent);
  padding: 10px 18px; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 14px;
  white-space: nowrap; transition: .2s;
}
.btn-copy:hover { background: rgba(52,211,153,.22); }
.btn-copy.copied { background: var(--accent); color: #06231a; border-color: var(--accent); }

/* ============ GUIDES ============ */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 22px; }
.guide-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 12px; transition: transform .2s, border-color .2s;
}
.guide-card:hover { transform: translateY(-5px); border-color: rgba(99,102,241,.45); }
.guide-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg,rgba(52,211,153,.18),rgba(99,102,241,.18)); }
.guide-icon svg { width: 26px; height: 26px; }
.guide-card h3 { font-size: 19px; }
.guide-card p { color: var(--muted); font-size: 15px; flex: 1; }
.guide-prompt {
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 14px; font-size: 14px; color: #c4d2ef; position: relative;
}
.guide-prompt .lbl { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.guide-copy {
  margin-top: 12px; align-self: flex-start;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 8px 14px; border-radius: 9px; font-weight: 600; cursor: pointer; font-size: 13px; transition: .2s;
}
.guide-copy:hover { color: var(--text); border-color: var(--accent); }
.guide-copy.copied { color: var(--accent); border-color: var(--accent); }

/* ============ PROJECTS ============ */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 22px; }
.project-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; overflow: hidden; transition: transform .2s, border-color .2s;
}
.project-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
}
.project-card:hover { transform: translateY(-5px); border-color: rgba(56,189,248,.4); }
.project-emoji { font-size: 30px; }
.project-card h3 { font-size: 19px; margin: 12px 0 6px; }
.project-tag { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-3); }
.project-card p { color: var(--muted); font-size: 15px; margin-top: 10px; }
.project-you {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 14px; color: #cfe9dd;
}
.project-you strong { color: var(--accent); }

/* ============ COMMUNITY / STORIES ============ */
.section-head .btn { margin-top: 24px; }
.stories-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 22px; }
.stories-empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 16px;
  padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255,255,255,.02);
}
.story-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, border-color .2s;
}
.story-card:hover { transform: translateY(-4px); border-color: rgba(52,211,153,.4); }
.story-quote { color: var(--accent); font-size: 30px; line-height: .8; height: 16px; }
.story-card h3 { font-size: 18px; }
.story-card p { color: var(--muted); font-size: 15px; flex: 1; white-space: pre-wrap; }
.story-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.story-author { font-size: 14px; font-weight: 600; color: var(--text); }
.story-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--accent-3); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; transition: .2s;
}
.story-link:hover { border-color: var(--accent-3); color: var(--accent-3); }
.story-link svg { width: 15px; height: 15px; }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,8,18,.72); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; z-index: 2; width: min(560px,100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(24px,4vw,38px); box-shadow: var(--shadow); animation: popIn .22s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-x {
  position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border-radius: 10px;
  background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1;
}
.modal-x:hover { color: var(--text); border-color: var(--accent); }
.modal-card h3 { font-size: 23px; }
.modal-lead { color: var(--muted); font-size: 15px; margin: 8px 0 22px; }
#storyForm label { display: block; margin-bottom: 16px; }
#storyForm label > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; color: #cfdcf6; }
#storyForm em { font-style: normal; color: var(--muted); font-weight: 400; }
#storyForm input, #storyForm textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 15px; resize: vertical;
}
#storyForm input:focus, #storyForm textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,211,153,.15); }
#storyForm input.bad, #storyForm textarea.bad { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 14px; min-height: 20px; margin: 4px 0 10px; }
.form-msg.error { color: #f87171; }
.form-msg.success { color: var(--accent); }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.form-actions .btn { padding: 12px 22px; font-size: 15px; }

/* ============ CTA ============ */
.section-cta { max-width: var(--maxw); }
.cta-card {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(160deg,#101b34,#0c1428);
  border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(40px,7vw,72px) clamp(22px,5vw,60px); box-shadow: var(--shadow);
}
.cta-glow { position: absolute; inset: -40% -20% auto; height: 420px; background: radial-gradient(500px 300px at 50% 0,rgba(52,211,153,.25),transparent 60%), radial-gradient(480px 300px at 70% 10%,rgba(99,102,241,.22),transparent 62%); filter: blur(6px); }
.cta-card > * { position: relative; z-index: 2; }
.cta-card h2 { font-size: clamp(26px,4vw,40px); font-weight: 800; max-width: 640px; margin: 16px auto 0; }
.cta-card > p { color: var(--muted); max-width: 560px; margin: 16px auto 0; font-size: 17px; }
.cta-checklist { list-style: none; max-width: 440px; margin: 28px auto 6px; text-align: left; display: grid; gap: 12px; }
.cta-checklist li { position: relative; padding-left: 38px; color: var(--text); font-weight: 500; }
.cta-checklist li::before {
  content: "✓"; position: absolute; left: 0; top: -1px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 14px;
  color: #06231a; background: linear-gradient(135deg,var(--accent),var(--accent-3));
}
.cta-card .btn { margin-top: 26px; }
.cta-fine { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ============ FOOTER ============ */
.site-footer { text-align: center; padding: 40px 20px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer strong { color: var(--text); }
.footer-fine { font-size: 13px; margin-top: 6px; opacity: .8; }
.footer-legal { margin-top: 14px; display: flex; gap: 10px; justify-content: center; align-items: center; font-size: 14px; }
.footer-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.footer-legal a:hover { color: var(--text); }
.footer-legal span { color: var(--line); }

/* ============ TO TOP ============ */
.to-top {
  position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; z-index: 60;
  border-radius: 50%; border: 1px solid var(--line); background: var(--bg-card); color: var(--text);
  font-size: 20px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s, transform .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); border-color: var(--accent); }

/* ============ REVEAL ANIM ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
