/* Shared styles for all pages (previously duplicated inline in each page's <style>). */
body { background-color: #050505; color: #e5e2de; overflow-x: hidden; font-family: 'DM Sans', system-ui, sans-serif; }

/* Long Finnish compounds (e.g. "vaatimustenmukaisuus") must wrap on phones */
h1, h2, h3, h4 { overflow-wrap: anywhere; hyphens: auto; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #2D2D2A; }
::-webkit-scrollbar-thumb:hover { background: #6AA3E3; }

/* Diagonal section edges (home page) */
.slant-bottom { clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%); margin-bottom: -10vw; padding-bottom: 15vw; }
.slant-top { clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 100%); margin-top: -10vw; padding-top: 15vw; }
.slant-both { clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%); margin-top: -10vw; margin-bottom: -10vw; padding-top: 15vw; padding-bottom: 15vw; }
@media (max-width: 767px) {
  .slant-top, .slant-bottom, .slant-both {
    clip-path: none !important; margin-top: 0 !important; margin-bottom: 0 !important;
    padding-top: 3rem; padding-bottom: 3rem;
  }
}

/* Diamond service markers (home page) */
.diamond-container {
  width: 120px; height: 120px; transform: rotate(45deg); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(91,155,230, 0.2);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover .diamond-container { box-shadow: 0 0 40px rgba(91,155,230, 0.6); transform: rotate(45deg) scale(1.1); }
.diamond-content {
  transform: rotate(-45deg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover .diamond-content { transform: rotate(-45deg) scale(1.1); }

.text-outline { -webkit-text-stroke: 2px #2D2D2A; color: transparent; }

/* Buttons */
.btn-pulse { position: relative; overflow: hidden; }
.btn-pulse::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg); transition: left 0.5s ease;
}
.btn-pulse:hover::after { left: 150%; }

/* Experience accordion (work page) */
.tl-bullets { display: none; }
.tl-item.open .tl-bullets { display: block; }
.tl-item.open .tl-icon { transform: rotate(45deg); }
.tl-icon { transition: transform 0.3s ease; display: inline-block; }
.tl-head:focus-visible { outline: 2px solid #3F80CF; outline-offset: 4px; }

/* Project preview images */
.shot { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; display: block; }
.shot-wrap { overflow: hidden; border-bottom: 1px solid #2D2D2A; }
.shot-wrap img { transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.project-card:hover .shot-wrap img { transform: scale(1.03); }

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(0.5, 0, 0, 1), transform 0.7s cubic-bezier(0.5, 0, 0, 1); will-change: opacity, transform; }
  .reveal.active { opacity: 1; transform: translateY(0); }
  .stagger-1 { transition-delay: 100ms; } .stagger-2 { transition-delay: 200ms; } .stagger-3 { transition-delay: 300ms; }

  .cap-tag { opacity: 0; transform: translateX(-10px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .reveal.active .cap-tag { opacity: 1; transform: translateX(0); }
  .reveal.active .cap-tag:nth-child(2) { transition-delay: 0.1s; }
  .reveal.active .cap-tag:nth-child(3) { transition-delay: 0.2s; }
  .reveal.active .cap-tag:nth-child(4) { transition-delay: 0.3s; }
  .reveal.active .cap-tag:nth-child(5) { transition-delay: 0.4s; }

  @keyframes drift { 0% { transform: scale(1) translate(0, 0); } 50% { transform: scale(1.08) translate(3%, 2%); } 100% { transform: scale(1) translate(0, 0); } }
  .animate-drift { animation: drift 15s ease-in-out infinite alternate; }

  @keyframes pulse-glow { 0% { box-shadow: 0 0 0 0 rgba(63,128,207, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(63,128,207, 0); } 100% { box-shadow: 0 0 0 0 rgba(63,128,207, 0); } }
  .btn-pulse:hover { animation: pulse-glow 1.5s infinite; }
}

/* Background art keeps 30% of its colour so the accent colour leads */
.bg-vid { filter: grayscale(0.7) brightness(0.7) !important; }
.bg-art { filter: grayscale(0.7); }

#bg-pause-btn {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 40; width: 1.75rem; height: 1.75rem;
  background: rgba(5, 5, 5, 0.6); border: 1px solid rgba(198, 198, 199, 0.25); border-radius: 50%;
  color: #c6c6c7; display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s, border-color 0.2s, color 0.2s;
}
#bg-pause-btn.show { opacity: 0.6; visibility: visible; }
#bg-pause-btn.show:hover, #bg-pause-btn.show:focus-visible { opacity: 1; border-color: rgba(63,128,207, 0.9); }
#bg-pause-btn.paused { color: #3F80CF; }
