/* ============================================
   TALVIX — IT & Technology Services
   stylesheet: css/style.css
   Design: Enterprise Refined Dark
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 64px; }
body {
  font-family: 'Sora', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-1);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: rgba(37, 99, 235, 0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* === CSS VARIABLES === */
:root {
  --bg-base:       #080C14;
  --bg-surface:    #0D1520;
  --bg-elevated:   #131E2E;
  --brand:         #2563EB;
  --brand-hover:   #1D4ED8;
  --brand-subtle:  #1E3A6E;
  --accent:        #38BDF8;
  --text-1:        #F1F5F9;
  --text-2:        #94A3B8;
  --text-3:        #475569;
  --border:        rgba(148, 163, 184, 0.08);
  --border-hover:  rgba(148, 163, 184, 0.16);
  --grad-brand:    linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
  --grad-subtle:   linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, transparent 100%);
  --radius:        8px;
  --transition:    0.25s ease;
}

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === LOGO === */
.logo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--text-1);
  text-decoration: none;
  white-space: nowrap;
}
.logo::after {
  content: '.';
  color: var(--brand);
}

/* === NAVBAR === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(8, 12, 20, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-2);
  transition: color 0.2s;
  letter-spacing: 0.01em;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--brand);
  transition: width 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-1); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn-nav {
  font-family: 'Sora', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 20px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn-nav:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0.01em;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: white;
}
.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}
.btn-secondary {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* === SECTION === */
.section {
  padding: 6rem 0;
  position: relative;
}
.section-alt {
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-surface) 100%);
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 1rem;
}
.section-header h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.section-header p {
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.highlight {
  color: var(--brand);
}

/* === HERO === */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-base);
  padding-top: 64px;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(148,163,184,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

#hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.15;
  animation: drift 20s ease-in-out infinite alternate;
  z-index: 0;
}
.orb-1 {
  width: 500px; height: 500px;
  background: var(--brand-subtle);
  top: -100px; left: -100px;
  animation-duration: 25s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: var(--brand-subtle);
  bottom: -80px; right: -80px;
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  padding: 120px 24px 60px;
}

.hero-content > * {
  animation: heroFadeIn 0.8s ease-out both;
}
.hero-content > *:nth-child(1) { animation-delay: 0s; }
.hero-content > *:nth-child(2) { animation-delay: 0.1s; }
.hero-content > *:nth-child(3) { animation-delay: 0.2s; }
.hero-content > *:nth-child(4) { animation-delay: 0.3s; }
.hero-content > *:nth-child(5) { animation-delay: 0.4s; }

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 100px;
  padding: 5px 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 20px;
}
.hero-title .highlight {
  color: var(--brand);
}

.hero-sub {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 36px;
  letter-spacing: 0.005em;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-3);
}
.trust-avatars { display: flex; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--bg-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-2);
  margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }
.trust-text strong { color: var(--text-2); font-weight: 500; }

/* === SERVICES === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.service-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15),
              0 16px 40px rgba(0, 0, 0, 0.3);
}
.card-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  display: inline-block;
  color: var(--brand);
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-1);
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.card-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand);
  transition: gap 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.card-link:hover { gap: 0.5rem; }

/* === ABOUT === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.about-text p {
  color: var(--text-2);
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}
.about-list {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.about-list li {
  font-size: 0.95rem;
  color: var(--text-1);
  padding-left: 1.5rem;
  position: relative;
}
.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.tech-stack-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.tech-pill {
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  cursor: default;
}
.tech-pill:hover {
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--text-1);
  background: var(--bg-elevated);
}

/* === STATS === */
.stats-section {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
  position: relative;
}
.stats-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.06), transparent 70%);
  pointer-events: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-number {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  color: var(--text-1);
  line-height: 1;
}
.stat-plus {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--brand);
  margin-left: 0.05em;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-top: 0.5rem;
  font-weight: 400;
}

/* === SOLUTIONS === */
.solutions-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.solution-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.solution-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateX(4px);
}
.solution-num {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-3);
  min-width: 2.5rem;
  line-height: 1;
}
.solution-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-1);
}
.solution-body p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.contact-icon {
  font-size: 1.25rem;
  color: var(--brand);
}
.contact-item strong {
  display: block;
  font-size: 0.75rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}
.contact-item span:last-child {
  font-size: 0.9rem;
  color: var(--text-2);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-2);
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(148, 163, 184, 0.3); }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg-surface); color: var(--text-1); }
.form-note {
  font-size: 0.85rem;
  color: var(--text-2);
  text-align: center;
  min-height: 1.5rem;
}
.form-note.success { color: var(--accent); }
.form-note.error { color: #EF4444; }

/* === FOOTER === */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-top: 0.5rem;
}
.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-2);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-1); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-3);
}
.footer-bottom a { color: var(--brand); }

/* === REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === 404 PAGE === */
body.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
}
.error-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}
.error-code {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 8rem;
  line-height: 1;
  color: var(--brand);
  position: relative;
  animation: glitch 3s ease-in-out infinite;
}
@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(-1px, 2px); }
  98% { transform: translate(1px, -2px); }
}
.error-code::before,
.error-code::after {
  content: '404';
  position: absolute;
  inset: 0;
  opacity: 0;
}
.error-code::before {
  color: var(--accent);
  animation: glitchBefore 3s ease-in-out infinite;
}
.error-code::after {
  color: var(--brand-hover);
  animation: glitchAfter 3s ease-in-out infinite;
}
@keyframes glitchBefore {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  92% { transform: translate(-4px, -2px); opacity: 0.4; }
  94% { transform: translate(2px, 1px); opacity: 0.2; }
}
@keyframes glitchAfter {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  92% { transform: translate(4px, 2px); opacity: 0.4; }
  94% { transform: translate(-2px, -1px); opacity: 0.2; }
}
.error-container h1 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 2rem;
}
.error-container p {
  color: var(--text-2);
  font-size: 1rem;
  max-width: 400px;
}
.error-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

/* === RESPONSIVE: TABLET === */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { gap: 2.5rem; }
}

/* === RESPONSIVE: MOBILE === */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .section { padding: 4rem 0; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
  .btn-nav { display: none; }

  .hero-content { padding: 100px 24px 40px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .services-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-text h2 { font-size: 1.75rem; }
  .about-visual { order: -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .stat-number { font-size: 2.25rem; }
  .stat-plus { font-size: 1.25rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section-header h2 { font-size: 1.75rem; }
  .solution-item { flex-direction: column; gap: 0.5rem; padding: 1.25rem; }
  .solution-num { font-size: 1.25rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
