/* =========================================
   Vi&Co Labs — vicolabs.dev
   Dark editorial-tech aesthetic
   ========================================= */

:root {
  /* Brand palette — extracted from logo */
  --teal-deep: #0a5c5e;
  --teal: #0d8f8f;
  --teal-bright: #1abfbf;
  --teal-glow: #4eeaea;
  --cyan-light: #8df5f5;

  /* Neutrals */
  --bg: #0a0e12;
  --bg-elevated: #10161c;
  --bg-card: #141c24;
  --bg-card-hover: #1a242e;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(26, 191, 191, 0.2);

  /* Text */
  --text-primary: #e8ecf0;
  --text-secondary: #8a9bb0;
  --text-muted: #556577;

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

  /* Spacing */
  --section-pad: clamp(80px, 12vw, 160px);
  --container-max: 1200px;
  --container-pad: clamp(20px, 4vw, 48px);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-family: var(--font-display); font-style: italic; color: var(--teal-bright); }

::selection {
  background: var(--teal-deep);
  color: var(--cyan-light);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---- Grain ---- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--container-pad);
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav--scrolled {
  background: rgba(10, 14, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav__wordmark {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__labs {
  font-weight: 300;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  vertical-align: middle;
  margin-left: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.25s ease;
  letter-spacing: 0.01em;
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__cta {
  padding: 8px 20px;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  color: var(--teal-bright) !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.nav__cta:hover {
  background: rgba(26, 191, 191, 0.08);
  border-color: var(--teal-bright);
}

.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__mobile-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all 0.3s var(--ease-out);
}

.nav__mobile-toggle.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}
.nav__mobile-toggle.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 14, 18, 0.97);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.mobile-menu__link:hover {
  color: var(--text-primary);
}

.mobile-menu__cta {
  color: var(--teal-bright) !important;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--container-pad) 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
}

.hero__orb--1 {
  width: 600px;
  height: 600px;
  background: var(--teal-deep);
  top: -15%;
  right: -10%;
  animation: orbFloat1 18s var(--ease-in-out) infinite;
}

.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: var(--teal);
  bottom: -10%;
  left: -5%;
  animation: orbFloat2 22s var(--ease-in-out) infinite;
}

.hero__orb--3 {
  width: 250px;
  height: 250px;
  background: var(--teal-bright);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.1;
  animation: orbFloat3 15s var(--ease-in-out) infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-60px, 40px); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -50px); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translateX(-50%) translate(0, 0); }
  50% { transform: translateX(-50%) translate(30px, -30px); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  margin-bottom: 32px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 8px var(--teal-bright);
  animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.hero__title span {
  display: block;
}

.hero__title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--teal-bright) 0%, var(--teal-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  border: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-bright) 100%);
  color: #051414;
  box-shadow: 0 0 24px rgba(26, 191, 191, 0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn--primary:hover {
  box-shadow: 0 0 40px rgba(26, 191, 191, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn--lg {
  padding: 18px 40px;
  font-size: 17px;
}

/* Hero scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--teal-bright), transparent);
  animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
  0% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
  100% { opacity: 1; transform: scaleY(1); }
}

/* ---- Section Common ---- */
.section-header {
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  color: var(--teal-bright);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Services ---- */
.services {
  padding: var(--section-pad) 0;
  position: relative;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  padding: 40px 32px 32px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-bright), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 0.6;
}

.service-card__number {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(26, 191, 191, 0.08);
  color: var(--teal-bright);
  margin-bottom: 24px;
}

.service-card__title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-card__desc {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-card__tags li {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* ---- Process ---- */
.process {
  padding: var(--section-pad) 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process__item {
  position: relative;
  padding-top: 32px;
}

.process__line {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal-bright), transparent);
}

.process__step {
  font-size: 13px;
  font-weight: 300;
  color: var(--teal-bright);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.process__item h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.process__item p {
  font-size: 14px;
  line-height: 1.7;
}

/* ---- About ---- */
.about {
  padding: var(--section-pad) 0;
}

.about__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.about__text .section-title {
  margin-bottom: 24px;
}

.about__text p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.about__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about__card-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.about__card-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.about__card-stat:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.about__card-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.about__card-value {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
}

/* ---- Contact ---- */
.contact {
  padding: var(--section-pad) 0;
}

.contact__inner {
  position: relative;
  text-align: center;
  padding: clamp(48px, 8vw, 96px) clamp(24px, 4vw, 64px);
  border-radius: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.contact__glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: var(--teal-deep);
  filter: blur(140px);
  opacity: 0.2;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.contact__inner .section-label {
  position: relative;
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
  position: relative;
}

.contact__desc {
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 36px;
  position: relative;
}

.contact__inner .btn {
  position: relative;
  z-index: 2;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-primary);
}

.footer__brand img {
  border-radius: 6px;
}

.footer__links {
  display: flex;
  gap: 28px;
}

.footer__links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

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

.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer__social svg {
  flex-shrink: 0;
}

.footer__copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Animations ---- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.9s var(--ease-out) forwards;
}

.anim-d1 { animation-delay: 0.1s; }
.anim-d2 { animation-delay: 0.2s; }
.anim-d3 { animation-delay: 0.3s; }
.anim-d4 { animation-delay: 0.45s; }
.anim-d5 { animation-delay: 0.6s; }
.anim-d6 { animation-delay: 0.8s; }

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

.anim-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.anim-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: 1fr 1fr;
  }
  .process__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
  }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__mobile-toggle { display: flex; }

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

  .process__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer__links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero__title {
    font-size: clamp(36px, 9vw, 54px);
  }

  .hero__scroll { display: none; }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .service-card {
    padding: 32px 24px 24px;
  }
}
