/* v2 site styles: white/gray, sans serif, soft motion */

@font-face {
  font-family: "GT America";
  src: url("../fonts/gt-america/GT-America-Standard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT America";
  src: url("../fonts/gt-america/GT-America-Standard-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT America";
  src: url("../fonts/gt-america/GT-America-Standard-Bold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #5f5f5f;
  --ink-3: #9a9a9a;
  --line: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.03), 0 18px 40px -12px rgba(0, 0, 0, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "GT America", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Soft gray glow behind the intro, blurred */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 70vh;
  background:
    radial-gradient(40% 50% at 25% 40%, rgba(0, 0, 0, 0.05), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, rgba(0, 0, 0, 0.035), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
}

/* Layout: intro pinned on the left, testimonials scroll on the right */

.layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--gutter);
}

/* Below the desktop breakpoint the sidebar dissolves so the footer can sit after the cards */
.sidebar {
  display: contents;
}

.hero {
  order: 1;
}

.content {
  order: 2;
}

.footer {
  order: 3;
}

@media (min-width: 900px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(340px, 32%) 1fr;
    gap: clamp(24px, 3vw, 56px);
    padding: 0 40px 0 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(32px, 6vh, 64px) 0 24px clamp(24px, 3vw, 48px);
    overflow-y: auto;
  }

  .content {
    padding: 40px 0;
  }
}

/* Pill links */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.pill:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.pill:active {
  transform: scale(0.97);
}

/* Hero */

.hero {
  padding: clamp(48px, 10vh, 96px) 0 clamp(40px, 6vh, 64px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5.4vw, 42px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 24px 0 0;
  max-width: 34ch;
  text-wrap: pretty;
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .hero {
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(30px, 2.5vw, 40px);
  }
}

/* Company list under the intro: one link per line, with breathing room */

.org-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin-top: 30px;
}

/* Inline text links: pill highlight on hover, arrow slides right */

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin: -6px -20px -6px -14px;
  padding: 6px 20px 6px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.4s var(--ease-soft);
}

.inline-link::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  flex: none;
  background-color: currentColor;
  opacity: 0.45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9L9 3M4 3h5v5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9L9 3M4 3h5v5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition:
    transform 0.4s var(--ease-soft),
    opacity 0.4s var(--ease-soft);
}

.inline-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.inline-link:hover::after {
  opacity: 1;
  transform: translateX(4px);
}

.inline-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Testimonials */

.testimonials {
  column-count: 1;
  column-gap: 28px;
}

@media (min-width: 700px) {
  .testimonials {
    column-count: 2;
  }
}

.testimonials.is-masonry {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  column-count: auto;
}

.masonry-col {
  flex: 1;
  min-width: 0;
}

.testimonial {
  position: relative;
  break-inside: avoid;
  margin: 0 0 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backface-visibility: hidden;
  will-change: transform;
}

/* The hover shadow lives on its own layer and fades in, which is smoother than animating box-shadow */
.testimonial::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease-soft);
}

/* --tilt is picked at random on each hover by js/tilt.js */
.testimonial:hover {
  transform: translateY(-6px) rotate(var(--tilt, -0.6deg));
}

.testimonial:hover::after {
  opacity: 1;
}

.testimonial-text {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-author img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.author-name {
  display: block;
  font-size: 14px;
  font-weight: 400;
}

.author-title {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

/* Bottom fade: pinned to the bottom of the screen over the cards, signals more below */

.scroll-fade {
  position: sticky;
  bottom: 0;
  height: clamp(140px, 22vh, 220px);
  margin-top: calc(-1 * clamp(140px, 22vh, 220px));
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(250, 250, 250, 0) 0%,
    rgba(250, 250, 250, 0.55) 45%,
    rgba(250, 250, 250, 0.92) 80%,
    var(--bg) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
  mask-image: linear-gradient(to bottom, transparent, #000 60%);
  transition: opacity 0.6s var(--ease);
}

.scroll-fade.is-hidden {
  opacity: 0;
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: -16px;
}

/* Stacked layout: inset the pills from the screen edge and clear the bottom of the phone */
@media (max-width: 899px) {
  .footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .footer__links {
    margin-left: 0;
  }
}

@media (min-width: 900px) {
  .footer {
    margin-top: 32px;
  }
}

/* Soft load-in: fade, rise and un-blur */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease),
    filter 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}

/* :where() keeps this at one-class specificity so hover transforms can override it */
.reveal:where(.is-visible) {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Cards: a quicker, lighter reveal (paced like dmcg.co's images); transform keeps
   the slower, softer timing so hover still glides */
.testimonial.reveal:not(.is-visible) {
  transform: translateY(10px);
  filter: blur(6px);
}

.testimonial.reveal {
  transition:
    opacity 0.6s var(--ease-standard),
    filter 0.6s var(--ease-standard),
    transform 0.7s var(--ease-soft);
  transition-delay: var(--delay, 0ms);
}

/* Description streams in word by word (spans added by js/stream.js) */

.word {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(4px);
  transition:
    opacity 0.6s var(--ease-soft),
    filter 0.6s var(--ease-soft),
    transform 0.6s var(--ease-soft);
  transition-delay: var(--delay, 0ms);
}

.is-streaming .word {
  opacity: 1;
  filter: none;
  transform: none;
}

/* Company-link arrows wait for their name to finish writing in */

[data-stream] .inline-link::after {
  opacity: 0;
}

.is-streaming .inline-link::after {
  opacity: 0.45;
  transition-delay: var(--arrow-delay, 0ms);
}

.is-streaming .inline-link:hover::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-stream] .inline-link::after {
    opacity: 0.45;
    transition: none;
  }
  .reveal,
  .word {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .testimonial,
  .testimonial:hover {
    transform: none;
  }
}

