/* ===== Tokens ===== */
:root {
  --bg: #060810;
  --bg-2: #0b0f1c;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eaf0ff;
  --muted: #97a0bd;
  --brand: #2ecc71;
  --brand-2: #22d3a6;
  --accent: #0ea5e9;
  --radius: 18px;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name { font-family: "Sora", sans-serif; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
section { position: relative; z-index: 1; }

/* ===== Animated background ===== */
.bg-aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 40vw; height: 40vw; border-radius: 50%; filter: blur(70px); opacity: 0.42; will-change: transform; }
.blob-1 { background: #2ecc71; top: -10%; left: -8%; animation: float1 22s var(--ease) infinite; }
.blob-2 { background: #0ea5e9; top: 20%; right: -12%; animation: float2 26s var(--ease) infinite; }
.blob-3 { background: #8b5cf6; bottom: -18%; left: 25%; animation: float3 30s var(--ease) infinite; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 70%);
  opacity: 0.4;
}
@keyframes float1 { 50% { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes float2 { 50% { transform: translate(-14vw, 16vh) scale(0.9); } }
@keyframes float3 { 50% { transform: translate(10vw, -12vh) scale(1.1); } }

/* ===== Scroll progress ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  z-index: 100; transition: width 0.1s linear;
}

/* ===== Navbar ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 60px);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 8, 16, 0.72);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; padding: 2px; object-fit: contain;
  box-shadow: 0 4px 14px -4px rgba(46, 204, 113, 0.5);
}
.brand-name { font-weight: 800; font-size: 1.3rem; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 15px; border-radius: 999px; color: var(--muted);
  font-size: 0.95rem; font-weight: 500; transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-cta {
  background: var(--brand); color: #05130c !important; font-weight: 700 !important;
  box-shadow: 0 8px 24px -8px var(--brand);
}
.nav-cta:hover { background: var(--brand-2) !important; transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Layout ===== */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(70px, 10vw, 130px) clamp(20px, 5vw, 40px); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.tag {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; }
.lead { color: var(--muted); font-size: 1.08rem; margin-top: 12px; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr;
  align-items: center; gap: 40px; max-width: var(--max);
  margin: 0 auto; padding: 120px clamp(20px, 5vw, 40px) 60px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: 0.9rem; color: var(--brand);
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 999px; margin-bottom: 22px;
}
.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; line-height: 1.05; }
.grad {
  background: linear-gradient(120deg, var(--brand), var(--accent) 60%, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.15rem; margin: 22px 0 32px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 34px; margin-top: 46px; flex-wrap: wrap; }
.hero-badges strong { display: block; font-family: "Sora"; font-size: 1.8rem; font-weight: 800; }
.hero-badges span { color: var(--muted); font-size: 0.9rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn-primary { background: var(--brand); color: #05130c; box-shadow: 0 12px 30px -10px var(--brand); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px var(--brand); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); }
.btn-block { width: 100%; justify-content: center; }

/* Code card */
.hero-visual { perspective: 1000px; }
.code-card {
  background: linear-gradient(160deg, rgba(20,26,44,0.9), rgba(10,14,26,0.9));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.2s var(--ease);
  will-change: transform;
}
.code-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.code-head .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.code-head em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 0.85rem; }
.code-body {
  padding: 22px; font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9rem; line-height: 1.7; min-height: 260px; white-space: pre-wrap; color: #cdd6f4;
}
.code-body .caret { color: var(--brand); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tok-key { color: #f472b6; } .tok-fn { color: #60a5fa; } .tok-str { color: #86efac; }
.tok-com { color: #64748b; } .tok-num { color: #fbbf24; }

/* ===== Marquee ===== */
.marquee-wrap {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 22px 0; overflow: hidden; background: rgba(255,255,255,0.015);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee { display: flex; gap: 56px; width: max-content; animation: scrollX 28s linear infinite; }
.marquee span { color: var(--muted); font-family: "Sora"; font-weight: 600; font-size: 1.25rem; white-space: nowrap; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(46,204,113,0.14), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(46,204,113,0.4); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.6rem;
  border-radius: 14px; background: linear-gradient(135deg, rgba(46,204,113,0.18), rgba(14,165,233,0.12));
  border: 1px solid var(--border); margin-bottom: 18px;
}
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: var(--muted); position: relative; }

/* ===== Work ===== */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.work {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); position: relative;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.work:hover {
  transform: translateY(-8px); border-color: rgba(46,204,113,0.35);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(46,204,113,0.12);
}
.work-thumb {
  height: 208px; background: linear-gradient(135deg, var(--c1), var(--c2));
  position: relative; overflow: hidden;
  transition: transform 0.6s var(--ease);
}
.work-thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 90% at 0% 0%, rgba(255,255,255,0.28), transparent 52%);
}
/* faux browser preview */
.wt-bar {
  display: flex; align-items: center; gap: 6px; height: 33px; padding: 0 13px;
  background: #171b26; border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative; z-index: 2;
}
.wt-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.28); }
.wt-bar i:first-child { background: #ff5f57; }
.wt-bar i:nth-child(2) { background: #febc2e; }
.wt-bar i:nth-child(3) { background: #28c840; }
.wt-bar span {
  margin-left: 8px; font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08); padding: 4px 12px; border-radius: 999px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* real site screenshot */
.wt-shot {
  position: absolute; left: 0; right: 0; top: 33px; bottom: 0; z-index: 0;
  width: 100%; height: calc(100% - 33px);
  object-fit: cover; object-position: top center; display: block;
}
/* shine sweep */
.wt-shine {
  position: absolute; top: 0; left: -60%; width: 45%; height: 100%; z-index: 2;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg); transition: left 0.6s var(--ease);
}
.work:hover .work-thumb { transform: scale(1.03); }
.work:hover .wt-shine { left: 120%; }
.work-meta { padding: 22px 24px 24px; }
.work-meta > span { color: var(--brand); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.work-meta h3 { margin-top: 6px; font-size: 1.3rem; }
.work-meta p { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }
.work-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.work-links a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 15px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.work-links a span { transition: transform 0.25s var(--ease); }
.work-links a:hover { border-color: var(--brand); background: rgba(46,204,113,0.12); transform: translateY(-2px); }
.work-links a:hover span { transform: translate(2px, -2px); }

/* CTA card */
.work-cta {
  display: grid; place-items: center; text-align: center; min-height: 100%;
  border-style: dashed; border-color: rgba(255,255,255,0.16);
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}
.work-cta:hover { transform: translateY(-6px); border-color: var(--brand); background: rgba(46,204,113,0.05); }
.work-cta-inner { padding: 30px; }
.work-cta .plus {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px;
  font-size: 2rem; font-weight: 700; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #05130c;
}
.work-cta h3 { font-size: 1.25rem; }
.work-cta p { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }

/* ===== Timeline ===== */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step {
  padding: 28px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); position: relative;
}
.step .num {
  font-family: "Sora"; font-weight: 800; font-size: 2.4rem;
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { margin: 8px 0 6px; font-size: 1.2rem; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat strong {
  display: block; font-family: "Sora"; font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.4rem);
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); }

/* ===== Contact ===== */
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  background: linear-gradient(160deg, rgba(46,204,113,0.08), rgba(14,165,233,0.05));
  border: 1px solid var(--border); border-radius: 28px; padding: clamp(30px, 5vw, 56px);
}
.contact-list { list-style: none; margin-top: 24px; display: grid; gap: 14px; color: var(--muted); }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.ci {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 11px; color: var(--brand);
  background: var(--surface); border: 1px solid var(--border);
}
.ci .icon { width: 18px; height: 18px; }
.contact-list a { color: var(--text); transition: color 0.2s; }
.contact-list a:hover { color: var(--brand); }
.tg-btn {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 24px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, #2aabee, #229ed9);
  box-shadow: 0 12px 28px -10px rgba(34,158,217,0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.tg-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(34,158,217,0.8); }
.tg-btn svg { flex-shrink: 0; }
.contact-form { display: grid; gap: 18px; align-content: start; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: rgba(6,8,16,0.6); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 16px 8px; color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s; resize: vertical;
}
.field textarea { padding-top: 20px; }
.field label {
  position: absolute; left: 16px; top: 15px; color: var(--muted);
  pointer-events: none; transition: 0.2s var(--ease); font-size: 1rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(46,204,113,0.12); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 6px; font-size: 0.72rem; color: var(--brand);
}
.field-error { display: block; margin-top: 6px; font-size: 0.82rem; color: #ff6b6b; min-height: 1px; }
.field.invalid input, .field.invalid textarea { border-color: #ff6b6b; box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.form-note { font-size: 0.9rem; min-height: 20px; }
.form-note.ok { color: var(--brand); }
.form-note.err { color: #ff6b6b; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border); max-width: var(--max); margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 40px); display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-social { display: flex; gap: 20px; }
.footer-social a:hover { color: var(--brand); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===== Icons ===== */
.icon {
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; display: block;
}
.card-icon .icon { width: 26px; height: 26px; color: var(--brand); }
.work-cta .plus .icon { width: 26px; height: 26px; stroke-width: 2.2; }

/* ===== Language switcher ===== */
.lang {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.lang button {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.lang button:hover { color: var(--text); }
.lang button.active { background: var(--brand); color: #05130c; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .hero-badges { justify-content: center; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .timeline, .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-card { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links {
    position: fixed; inset: 64px 12px auto 12px; flex-direction: column; align-items: stretch;
    background: rgba(11,15,28,0.96); backdrop-filter: blur(18px);
    border: 1px solid var(--border); border-radius: 18px; padding: 14px; gap: 4px;
    transform: translateY(-12px) scale(0.98); opacity: 0; pointer-events: none;
    transition: 0.3s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 16px; }
  .nav-links .lang { align-self: flex-start; margin: 4px 4px 8px; }
  .nav-toggle { display: flex; }
  .cards, .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .section { padding-left: 18px; padding-right: 18px; }
  .timeline { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .card, .step { padding: 24px; }
  .contact-card { padding: 26px 22px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-badges { gap: 22px; }
}
@media (max-width: 360px) {
  .hero-title { font-size: clamp(1.9rem, 8.5vw, 2.3rem); }
  .section-head h2 { font-size: 1.7rem; }
  .hero-badges { gap: 16px; }
  .hero-badges strong { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
