/**
 * Base layer: reset, typography, shared primitives and the keyframes the
 * design uses. Section-specific rules belong in their own files.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--tim-dark);
  color: var(--tim-on-dark);
  font-family: var(--tim-font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--tim-magenta);
  text-decoration: none;
}

a:hover {
  color: var(--tim-magenta-light);
}

h1,
h2,
h3 {
  font-family: var(--tim-font-display);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--tim-magenta-light);
  outline-offset: 3px;
}

/* Screen-reader only, used for skip links and icon labels. */
.tim-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tim-skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 20px;
  border-radius: var(--tim-radius-pill);
  background: var(--tim-magenta);
  color: #fff;
}

/* ---------- primitives ---------- */

.tim-container {
  width: 100%;
  max-width: var(--tim-container);
  margin: 0 auto;
  padding-inline: var(--tim-section-x);
}

.tim-section {
  padding-block: var(--tim-section-y);
}

.tim-kicker {
  color: var(--tim-magenta-light);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tim-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border: 0;
  border-radius: var(--tim-radius-pill);
  background: var(--tim-magenta);
  color: #fff;
  font-family: var(--tim-font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.tim-btn:hover {
  background: var(--tim-magenta-hover);
  color: #fff;
  transform: translateY(-2px);
}

.tim-btn--ghost {
  background: transparent;
  border: 1.5px solid currentColor;
  color: var(--tim-ink);
}

.tim-btn--ghost:hover {
  background: var(--tim-ink);
  color: #fff;
}

/* Ghost display word bleeding out of a section corner. */
.tim-ghost-word {
  position: absolute;
  font-family: var(--tim-font-display);
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  user-select: none;
}

.tim-ghost-word--on-light {
  color: rgba(20, 18, 22, 0.05);
}

/* ---------- keyframes (from the design) ---------- */

@keyframes tim-pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(230, 0, 126, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(230, 0, 126, 0);
  }
}

@keyframes tim-cta-pulse {
  0% {
    box-shadow: 0 12px 30px rgba(230, 0, 126, 0.3), 0 0 0 0 rgba(230, 0, 126, 0.55);
  }
  100% {
    box-shadow: 0 12px 30px rgba(230, 0, 126, 0.3), 0 0 0 22px rgba(230, 0, 126, 0);
  }
}

@keyframes tim-fade-up {
  from {
    opacity: 0;
    transform: translateY(44px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes tim-title-in {
  from {
    opacity: 0;
    transform: translateY(26px);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0% 0);
  }
}

@keyframes tim-chip-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes tim-shine {
  0% {
    transform: translateX(-120%) skewX(-20deg);
  }
  60%,
  100% {
    transform: translateX(240%) skewX(-20deg);
  }
}

@keyframes tim-chev {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Revealed by IntersectionObserver in main.js; visible by default so the
   content still reads with JS disabled. */
[data-reveal] {
  opacity: 0;
  transform: translateY(44px);
}

[data-reveal].is-revealed {
  animation: tim-fade-up 0.9s var(--tim-ease) both;
}

.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
