/* ─── Reset & Variables ──────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1c2230;
  --border:    #21262d;
  --accent:    #00c8ff;
  --accent2:   #7c3aed;
  --accent3:   #10b981;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --gradient:  linear-gradient(135deg, #00c8ff 0%, #7c3aed 100%);
  --font:      'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:      'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --radius:    12px;
  --shadow:    0 8px 32px rgba(0,0,0,.4);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; overflow-x: hidden; }
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(0,200,255,.25);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
a:hover { color: #fff; text-decoration-color: var(--accent); }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 3px; }

/* ─── Utility ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.badge {
  display: inline-block; padding: .25rem .75rem; border-radius: 99px;
  font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  background: rgba(0,200,255,.1); color: var(--accent); border: 1px solid rgba(0,200,255,.25);
}
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; margin: .75rem 0 1rem; }
.section-header p { color: var(--muted); max-width: 580px; margin: 0 auto; font-size: 1.05rem; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ─── Nav ────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1rem 0; transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(13,17,23,.85); backdrop-filter: blur(16px);
  border-color: var(--border);
}
nav .inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-decoration: none;
}
.logo.logo-sm { font-size: 1.3rem; }
.logo span { font-family: var(--mono); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--gradient); color: #fff; border: none; padding: .55rem 1.4rem;
  border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .2s;
}
.nav-cta:hover { opacity: .9; transform: translateY(-1px); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: .25rem; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ─── Hero ───────────────────────────────────────────────── */
#hero {
  min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden;
  padding: 8rem 0 5rem;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
}
canvas#grid { position: absolute; inset: 0; opacity: .35; }
.hero-glow {
  position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.15) 0%, transparent 70%);
  top: -200px; right: -200px; animation: pulse 6s ease-in-out infinite;
}
.hero-glow2 {
  position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,255,.1) 0%, transparent 70%);
  bottom: -100px; left: -100px; animation: pulse 8s ease-in-out infinite reverse;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } }

.hero-content { position: relative; z-index: 1; max-width: 780px; }
.hero-content .badge { margin-bottom: 1.5rem; }
.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1;
  letter-spacing: -.03em; margin-bottom: 1.5rem;
}
.hero-content p { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); max-width: 580px; margin-bottom: 2.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  background: var(--gradient); color: #fff; padding: .85rem 2rem; border-radius: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(124,58,237,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,.5); }
.btn-ghost {
  background: transparent; color: var(--text); padding: .85rem 2rem; border-radius: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 1px solid var(--border);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(0,200,255,.05); }

/* ─── Services ───────────────────────────────────────────── */
#services { padding: 7rem 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; position: relative; overflow: hidden; transition: transform .3s, border-color .3s, box-shadow .3s;
  cursor: default;
}
.service-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: var(--gradient); transition: opacity .3s;
  mask: linear-gradient(rgba(0,0,0,.08), transparent);
  -webkit-mask: linear-gradient(rgba(0,0,0,.08), transparent);
}
.service-card:hover { transform: translateY(-4px); border-color: rgba(0,200,255,.3); box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 1.25rem;
}
.service-icon.icon-blue   { background: rgba(0,200,255,.1); }
.service-icon.icon-purple { background: rgba(124,58,237,.1); }
.service-icon.icon-green  { background: rgba(16,185,129,.1); }
.service-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .6rem; }
.service-card p { color: var(--muted); font-size: .95rem; line-height: 1.65; }
.service-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.service-tags span {
  background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 6px;
  font-size: .75rem; padding: .2rem .55rem; color: var(--muted); font-family: var(--mono);
}

/* ─── Global ────────────────────────────────────────────── */
#global { padding: 7rem 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.global-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.global-text h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin: .75rem 0 1.25rem; }
.global-text > p { color: var(--muted); line-height: 1.75; margin-bottom: 2rem; }

.region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.5rem; }
.region { display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; transition: border-color .2s; }
.region:hover { border-color: rgba(0,200,255,.3); }
.region-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); margin-bottom: .35rem; }
.region strong { font-size: .9rem; color: var(--text); }
.region span { font-size: .8rem; color: var(--muted); }

.globe-wrap { display: flex; align-items: center; justify-content: center; }
.globe-svg { width: 100%; max-width: 360px; filter: drop-shadow(0 0 40px rgba(0,200,255,.12)); }

@keyframes globe-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.globe-lines { transform-origin: 150px 150px; animation: globe-spin 28s linear infinite; }
.globe-lines-slow { transform-origin: 150px 150px; animation: globe-spin 42s linear infinite reverse; }

/* ─── About ──────────────────────────────────────────────── */
#about { padding: 7rem 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about-visual { position: relative; }
.terminal {
  background: #010409; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.terminal-bar { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; background: var(--surface2); border-bottom: 1px solid var(--border); }
.terminal-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-bar .dot.red { background: #ff5f57; }
.terminal-bar .dot.yellow { background: #febc2e; }
.terminal-bar .dot.green { background: #28c840; }
.terminal-bar span { color: var(--muted); font-size: .8rem; font-family: var(--mono); margin-left: .5rem; }
.terminal-body { padding: 1.5rem; font-family: var(--mono); font-size: .85rem; line-height: 1.9; white-space: pre-wrap; }
.terminal-body .prompt { color: var(--accent3); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .out { color: var(--muted); }
.terminal-body .highlight { color: var(--accent); }
.terminal-body .cursor {
  display: inline-block; width: 8px; height: 1em; background: var(--accent);
  animation: blink 1.1s step-end infinite; vertical-align: text-bottom;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.about-content h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin: .75rem 0 1.25rem; }
.about-content p { color: var(--muted); margin-bottom: 1.25rem; line-height: 1.75; }
.value-list { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.value-list li { display: flex; align-items: flex-start; gap: .75rem; color: var(--text); }
.value-list li::before { content: '▸'; color: var(--accent); flex-shrink: 0; margin-top: .05em; }

/* ─── Tech Stack ─────────────────────────────────────────── */
#stack { padding: 7rem 0; }
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.stack-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1rem; text-align: center; transition: transform .2s, border-color .2s;
}
.stack-item:hover { transform: translateY(-3px); border-color: rgba(124,58,237,.4); }
.stack-item .icon { font-size: 2rem; margin-bottom: .5rem; }
.stack-item .name { font-size: .85rem; font-weight: 600; color: var(--muted); }

/* ─── Process ────────────────────────────────────────────── */
#process { padding: 7rem 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; position: relative; }
.step {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.75rem; text-align: center; position: relative;
}
.step-number {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem; font-size: 1rem; font-weight: 800; font-family: var(--mono);
  background: var(--gradient); color: #fff;
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.step p { color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* ─── Contact ────────────────────────────────────────────── */
#contact { padding: 7rem 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.contact-info h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin: .75rem 0 1.25rem; }
.contact-info p { color: var(--muted); line-height: 1.75; margin-bottom: 2rem; }
.contact-details { display: flex; flex-direction: column; gap: 1rem; }
.contact-details-label { font-size: .9rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }
.contact-row { display: flex; align-items: center; gap: 1rem; }
.contact-row-icon {
  width: 42px; height: 42px; border-radius: 10px; background: rgba(0,200,255,.1);
  border: 1px solid rgba(0,200,255,.2); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.contact-row-text .label { font-size: .75rem; color: var(--muted); }
.contact-row-text .value { font-size: .95rem; font-weight: 500; }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: var(--font); font-size: .95rem;
  padding: .75rem 1rem; transition: border-color .2s, box-shadow .2s; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,200,255,.12);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select option { background: var(--surface2); }
.form-submit {
  width: 100%; background: var(--gradient); color: #fff; border: none;
  padding: .9rem; border-radius: 10px; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: opacity .2s, transform .2s;
  box-shadow: 0 4px 20px rgba(124,58,237,.35);
}
.form-submit:hover { opacity: .9; transform: translateY(-1px); }
.form-notice { font-size: .8rem; color: var(--muted); margin-top: .75rem; text-align: center; }

/* ─── Partners ───────────────────────────────────────────── */
#partners { padding: 5rem 0; }
.partners-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem;
  max-width: 800px; margin: 0 auto;
}
.partner-card {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem 2rem; text-decoration: none; color: var(--text);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.partner-card:hover {
  transform: translateY(-4px); border-color: rgba(0,200,255,.3);
  box-shadow: 0 16px 40px rgba(0,0,0,.3); text-decoration: none;
}
.partner-logo { flex-shrink: 0; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.partner-logo svg { width: 56px; height: 56px; }
.partner-info { min-width: 0; }
.partner-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.partner-info p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin-bottom: .5rem; }
.partner-link {
  font-size: .85rem; font-weight: 600; color: var(--accent);
  transition: color .2s;
}
.partner-card:hover .partner-link { color: #fff; }

/* ─── Footer ─────────────────────────────────────────────── */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin-top: .75rem; max-width: 260px; line-height: 1.7; }
.footer-col h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul a { color: var(--muted); text-decoration: none; font-size: .9rem; transition: color .2s; }
.footer-col ul a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--border); }
.footer-bottom p { color: var(--muted); font-size: .85rem; }

/* ─── Toast ──────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  padding: 1rem 1.5rem; border-radius: 10px;
  font-weight: 600; box-shadow: var(--shadow); transform: translateY(100px); opacity: 0;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .4s;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { background: var(--accent3); color: #fff; }
#toast.error   { background: #ef4444; color: #fff; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid, .contact-grid, .global-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .partner-card { padding: 1.25rem 1.5rem; gap: 1rem; }
  .partners-grid { grid-template-columns: 1fr; }
}

/* ─── Mobile menu ────────────────────────────────────────── */
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(13,17,23,.97); backdrop-filter: blur(12px);
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text); text-decoration: none; font-size: 1.4rem; font-weight: 600; }
.mobile-menu a.menu-sub { font-size: 1.05rem; color: var(--muted); font-weight: 500; }
.mobile-menu .close-btn { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ─── Nav dropdown ────────────────────────────────────────── */
.has-dropdown { position: relative; }
.has-dropdown::after { content: ''; position: absolute; bottom: -.7rem; left: 0; right: 0; height: .7rem; }
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + .65rem); left: 50%; transform: translateX(-50%);
  background: rgba(22,27,34,.98); border: 1px solid var(--border); border-radius: 10px; padding: .4rem;
  min-width: 210px; list-style: none; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.has-dropdown:hover .nav-dropdown { display: block; }
.nav-dropdown li a {
  display: block; padding: .5rem .9rem; border-radius: 6px; color: var(--muted);
  font-size: .88rem; white-space: nowrap; text-decoration: none; transition: color .15s, background .15s;
}
.nav-dropdown li a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-dropdown li a.active { color: var(--accent); }
.has-dropdown.active-parent > a { color: var(--accent); }
.has-dropdown > a::after { content: ' \25BE'; font-size: .75em; opacity: .55; }

/* ─── Scroll animations ──────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
