/**
 * ???? — ?????
 * Tailwind ?????? index.html tailwind.config ???
 * ??????? --color- ????? mist/accent/charcoal
 */

/* ========== CSS ???????????? ========== */
:root {
  --color-mist: #E8DCD7;
  --color-charcoal: #1A1A1A;
  --color-muted: #666666;
  --color-accent: #C8A8A2;
  --color-cream: #FAF8F6;
  --color-white: #FFFFFF;
  --radius-card: 20px;
  --radius-card-lg: 24px;
  --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-soft: 0 4px 24px rgba(200, 168, 162, 0.12);
  --shadow-soft-lg: 0 12px 40px rgba(200, 168, 162, 0.18);
}

/* ========== ???? ========== */
html {
  scroll-behavior: smooth;
}

body {
  cursor: default;
}

::selection {
  background: rgba(200, 168, 162, 0.25);
  color: var(--color-charcoal);
}

/* ========== ????????? ========== */
.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-padding-sm {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 6.25rem;
    padding-bottom: 6.25rem;
  }
}

@media (min-width: 1200px) {
  .section-padding {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

/* ========== ??? ========== */
.site-header {
  background: transparent;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 12px rgba(26, 26, 26, 0.06);
}

.site-header.scrolled .header-inner {
  height: 4.5rem;
}

.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-charcoal);
  letter-spacing: 0.02em;
  transition: color 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
}

.nav-link:hover {
  color: var(--color-accent);
  transform: translateY(-2px);
}

.mobile-nav-link {
  color: var(--color-charcoal);
  font-weight: 400;
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--color-accent);
  transform: translateX(4px);
}

.mobile-menu.is-open {
  pointer-events: auto;
}

.mobile-menu.is-open .menu-overlay {
  opacity: 1;
}

.mobile-menu.is-open .menu-panel {
  transform: translateX(0);
}

#menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========== Hero ?? ========== */
.hero-bg-img {
  animation: heroFloat 8s ease-in-out infinite alternate;
}

@keyframes heroFloat {
  from { transform: scale(1.02) translateY(0); }
  to   { transform: scale(1.05) translateY(-8px); }
}

.hero-animate {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeIn 0.8s var(--transition-smooth) forwards;
}

.hero-animate-delay-1 { animation-delay: 0.15s; }
.hero-animate-delay-2 { animation-delay: 0.3s; }
.hero-animate-delay-3 { animation-delay: 0.45s; }

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

.scroll-hint {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ========== ?? ========== */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: transform 0.35s var(--transition-smooth),
              box-shadow 0.35s var(--transition-smooth),
              background 0.35s ease,
              border-color 0.35s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #D4B8B0);
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(200, 168, 162, 0.35);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(200, 168, 162, 0.45);
}

.btn-primary-lg {
  padding: 1.125rem 2.75rem;
  font-size: 1.0625rem;
}

.btn-secondary {
  border: 1px solid rgba(200, 168, 162, 0.6);
  color: var(--color-charcoal);
  background: transparent;
}

.btn-secondary:hover {
  transform: scale(1.05);
  border-color: var(--color-accent);
  background: rgba(232, 220, 215, 0.3);
}

/* ========== ???? ========== */
.img-soft {
  filter: saturate(0.88) contrast(0.97);
  transition: filter 0.5s ease, transform 0.5s var(--transition-smooth), opacity 0.5s ease;
}

.img-hover:hover {
  transform: scale(1.03);
}

img[data-lazy].loaded,
img.loaded {
  opacity: 1;
}

img[data-lazy]:not(.loaded) {
  opacity: 0;
}

/* ========== ????? ========== */
.gradient-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-mist), var(--color-accent), var(--color-mist), transparent);
  opacity: 0.6;
}

/* ========== ????? ========== */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 168, 162, 0.25) 0%, transparent 70%);
  pointer-events: none;
  animation: orbPulse 6s ease-in-out infinite;
}

.glow-orb-1 {
  width: 400px;
  height: 400px;
  top: 10%;
  right: -5%;
}

.glow-orb-2 {
  width: 280px;
  height: 280px;
  bottom: 15%;
  left: 5%;
  animation-delay: 2s;
}

.glow-orb-sm {
  width: 160px;
  height: 160px;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 0.85; }
}

/* ========== ?????? ========== */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--transition-smooth), transform 0.7s var(--transition-smooth);
}

.reveal-left {
  transform: translateX(-30px);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ========== ???? ========== */
.gallery-card {
  border-radius: var(--radius-card);
}

.card-inner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(250, 248, 246, 0.8) 0%, rgba(232, 220, 215, 0.4) 100%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.45s var(--transition-smooth), box-shadow 0.45s var(--transition-smooth);
}

.gallery-card:hover .card-inner {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft-lg);
}

.gallery-card-featured .card-inner {
  box-shadow: 0 8px 32px rgba(200, 168, 162, 0.2);
}

.gallery-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  filter: saturate(0.88) contrast(0.97);
  transition: transform 0.5s var(--transition-smooth), filter 0.5s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.03);
}

.card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-charcoal);
  letter-spacing: 0.03em;
}

/* ========== ???? ========== */
.tech-card {
  padding: 2rem;
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, var(--color-white) 0%, rgba(232, 220, 215, 0.25) 100%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.tech-card:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  box-shadow: 0 16px 48px rgba(200, 168, 162, 0.2);
}

.tech-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(200, 168, 162, 0.15);
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.4s ease;
}

.tech-card:hover .tech-icon {
  box-shadow: 0 0 24px rgba(200, 168, 162, 0.35);
}

.tech-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  filter: saturate(0.88);
}

/* ========== ??? ========== */
.timeline {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-mist), var(--color-accent), var(--color-mist));
  opacity: 0.6;
}

@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-item {
  position: relative;
  padding-left: 48px;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .timeline-item {
    padding-left: 0;
    width: 50%;
    padding-bottom: 4rem;
  }

  .timeline-item:nth-child(odd) {
    margin-left: 0;
    padding-right: 3rem;
    text-align: right;
  }

  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 3rem;
  }
}

.timeline-node {
  position: absolute;
  left: 8px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-accent);
  box-shadow: 0 0 12px rgba(200, 168, 162, 0.4);
  z-index: 1;
}

@media (min-width: 768px) {
  .timeline-node {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-step {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.6);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

/* ========== ?????? ========== */
.testimonial-track-wrapper {
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.testimonial-track-wrapper.is-dragging {
  cursor: grabbing;
}

.testimonial-track-wrapper.is-paused .testimonial-track {
  animation-play-state: paused;
}

.testimonial-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: marqueeScroll 40s linear infinite;
  padding: 0 2rem;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonial-slide {
  flex-shrink: 0;
  width: 280px;
}

@media (min-width: 768px) {
  .testimonial-slide {
    width: 320px;
  }
}

.testimonial-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  filter: saturate(0.88);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
}

.testimonial-text {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-weight: 300;
  line-height: 1.6;
  font-style: italic;
}

/* ========== CTA ???? ========== */
.cta-section {
  position: relative;
}

.cta-bg {
  background: linear-gradient(135deg, rgba(232, 220, 215, 0.6) 0%, rgba(250, 248, 246, 0.9) 50%, rgba(200, 168, 162, 0.25) 100%);
  animation: ctaBreath 5s ease-in-out infinite;
}

@keyframes ctaBreath {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.85; }
}

/* ========== ?? ========== */
.footer-link {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 300;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

.social-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(232, 220, 215, 0.5);
  color: var(--color-accent);
  transition: transform 0.3s ease, background 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.08);
  background: rgba(200, 168, 162, 0.3);
}

/* ========== ?????? ========== */
.cursor-glow {
  position: fixed;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 168, 162, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-glow.is-active {
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .cursor-glow {
    display: none;
  }

  .glow-orb {
    display: none !important;
  }
}

/* ========== ???? ========== */
body.page-loaded .site-header {
  animation: navFadeIn 0.6s ease forwards;
}

@keyframes navFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ========== ???????? ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
