/* ============================================================
   VP-Dev Technology — build studio
   Design tokens (v2 — matched to reference layout)
   ============================================================ */

:root {
  --bg:          #F4F5F9;
  --ink:         #14162B;
  --ink-soft:    #5B5E72;
  --ink-faint:   #9497A8;
  --accent:      #3355FF;
  --pill-bg:     #F1F1F5;
  --card-bg:     #FFFFFF;
  --card-alt:    #F1F1F5;
  --line:        #E7E7EE;

  --navy:   #16224A;
  --teal:   #0E4F52;
  --purple: linear-gradient(135deg, #7C3AED 0%, #C0289C 100%);
  --blue:   #1D63ED;
  --forest: #155843;
  --maroon: #6B2140;
  --black:  #0B0B10;

  --f-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-accent:  "Playfair Display", Georgia, serif;
  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1180px;
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-full: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .reveal, .reveal-up, .reveal-on-load { opacity: 1 !important; transform: none !important; }
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.accent-script {
  font-family: var(--f-accent);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

section { padding: 64px 0; }
@media (max-width: 760px) { section { padding: 44px 0; } }

/* ---------- Scroll reveal system ---------- */

.reveal,
.reveal-up,
.reveal-on-load {
  opacity: 0;
  transform: perspective(1000px) translateY(22px) rotateX(8deg);
  transform-origin: bottom center;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal { transform: translateY(10px); }

.reveal.is-visible,
.reveal-up.is-visible,
.reveal-on-load.is-visible {
  opacity: 1;
  transform: perspective(1000px) translateY(0) rotateX(0deg);
}

/* Parent containers need perspective so child rotateX reads as real depth */
.info-row, .services-grid, .proj-grid, .test-grid, .cta-row {
  perspective: 1400px;
}

/* ---------- Floating nav ---------- */

.float-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: navDrop 0.6s var(--ease-out) both;
}

@keyframes navDrop {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.nav-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 800;
  color: var(--accent);
  box-shadow: 0 4px 18px rgba(20, 22, 43, 0.1);
  flex-shrink: 0;
  transition: transform 0.5s var(--ease-out), box-shadow 0.3s var(--ease-out);
  transform-style: preserve-3d;
}
.nav-logo:hover {
  transform: perspective(300px) rotateY(360deg) scale(1.08);
  box-shadow: 0 6px 22px rgba(51, 85, 255, 0.28);
}

.nav-pill {
  background: #fff;
  border-radius: var(--r-full);
  box-shadow: 0 4px 18px rgba(20, 22, 43, 0.1);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
}

.nav-pill a {
  padding: 10px 18px;
  border-radius: var(--r-full);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
  display: inline-block;
}

.nav-pill a:hover,
.nav-pill a.active {
  background: var(--pill-bg);
  color: var(--ink);
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .nav-pill a { padding: 9px 12px; font-size: 13px; }
}

/* ---------- Hero ---------- */

.hero-card {
  margin: 108px auto 0;
  max-width: var(--container);
  border-radius: var(--r-xl);
  padding: 72px 40px 40px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(120,150,255,0.55), transparent 42%),
    radial-gradient(circle at 85% 12%, rgba(230,170,255,0.5), transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(255,190,220,0.45), transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(160,210,255,0.5), transparent 45%),
    #EEF1FA;
  background-size: 160% 160%, 160% 160%, 160% 160%, 160% 160%, 100% 100%;
  animation: heroGlow 16s ease-in-out infinite;
}

@keyframes heroGlow {
  0%   { background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%, 0 0; }
  50%  { background-position: 10% 15%, 90% 10%, 95% 90%, 5% 90%, 0 0; }
  100% { background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%, 0 0; }
}

.hero-card h1 {
  text-align: center;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.15;
  max-width: 900px;
  margin: 0 auto;
}

.hero-card .accent-script {
  display: block;
  text-align: center;
  font-size: clamp(30px, 5vw, 50px);
  margin-top: 6px;
}

.info-row {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 18px;
}

.info-card {
  background: var(--card-bg);
  border-radius: var(--r-lg);
  padding: 22px;
  min-height: 250px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(20,22,43,0.04);
  transition: box-shadow 0.3s ease, transform 0.15s ease;
}

.tilt-card {
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}
.tilt-card:hover {
  box-shadow: 0 20px 44px rgba(20,22,43,0.16);
}
.tilt-card .info-tag,
.tilt-card h3,
.tilt-card .stat-num {
  transform: translateZ(24px);
}

.info-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 6px;
}

.tag-chip {
  background: var(--pill-bg);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-full);
}

.info-card h3 {
  font-size: 24px;
  margin-top: 4px;
}
.info-card .role {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-top: 4px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3DCB6C;
  flex-shrink: 0;
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #3DCB6C;
  animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
  0%   { transform: scale(1);   opacity: 0.65; }
  100% { transform: scale(2.6); opacity: 0; }
}

.info-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 250px;
  background: linear-gradient(155deg, #1B2140 0%, #2B3570 55%, #4C5BD4 100%);
  position: relative;
  transform-style: preserve-3d;
  animation: floatTilt 7s ease-in-out infinite;
}
.info-photo svg { width: 100%; height: 100%; display: block; }

@keyframes floatTilt {
  0%, 100% { transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateY(0); }
  25%      { transform: perspective(900px) rotateX(3deg) rotateY(-4deg) translateY(-4px); }
  50%      { transform: perspective(900px) rotateX(-2deg) rotateY(3deg) translateY(0); }
  75%      { transform: perspective(900px) rotateX(2deg) rotateY(2deg) translateY(-2px); }
}

.orbit-ring {
  transform-origin: 150px 150px;
  animation: spin 14s linear infinite;
}
.orbit-ring--slow {
  animation-duration: 26s;
  animation-direction: reverse;
}
.orbit-dot {
  transform-origin: 150px 150px;
  animation: spin 14s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.stat-num {
  font-family: var(--f-display);
  font-size: 40px;
  font-weight: 800;
  margin-top: 24px;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

.badge-row {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}
.badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease;
  animation: badgeBob 3.4s ease-in-out infinite;
  transform-style: preserve-3d;
}
.badge:nth-child(1) { animation-delay: 0s; }
.badge:nth-child(2) { animation-delay: 0.25s; }
.badge:nth-child(3) { animation-delay: 0.5s; }
.badge:nth-child(4) { animation-delay: 0.75s; }

@keyframes badgeBob {
  0%, 100% { transform: perspective(300px) translateY(0) rotateX(0deg); }
  50%      { transform: perspective(300px) translateY(-3px) rotateX(12deg); }
}

.badge-row:hover .badge {
  transform: perspective(300px) translateY(-4px) rotateX(-14deg) translateZ(6px);
  box-shadow: 0 8px 14px rgba(0,0,0,0.18);
  animation-play-state: paused;
}

.info-card .foot-note {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 10px;
}

@media (max-width: 980px) {
  .info-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .hero-card { padding: 56px 20px 28px; border-radius: 24px; margin-top: 96px; }
  .info-row { grid-template-columns: 1fr; }
}

/* ---------- Section headers ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
}
.section-head p {
  color: var(--ink-soft);
  max-width: 340px;
  margin: 0;
}

/* ---------- Colored project cards ---------- */

.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.proj-card {
  border-radius: var(--r-xl);
  padding: 32px 32px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}
.proj-card:hover {
  box-shadow: 0 26px 50px rgba(20,22,43,0.26);
}
.proj-card .proj-top,
.proj-card h3 {
  transition: transform 0.35s var(--ease-out);
}
.proj-card:hover .proj-top { transform: translateZ(30px); }
.proj-card:hover h3 { transform: translateZ(20px); }

.proj-card.navy   { background: var(--navy); }
.proj-card.teal   { background: var(--teal); }
.proj-card.purple { background: var(--purple); }
.proj-card.blue   { background: var(--blue); }
.proj-card.forest { background: var(--forest); }
.proj-card.maroon { background: var(--maroon); }
.proj-card.black  { background: var(--black); }

.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.proj-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}
.proj-card:hover .proj-logo {
  transform: rotate(-6deg);
  background: rgba(255,255,255,0.22);
}

.proj-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.proj-tags span {
  background: rgba(255,255,255,0.16);
  padding: 6px 13px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
}

.proj-card h3 {
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.28;
  max-width: 92%;
  margin-top: 26px;
}

.proj-card p.proj-desc {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  margin: 10px 0 0;
  max-width: 90%;
}

.proj-mock {
  margin-top: auto;
  padding-top: 24px;
  overflow: hidden;
}
.proj-mock img {
  width: 100%;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
  display: block;
  transform: translateY(18px);
  transition: transform 0.45s var(--ease-out);
}
.proj-card:hover .proj-mock img {
  transform: translateY(6px);
}

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-top: 18px;
  padding-bottom: 24px;
  transition: gap 0.2s ease;
}
.proj-link:hover { gap: 10px; }

@media (max-width: 860px) {
  .proj-grid { grid-template-columns: 1fr; }
}

/* ---------- Services (rounded card style) ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.service-card {
  background: var(--card-bg);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  box-shadow: 0 2px 10px rgba(20,22,43,0.04);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s ease;
  border: 1px solid transparent;
  transform-style: preserve-3d;
  will-change: transform;
}
.service-card:hover {
  box-shadow: 0 20px 38px rgba(20,22,43,0.12);
  border-color: var(--line);
}
.service-index {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--pill-bg);
  color: var(--ink-soft);
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s var(--ease-out);
  transform-style: preserve-3d;
}
.service-card:hover .service-index {
  background: var(--accent);
  color: #fff;
  transform: translateZ(28px) rotateY(360deg);
}
.service-card h3 { transition: transform 0.3s var(--ease-out); }
.service-card:hover h3 { transform: translateZ(14px); }
.service-card h3 {
  font-size: 19px;
  margin: 18px 0 8px;
}
.service-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */

.test-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr 1.15fr;
  gap: 20px;
  align-items: stretch;
}

.test-intro {
  background: var(--card-alt);
  border-radius: var(--r-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
}
.test-intro h2 {
  font-size: 26px;
  line-height: 1.25;
}
.test-intro .quote-mark {
  font-family: var(--f-accent);
  font-size: 46px;
  color: #C7CAE0;
  line-height: 1;
}
.test-intro .caption {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}

.test-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}
.test-card:hover {
  box-shadow: 0 18px 34px rgba(20,22,43,0.1);
}

.test-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pill-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.test-person .p-name { font-weight: 700; color: var(--accent); font-size: 15px; }
.test-person .p-role { font-size: 13px; color: var(--ink-soft); }

.test-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
}
.test-card p strong { color: var(--ink); }

@media (max-width: 900px) {
  .test-grid { grid-template-columns: 1fr; }
}

/* ---------- Final CTA row ---------- */

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.cta-card {
  background: var(--card-alt);
  border-radius: var(--r-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.cta-card:hover {
  box-shadow: 0 20px 38px rgba(20,22,43,0.12);
  background: #fff;
}
.cta-card h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.3;
}
.cta-card p {
  color: var(--ink-soft);
  margin: 10px 0 0;
  font-size: 15px;
}
.cta-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(20,22,43,0.08);
  transition: transform .45s var(--ease-out), background .3s ease, color .3s ease, box-shadow .3s ease;
  transform-style: preserve-3d;
}
.cta-card:hover .cta-arrow {
  transform: translate(4px,-4px) perspective(300px) rotateY(360deg);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 22px rgba(20,22,43,0.25);
}

@media (max-width: 760px) {
  .cta-row { grid-template-columns: 1fr; }
  .cta-card { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(20,22,43,0.08); }
.btn-light:hover { box-shadow: 0 8px 18px rgba(20,22,43,0.14); }

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0 48px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--ink-faint);
  font-size: 13.5px;
}

/* ---------- Page hero (portfolio page) ---------- */

.page-hero {
  margin: 108px auto 0;
  max-width: var(--container);
}
.page-hero h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  max-width: 760px;
}
.page-hero p {
  color: var(--ink-soft);
  font-size: 16.5px;
  max-width: 520px;
  margin: 16px 0 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 32px;
}
.filter-btn {
  font-family: var(--f-body);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-full);
  border: none;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(20,22,43,0.04);
  transition: all .15s ease;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.active { background: var(--ink); color: #fff; }

.hidden-item { display: none !important; }

.note-strip {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin-top: 40px;
  text-align: center;
}