@import "tailwindcss";

@theme {
  --color-ink: #0a0a0a;
  --color-ink-soft: #1c1c1c;
  --color-mute: #7a7a7a;
  --color-faint: #9c9c9c;
  --color-line: #e6e6e6;
  --color-wash: #f6f6f6;
  --color-accent: #2f6f5e;

  --font-display: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui,
    sans-serif;

  --animate-marquee: marquee 38s linear infinite;
  --animate-fade-up: fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  --animate-line: line-grow 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
  --animate-shimmer: shimmer 2.4s ease-in-out infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes line-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Every section target stops clear of the fixed header */
section[id] {
  scroll-margin-top: 6rem;
}

#top {
  scroll-margin-top: 0;
}

body {
  background: #ffffff;
  color: var(--color-ink);
}

::selection {
  background: #0a0a0a;
  color: #ffffff;
}

/* Ultra-thin scrollbar that matches the light-grey icon language */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #ffffff;
}
::-webkit-scrollbar-thumb {
  background: #d8d8d8;
  border-radius: 999px;
  border: 3px solid #ffffff;
}
::-webkit-scrollbar-thumb:hover {
  background: #bdbdbd;
}

/* Icon colour utility – light grey everywhere */
.icon-grey {
  color: #c2c2c2;
  transition: color 0.35s ease, transform 0.35s ease;
}
.icon-grey:hover {
  color: #6e6e6e;
}

.text-balance {
  text-wrap: balance;
}

.tracking-display {
  letter-spacing: -0.03em;
}

.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.link-underline {
  position: relative;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-underline:hover::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
