/* ============================================
   Vexatry Global — Global Stylesheet
   Design System per design.md
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --text-primary: #111827;
  --text-secondary: #64748b;
  --primary: #2563eb;
  --accent: #0ea5e9;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  --shadow-soft: 0 10px 30px -12px rgba(17, 24, 39, 0.08);
  --shadow-hover: 0 24px 48px -16px rgba(37, 99, 235, 0.18);
  --radius-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Local fonts (Manrope, variable 300-800) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[id] {
  scroll-margin-top: 90px;
}

::selection {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary);
}

/* ---------- Container ---------- */
.container-xl {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 768px) {
  .container-xl {
    padding-inline: 2rem;
  }
}

.section-pad {
  padding-block: 40px;
}
@media (min-width: 768px) {
  .section-pad {
    padding-block: 90px;
  }
}
@media (min-width: 1024px) {
  .section-pad {
    padding-block: 50px;
  }
}

/* ---------- Typography helpers ---------- */
.gradient-text {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(37, 99, 235, 0.55);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -12px rgba(37, 99, 235, 0.6);
  background: #1d4ed8;
}

.btn-secondary {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  transform: translateY(-3px);
  background: var(--bg-soft);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-soft);
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.25);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 1.5rem;
}

@media (min-width: 768px) {
  .nav-inner {
    padding-inline: 2rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.6);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1200px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 9999px;
  transition: color 0.25s, background-color 0.25s;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
  background: rgba(37, 99, 235, 0.08);
}

.nav-cta {
  display: none;
}

@media (min-width: 640px) {
  .nav-cta {
    display: inline-flex;
  }
}

.menu-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
}

@media (min-width: 1200px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
}
.mobile-menu.open {
  display: block;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background-color 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--primary);
  background: var(--bg-soft);
}
.mobile-menu .mobile-cta {
  margin: 1rem 1.5rem 1.25rem;
  display: flex;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.footer-link {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}
.footer-link:hover {
  color: var(--primary);
  transform: translateX(3px);
}
.social-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease);
}
.social-btn:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -30px) scale(1.06); }
  66% { transform: translate(-18px, 20px) scale(0.96); }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
  70% { box-shadow: 0 0 0 16px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 8s ease-in-out infinite; }
.animate-blob { animation: blob 12s ease-in-out infinite; }
.animate-pulse-ring { animation: pulse-ring 2.6s ease-out infinite; }

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  min-width: 100%;
  align-items: center;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.logo-item {
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 0.3s, opacity 0.3s;
}
.logo-item:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* ---------- Scroll reveal ---------- */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal { transform: translateY(32px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.94); }
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Hero mockup ---------- */
.mockup-window {
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px -30px rgba(17, 24, 39, 0.25);
  overflow: hidden;
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 72px;
}
.bar {
  flex: 1;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  opacity: 0.85;
  animation: grow 1.2s var(--ease) both;
}
@keyframes grow {
  from { transform: scaleY(0.2); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

/* ---------- Timeline (process) ---------- */
.process-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.25rem;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
@media (min-width: 768px) {
  .process-line {
    left: 50%;
    transform: translateX(-50%);
  }
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.6);
}

/* ---------- Misc ---------- */
.tech-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease);
}
.tech-tile:hover {
  transform: translateY(-5px);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-hover);
}

.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
}
.stat-card .number {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

input, select, textarea {
  font-family: inherit;
}

.form-field {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-field::placeholder {
  color: #94a3b8;
}
.form-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.accordion-item.open {
  box-shadow: var(--shadow-soft);
  border-color: rgba(37, 99, 235, 0.3);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.accordion-item.open .accordion-content {
  max-height: 400px;
}
.accordion-icon {
  transition: transform 0.3s var(--ease);
}
.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.portfolio-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.portfolio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(180deg, transparent 40%, rgba(17, 24, 39, 0.85));
  opacity: 0;
  transition: opacity 0.35s;
}
.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}
.portfolio-card:hover .portfolio-img {
  transform: scale(1.05);
}
.portfolio-img {
  transition: transform 0.6s var(--ease);
}

.divider-grad {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.job-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 1.75rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.job-row:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-soft);
}

.map-frame {
  filter: grayscale(0.3);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
