/* ============================================
   VNG Electronics Lab — Dark Tech Theme
   ============================================ */

/* --- Design Tokens --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --accent: #c6f700;
  --accent-dim: #a8d200;
  --accent-glow: rgba(198, 247, 0, 0.15);
  --accent-glow-strong: rgba(198, 247, 0, 0.3);
  --accent-secondary: #00d4ff;
  --accent-secondary-glow: rgba(0, 212, 255, 0.15);
  --text-primary: #e8e8e8;
  --text-secondary: #8a8a9a;
  --text-heading: #ffffff;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(198, 247, 0, 0.3);
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--accent-dim);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--accent);
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-dim);
  color: var(--bg-primary);
  box-shadow: 0 0 40px var(--accent-glow-strong);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border-accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.header--scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo img,
.header__logo svg {
  height: 40px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__nav-links {
  display: flex;
  gap: 2rem;
}

.header__nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-base);
  position: relative;
}

.header__nav-links a:hover,
.header__nav-links a.active {
  color: var(--text-heading);
}

.header__nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.header__nav-links a:hover::after {
  width: 100%;
}

.header__lang {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 2px;
}

.header__lang a {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all var(--transition-base);
}

.header__lang a.active {
  background: var(--accent);
  color: var(--bg-primary);
}

.header__lang a:hover:not(.active) {
  color: var(--text-heading);
}

.header__cta {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(16px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 1.5rem;
  color: var(--text-heading);
  font-weight: 600;
}

.mobile-nav a:hover {
  color: var(--accent);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(198, 247, 0, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.hero__pcb-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0v60h40v-20h20v40h-20v20h60v-40h20v60h20v-20h20v40' fill='none' stroke='%23c6f700' stroke-width='1'/%3E%3Ccircle cx='20' cy='60' r='3' fill='%23c6f700'/%3E%3Ccircle cx='60' cy='40' r='3' fill='%23c6f700'/%3E%3Ccircle cx='80' cy='80' r='3' fill='%23c6f700'/%3E%3Ccircle cx='120' cy='100' r='3' fill='%23c6f700'/%3E%3Ccircle cx='160' cy='60' r='3' fill='%23c6f700'/%3E%3Ccircle cx='180' cy='100' r='3' fill='%23c6f700'/%3E%3Cpath d='M0 120h40v40h20v-20h40v60' fill='none' stroke='%23c6f700' stroke-width='1'/%3E%3Ccircle cx='40' cy='120' r='3' fill='%23c6f700'/%3E%3Ccircle cx='60' cy='160' r='3' fill='%23c6f700'/%3E%3Ccircle cx='100' cy='140' r='3' fill='%23c6f700'/%3E%3Cpath d='M120 140h40v-20h20v60h20' fill='none' stroke='%23c6f700' stroke-width='1'/%3E%3Ccircle cx='160' cy='120' r='3' fill='%23c6f700'/%3E%3Ccircle cx='180' cy='180' r='3' fill='%23c6f700'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: pcbDrift 60s linear infinite;
}

@keyframes pcbDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(-200px, -200px); }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero__label::before {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
}

.hero__scroll-hint .chevron {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceDown {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(8px); }
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  background: var(--bg-primary);
}

.services__header {
  text-align: center;
  margin-bottom: 4rem;
}

.services__header .section-label {
  justify-content: center;
}

.services__header .section-label::before {
  display: none;
}

.services__header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1rem auto 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card--featured {
  border-top: 2px solid var(--accent);
}

.service-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-4px);
}

.service-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  transition: color var(--transition-base);
}

.service-card:hover .service-card__icon {
  color: var(--accent);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.service-card__list {
  margin-bottom: 1.5rem;
}

.service-card__list li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 4px 0;
  padding-left: 1.25rem;
  position: relative;
}

.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.service-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-base);
}

.service-card__link:hover {
  gap: 10px;
}

.service-card__link::after {
  content: '→';
}

/* ============================================
   WHY VNG (ABOUT)
   ============================================ */
.about {
  background: var(--bg-secondary);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__content h2 {
  margin-bottom: 2rem;
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about__feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.about__feature-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.about__feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.about__feature h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.about__feature p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.about__visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.8);
}

.about__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(198, 247, 0, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

/* ============================================
   PROCESS
   ============================================ */
.process {
  background: var(--bg-primary);
}

.process__header {
  text-align: center;
  margin-bottom: 4rem;
}

.process__header .section-label {
  justify-content: center;
}

.process__header .section-label::before {
  display: none;
}

.process__steps {
  display: flex;
  gap: 0;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.process__step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 1rem;
}

.process__step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
  background: var(--bg-primary);
  transition: all var(--transition-base);
}

.process__step:hover .process__step-number {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 24px var(--accent-glow-strong);
}

.process__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 2px;
  background: var(--border-subtle);
  z-index: 1;
}

.process__step h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.process__step p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  background: var(--bg-secondary);
}

.contact__header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact__header .section-label {
  justify-content: center;
}

.contact__header .section-label::before {
  display: none;
}

.contact__header p {
  color: var(--text-secondary);
  margin-top: 1rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group--error input,
.form-group--error textarea {
  border-color: #ff4444;
}

.form-group__error {
  font-size: 0.8rem;
  color: #ff4444;
  display: none;
}

.form-group--error .form-group__error {
  display: block;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-checkbox a {
  color: var(--accent);
  text-decoration: underline;
}

.contact__form .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 1rem;
}

.contact__form .btn-primary:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.form-message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-message--success {
  background: rgba(198, 247, 0, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: block;
}

.form-message--error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid #ff4444;
  color: #ff4444;
  display: block;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact__info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact__info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.contact__info-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.contact__info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact__info-item p,
.contact__info-item a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact__info-item a:hover {
  color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand img,
.footer__brand svg {
  height: 36px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__brand p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer__links h4,
.footer__contact-col h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition-base);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__contact-col p,
.footer__contact-col a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

.footer__contact-col a:hover {
  color: var(--accent);
}

.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .header__cta {
    display: none;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__visual {
    order: -1;
    max-height: 300px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .process__steps {
    flex-direction: column;
    gap: 2rem;
    max-width: 400px;
  }

  .process__step {
    text-align: left;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0;
  }

  .process__step-number {
    margin: 0;
    min-width: 56px;
  }

  .process__step:not(:last-child)::after {
    top: 56px;
    left: 28px;
    width: 2px;
    height: calc(100% + 2rem - 56px);
  }

  .process__step-content {
    padding-top: 12px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: span 2;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  section {
    padding: 60px 0;
  }

  .header__nav-links,
  .header__lang:not(.mobile-lang),
  .header__cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: calc(100vh - 60px);
  }

  .hero__buttons {
    flex-direction: column;
  }

  .hero__buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__scroll-hint {
    display: none;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__brand {
    grid-column: span 1;
  }
}

/* Large desktop */
@media (min-width: 1280px) {
  .header__cta {
    display: inline-flex;
  }
}
