/* ============================================
   DRV Project Lab — Apple Premium Design v2
   ============================================ */

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

/* --- Custom Properties --- */
:root {
  --white: #FFFFFF;
  --black: #1D1D1F;
  --gray-text: #86868B;
  --gray-light: #F5F5F7;
  --gray-border: #D2D2D7;
  --blue: #5B86A7;
  --blue-dark: #4A6F8C;
  --blue-glow: rgba(91, 134, 167, 0.15);

  --font-display: -apple-system, 'Inter Tight', 'SF Pro Display', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;

  --font-hero: clamp(3rem, 7vw, 5.5rem);
  --font-h2: clamp(2rem, 4.5vw, 3.25rem);
  --font-h3: clamp(1.2rem, 2vw, 1.4rem);
  --font-body-size: 1.0625rem;
  --font-small: 0.875rem;
  --font-label: 0.75rem;

  --section-padding: clamp(6rem, 12vw, 10rem) 0;
  --container-max: 1080px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.7s;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--font-body-size);
  font-weight: 400;
  line-height: 1.7;
  color: var(--black);
  background-color: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease-smooth); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--black);
  letter-spacing: -0.025em;
}

h1 { font-size: var(--font-hero); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); font-weight: 600; letter-spacing: -0.01em; }

p {
  color: var(--gray-text);
  line-height: 1.7;
}

.label {
  font-family: var(--font-body);
  font-size: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-text);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 2rem);
}

.container--narrow {
  max-width: 720px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.875rem 2rem;
  border-radius: 980px;
  transition: all 0.3s var(--ease-smooth);
}

.btn-primary {
  background-color: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--blue-dark);
  transform: scale(1.03);
  box-shadow: 0 4px 20px var(--blue-glow);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
  background-color: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s var(--ease-out),
              height 0.3s var(--ease-out),
              background-color 0.3s ease,
              opacity 0.3s ease;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  opacity: 0;
}

.cursor.active {
  width: 40px;
  height: 40px;
  background-color: rgba(91, 134, 167, 0.2);
  mix-blend-mode: normal;
}

.cursor.visible {
  opacity: 1;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease-smooth);
}

.nav.scrolled {
  border-bottom-color: var(--gray-border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 64px;
  width: auto;
  transition: opacity 0.3s ease;
}

.nav-logo:hover img { opacity: 0.6; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links a {
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--gray-text);
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--black);
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--gray-text);
  margin-left: 0.75rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--gray-border);
}

.nav-lang a {
  padding: 0.25rem 0.375rem;
}

.nav-lang a.active {
  color: var(--blue);
  font-weight: 600;
}

.nav-lang span {
  color: var(--gray-border);
  user-select: none;
  font-size: 0.75rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: var(--black);
  transition: all 0.3s var(--ease-smooth);
  transform-origin: center;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
  background-color: var(--white);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-label {
  margin-bottom: 1.5rem;
  color: var(--blue);
  font-weight: 600;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

/* Text reveal animation */
.hero h1 .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.hero h1 .word-inner {
  display: inline-block;
  transform: translateY(110%);
  animation: wordReveal 0.8s var(--ease-out) forwards;
}

.hero h1 .word:nth-child(1) .word-inner { animation-delay: 0.1s; }
.hero h1 .word:nth-child(2) .word-inner { animation-delay: 0.2s; }
.hero h1 .word:nth-child(3) .word-inner { animation-delay: 0.3s; }
.hero h1 .word:nth-child(4) .word-inner { animation-delay: 0.4s; }
.hero h1 .word:nth-child(5) .word-inner { animation-delay: 0.5s; }
.hero h1 .word:nth-child(6) .word-inner { animation-delay: 0.6s; }
.hero h1 .word:nth-child(7) .word-inner { animation-delay: 0.7s; }
.hero h1 .word:nth-child(8) .word-inner { animation-delay: 0.8s; }
.hero h1 .word:nth-child(9) .word-inner { animation-delay: 0.9s; }
.hero h1 .word:nth-child(10) .word-inner { animation-delay: 1.0s; }

@keyframes wordReveal {
  to { transform: translateY(0); }
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--gray-text);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero .btn {
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

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

/* Hero image with parallax */
.hero-image {
  margin-top: 4rem;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 1.2s forwards;
}

.hero-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.hero-image-wrapper img {
  width: 100%;
  height: 750px;
  object-fit: cover;
  object-position: center 20%;
  will-change: transform;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1.5s forwards;
}

.hero-scroll span {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* ============================================
   SECTION DIVIDER
   ============================================ */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--gray-border);
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  padding: var(--section-padding);
  background-color: var(--gray-light);
}

.about .container {
  text-align: center;
}

.about .label {
  margin-bottom: 1rem;
}

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

.about-text {
  max-width: 640px;
  margin: 0 auto;
}

.about-text p {
  margin-bottom: 1.25rem;
}

.about-stats {
  display: flex;
  justify-content: center;
  gap: clamp(3rem, 6vw, 5rem);
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--gray-border);
}

.about-stat {
  text-align: center;
}

.about-stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.about-stat-text {
  font-size: var(--font-small);
  color: var(--gray-text);
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  padding: var(--section-padding);
  background-color: var(--white);
}

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

.services-header .label { margin-bottom: 1rem; }
.services-header h2 { margin-bottom: 1rem; }
.services-header p { margin: 0 auto; max-width: 480px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: rgba(245, 245, 247, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: clamp(2rem, 3vw, 2.75rem);
  transition: all 0.4s var(--ease-smooth);
}

.service-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--blue);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06),
              0 0 0 1px var(--blue);
}

.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1.5rem;
  color: var(--blue);
}

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

.service-card p {
  font-size: var(--font-small);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.service-features li {
  font-size: var(--font-small);
  color: var(--gray-text);
  padding-left: 1.125rem;
  position: relative;
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background-color: var(--blue);
  border-radius: 50%;
  opacity: 0.5;
}

/* ============================================
   WHY WORK WITH ME
   ============================================ */
.why {
  padding: var(--section-padding);
  background-color: var(--gray-light);
}

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

.why-header .label { margin-bottom: 1rem; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.why-item {
  padding: 2.25rem;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
}

.why-item:hover {
  background-color: var(--white);
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.why-number {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5vw, 4.5rem);
  font-weight: 700;
  color: var(--blue);
  opacity: 0.12;
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.why-item h3 { margin-bottom: 0.5rem; }

.why-item p {
  font-size: var(--font-small);
  line-height: 1.7;
}

/* ============================================
   TRUSTED BY
   ============================================ */
.trusted {
  padding: clamp(3.5rem, 6vw, 5rem) 0;
  background-color: var(--white);
  border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border);
}

.trusted-header {
  text-align: center;
  margin-bottom: 2rem;
}

.trusted-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.trusted-logos img {
  height: 100px;
  width: auto;
  opacity: 0.25;
  filter: grayscale(100%);
  transition: all 0.4s var(--ease-smooth);
}

.trusted-logos img:hover {
  opacity: 0.7;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  padding: var(--section-padding);
  background-color: var(--black);
  color: var(--white);
  position: relative;
}

/* Gradient transition from white to dark */
.contact::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--white), var(--black));
  pointer-events: none;
}

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-header .label {
  margin-bottom: 1rem;
  color: var(--gray-text);
}

.contact-header h2 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.contact-header p {
  color: var(--gray-text);
  margin-bottom: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-info a {
  font-size: var(--font-small);
  color: var(--gray-text);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transition: color 0.3s ease;
}

.contact-info a:hover { color: var(--blue); }

.contact-info svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--blue);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: var(--font-body-size);
  color: var(--white);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.75rem 0;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
}

.form-group textarea { min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-submit { margin-top: 0.5rem; }

.form-submit .btn { width: 100%; }

.form-message {
  font-size: var(--font-small);
  padding: 0.75rem;
  display: none;
  border-radius: 8px;
}

.form-message.success { display: block; color: #34C759; }
.form-message.error { display: block; color: #FF3B30; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 2rem 0;
  background-color: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo img {
  height: 28px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.footer-logo:hover img { opacity: 0.8; }

.footer-social {
  display: flex;
  gap: 1.25rem;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s ease;
}

.footer-social a:hover { color: var(--blue); }
.footer-social svg { width: 18px; height: 18px; }

.footer-copy {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
}

[data-stagger].visible > *:nth-child(1) { transition-delay: 0s; }
[data-stagger].visible > *:nth-child(2) { transition-delay: 0.12s; }
[data-stagger].visible > *:nth-child(3) { transition-delay: 0.24s; }
[data-stagger].visible > *:nth-child(4) { transition-delay: 0.36s; }

[data-stagger].visible > * {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate], [data-stagger] > *,
  .hero h1 .word-inner, .hero-subtitle, .hero .btn,
  .hero-image, .hero-scroll {
    opacity: 1; transform: none;
  }
  .cursor { display: none; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .contact .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-image-wrapper img { height: 380px; }
}

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

@media (max-width: 767px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 2.5rem;
    gap: 1.75rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    z-index: 1000;
  }

  .nav-open .nav-links { transform: translateX(0); }

  .nav-links a { font-size: 1.125rem; }

  .nav-lang {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-border);
  }

  .nav-toggle { display: flex; }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .nav-open .nav-overlay {
    opacity: 1;
    visibility: visible;
  }

  .hero {
    min-height: auto;
    padding: 7rem 0 3rem;
  }

  .hero h1 { font-size: clamp(2.25rem, 9vw, 3rem); }

  .hero-image-wrapper img { height: 320px; }

  .hero-scroll { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }

  .about-stats {
    flex-direction: column;
    gap: 2rem;
  }

  .form-row { grid-template-columns: 1fr; }

  .footer .container {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .trusted-logos img { height: 26px; }

  .cursor { display: none; }

  .contact::before { height: 50px; top: -50px; }
}

@media (min-width: 1400px) {
  .hero-image-wrapper img { height: 750px; }
  :root { --container-max: 1120px; }
}
