/* Recursive Systems homepage
   Editorial technical practice. Warm, direct, and founder led. */

.home {
  --home-ink: #171914;
  --home-body: #49483f;
  --home-muted: #6b675c;
  --home-paper: #f7f2e8;
  --home-paper-deep: #efe6d7;
  --home-paper-process: #f1eadf;
  --home-forest: #183f2b;
  --home-forest-hover: #23543a;
  --home-sage: #607565;
  --home-amber: #9f4f26;
  --home-rule: #d9c5aa;
  --home-rule-soft: rgba(109, 83, 54, 0.18);
  --home-display: 'Newsreader', Georgia, serif;
  --home-body-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --home-max: 1240px;

  background: var(--home-paper);
  color: var(--home-body);
  font-family: var(--home-body-font);
}

.home .wrap,
.home-wrap {
  width: min(calc(100% - 64px), var(--home-max));
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

.home h1,
.home h2,
.home h3,
.home h4 {
  font-family: var(--home-display);
  color: var(--home-ink);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.home a {
  color: inherit;
}

.home .nav {
  position: relative;
  background: var(--home-paper);
  border-bottom: 0;
  backdrop-filter: none;
}

.home .nav__inner {
  height: 96px;
  border-bottom: 1px solid var(--home-rule-soft);
}

.home .nav__brand {
  color: var(--home-ink);
  font-family: var(--home-body-font);
  font-size: 1rem;
  font-weight: 700;
  gap: 10px;
  letter-spacing: -0.025em;
}

.home .nav__brand img {
  width: 34px;
  height: 34px;
}

.home .nav__links {
  gap: clamp(24px, 3vw, 48px);
}

.home .nav__links > a {
  color: var(--home-ink);
  font-size: 0.8125rem;
  font-weight: 500;
}

.home .nav__links > a:not(.nav__cta):hover {
  color: var(--home-amber);
}

.home .nav__cta,
.home-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 24px;
  background: var(--home-forest);
  border-radius: 1px;
  color: #fbf7ef !important;
  font-family: var(--home-body-font);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.home .nav__cta {
  min-height: 48px;
  padding-inline: 22px;
}

.home .nav__cta:hover,
.home-button:hover {
  background: var(--home-forest-hover) !important;
  color: #fbf7ef !important;
  transform: translateY(-1px);
}

.home .nav__cta svg,
.home-button svg {
  width: 16px;
  height: 16px;
  color: #d79052;
  stroke-width: 1.8;
}

.home-kicker {
  margin: 0;
  color: var(--home-amber);
  font-family: var(--home-body-font);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  line-height: 1.4;
  text-transform: uppercase;
}

.home-hero {
  position: relative;
  overflow: hidden;
}

.home-hero__inner {
  z-index: 2;
  min-height: 690px;
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--home-rule);
}

.home-hero__content {
  position: relative;
  z-index: 2;
  width: min(63%, 780px);
  padding: 92px 0 104px;
}

.home-hero h1 {
  max-width: 760px;
  margin: 28px 0 24px;
  color: #30322c;
  font-size: clamp(4rem, 6.5vw, 6.6rem);
  line-height: 0.91;
  text-wrap: balance;
}

.home-hero h1 span {
  display: block;
}

.home-hero__lede {
  max-width: 560px;
  margin: 0 0 36px;
  color: #5c5a52;
  font-family: var(--home-display);
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.36;
}

.home-hero__mark {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.home-hero__tiles {
  position: absolute;
  inset: 0;
}

.home-hero__tiles {
  display: grid;
  grid-template-columns: repeat(var(--logo-grid-columns, 18), 1fr);
  grid-template-rows: repeat(var(--logo-grid-rows, 10), 1fr);
  gap: 1px;
  perspective: 1100px;
  transform-style: preserve-3d;
}

.home-hero__tile {
  position: relative;
  opacity: 0;
  transform-style: preserve-3d;
}

.home-hero__tile-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.home-hero__tile-front {
  background: rgba(247, 242, 232, 0.68);
  box-shadow:
    0 1px 0 rgba(97, 73, 47, 0.14),
    0 5px 12px rgba(97, 73, 47, 0.08);
  transform: translateZ(0.6px);
}

.home-hero__tile-back {
  background-color: var(--home-paper);
  box-shadow:
    0 1px 0 rgba(97, 73, 47, 0.16),
    0 8px 16px rgba(97, 73, 47, 0.12);
  transform: rotateY(180deg) translateZ(0.6px);
}

.home-section {
  padding: 68px 0 72px;
}

.home-section--ruled {
  padding-top: 42px;
}

.experience {
  margin-top: 22px;
  border-top: 1px solid var(--home-rule-soft);
}

.experience__row {
  min-height: 176px;
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(220px, 1fr) minmax(300px, 1.4fr);
  align-items: center;
  border-bottom: 1px solid var(--home-rule-soft);
}

.experience__brand,
.experience__description,
.experience__contribution {
  min-height: 84px;
  display: flex;
  align-items: center;
}

.experience__brand,
.experience__description {
  border-right: 1px solid var(--home-rule-soft);
}

.experience__brand {
  padding-right: 42px;
}

.experience__description {
  margin: 0;
  padding: 0 44px;
  color: var(--home-body);
  font-family: var(--home-display);
  font-size: 1.2rem;
  line-height: 1.35;
}

.experience__contribution {
  display: block;
  padding: 16px 0 16px 52px;
}

.experience__contribution p:last-child {
  max-width: 430px;
  margin: 14px 0 0;
  color: var(--home-body);
  font-family: var(--home-display);
  font-size: 1.2rem;
  line-height: 1.35;
}

.experience__label {
  margin: 0;
  color: var(--home-amber);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.experience__logo {
  display: block;
  object-fit: contain;
  object-position: left center;
}

.experience__brand-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: opacity 160ms ease;
}

.experience__brand-link:hover {
  opacity: 0.68;
}

.experience__logo--prxy {
  width: 142px;
  height: auto;
}

.experience__logo--wolf {
  width: 184px;
  height: auto;
  filter: grayscale(1) contrast(1.08);
}

.experience__logo--dreambeam {
  width: 42px;
  height: 42px;
}

.experience__wordmark {
  color: var(--home-ink);
  font-family: var(--home-display);
  font-size: clamp(1.65rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 30px;
  border-bottom: 1px solid var(--home-rule-soft);
}

.service {
  min-height: 230px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 26px;
  align-items: start;
  padding: 32px 42px 52px 0;
}

.service + .service {
  border-left: 1px solid var(--home-rule-soft);
  padding-left: 42px;
}

.service__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--home-forest);
  color: #fbf7ef;
}

.service__icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.6;
}

.service h2 {
  margin: 2px 0 16px;
  font-size: 2.25rem;
  line-height: 1;
}

.service p {
  max-width: 270px;
  margin: 0;
  font-family: var(--home-display);
  font-size: 1.08rem;
  line-height: 1.52;
}

.home-section--services {
  background: var(--home-paper-process);
  border-block: 1px solid var(--home-rule-soft);
}

.home-section--process {
  padding-top: 8px;
}

.process {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 68px;
  padding-top: 58px;
}

.process__intro h2 {
  max-width: 260px;
  margin-top: 26px;
  font-size: 2.65rem;
  line-height: 1.05;
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid rgba(24, 63, 43, 0.5);
  list-style: none;
}

.process__step {
  position: relative;
  padding: 26px 28px 0 0;
}

.process__number {
  color: var(--home-forest);
  font-family: var(--home-display);
  font-size: 0.95rem;
}

.process__step h3 {
  margin: 12px 0 12px;
  font-size: 1.45rem;
  line-height: 1;
}

.process__step p {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.systems {
  margin-top: 64px;
  padding: 26px 28px 30px;
  border: 1px solid var(--home-rule);
}

.systems__title {
  margin: 0 0 24px;
  color: var(--home-amber);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.systems ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.systems li {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 24px;
  border-left: 1px solid var(--home-rule);
  color: var(--home-ink);
  font-family: var(--home-display);
  font-size: 1rem;
}

.systems li:first-child {
  padding-left: 0;
  border-left: 0;
}

.systems svg {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  stroke-width: 1.45;
}

.founder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
  background: var(--home-paper-deep);
}

.founder__image-wrap {
  min-height: 620px;
  overflow: hidden;
}

.founder__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.founder__content {
  max-width: 610px;
  align-self: center;
  padding: 88px clamp(56px, 7vw, 112px);
}

.founder__content h2 {
  max-width: 570px;
  margin: 24px 0 30px;
  font-size: clamp(2.8rem, 4.2vw, 4.4rem);
  line-height: 0.99;
}

.founder__content > p:not(.home-kicker):not(.founder__signature) {
  max-width: 550px;
  margin: 0 0 18px;
  font-family: var(--home-display);
  font-size: 1.08rem;
  line-height: 1.48;
}

.founder__signature {
  margin: 26px 0 0;
  color: var(--home-ink);
  font-family: var(--home-display);
  font-size: 1.2rem;
  font-style: italic;
}

.founder__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.founder__social-link {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.founder__social-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.founder__social-link img {
  display: block;
  object-fit: contain;
}

.founder__x-logo {
  width: 16px;
  height: 16px;
}

.founder__linkedin-logo {
  width: 18px;
  height: auto;
}

.home-cta {
  position: relative;
  overflow: hidden;
  padding: 92px 0 100px;
  text-align: center;
}

.home-cta__content {
  position: relative;
  z-index: 2;
}

.home-cta__tiles {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cta-grid-columns, 18), 1fr);
  grid-template-rows: repeat(var(--cta-grid-rows, 5), 1fr);
  gap: 1px;
  perspective: 1100px;
  pointer-events: none;
}

.home-cta__tile {
  position: relative;
  opacity: 0;
  transform-style: preserve-3d;
}

.home-cta__tile-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.home-cta__tile-front {
  background: rgba(247, 242, 232, 0.7);
  box-shadow:
    0 1px 0 rgba(97, 73, 47, 0.14),
    0 5px 12px rgba(97, 73, 47, 0.07);
  transform: translateZ(0.6px);
}

.home-cta__tile-back {
  background: var(--home-sage);
  box-shadow:
    0 1px 0 rgba(45, 63, 49, 0.22),
    0 8px 16px rgba(45, 63, 49, 0.15);
  transform: rotateY(180deg) translateZ(0.6px);
}

.home-cta h2 {
  max-width: 760px;
  margin: 0 auto 34px;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.96;
  text-wrap: balance;
}

.home .footer {
  padding: 54px 0 28px;
  background: transparent;
  border-top: 1px solid var(--home-rule);
}

.home .footer__inner {
  display: grid;
  grid-template-columns: 1.25fr 1.7fr 0.9fr;
  gap: 60px;
  align-items: start;
  padding-bottom: 42px;
}

.home .footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--home-ink);
  font-family: var(--home-body-font);
  font-size: 0.78rem;
  font-weight: 700;
}

.home .footer__brand img {
  width: 28px;
  height: 28px;
}

.home .footer__tagline {
  max-width: 240px;
  margin-top: 28px;
  color: var(--home-body);
  font-family: var(--home-display);
  font-size: 1rem;
  line-height: 1.45;
}

.home .footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.home .footer__nav div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home .footer__heading {
  margin: 0 0 7px;
  color: var(--home-ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.home .footer__nav a,
.home .footer__meta p,
.home .footer__bottom {
  margin: 0;
  color: var(--home-body);
  font-size: 0.72rem;
  line-height: 1.5;
}

.home .footer__nav a:hover {
  color: var(--home-amber);
}

.home .footer__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 2px;
}

.home .footer__meta p {
  color: var(--home-muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home .footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--home-rule-soft);
  color: var(--home-muted);
}

.home .footer__bottom div {
  display: flex;
  gap: 22px;
}

.motion-pending .home [data-hero-item] {
  opacity: 0;
  transform: translateY(18px);
}

.motion-pending .home [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

.home [data-reveal],
.home [data-hero-item] {
  will-change: opacity, transform;
}

@media (max-width: 1040px) {
  .home-hero__content {
    width: 70%;
  }

  .home-hero h1 {
    font-size: clamp(3.9rem, 8vw, 5.5rem);
  }

  .experience__row {
    grid-template-columns: 240px minmax(200px, 0.9fr) minmax(0, 1.35fr);
  }

  .experience__description {
    padding-inline: 28px;
  }

  .experience__contribution {
    padding-left: 32px;
  }

  .service {
    grid-template-columns: 1fr;
  }

  .process {
    grid-template-columns: 220px 1fr;
    gap: 42px;
  }

  .systems ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 0;
  }

  .systems li:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .founder__image-wrap {
    min-height: 560px;
  }

  .founder__content {
    padding: 68px 48px;
  }
}

@media (max-width: 768px) {
  .home .wrap,
  .home-wrap {
    width: min(calc(100% - 40px), var(--home-max));
  }

  .home .nav {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .home .nav__inner {
    height: 72px;
  }

  .home .nav__toggle {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
  }

  .home .nav__toggle svg {
    width: 22px;
    height: 22px;
  }

  .home .nav--open .nav__links {
    top: 72px;
    padding: 20px;
    background: var(--home-paper);
    border-color: var(--home-rule);
    gap: 2px;
  }

  .home .nav--open .nav__links a {
    min-height: 48px;
  }

  .home .nav--open .nav__cta {
    margin-top: 10px;
  }

  .home-hero__inner {
    min-height: 650px;
    align-items: flex-start;
  }

  .home-hero__content {
    width: 100%;
    padding: 78px 0 90px;
  }

  .home-hero h1 {
    max-width: 620px;
    margin-top: 22px;
    font-size: clamp(3.55rem, 13vw, 5.1rem);
    line-height: 0.92;
    overflow-wrap: anywhere;
  }

  .home-hero h1 span {
    display: inline;
  }

  .home-hero h1 span + span::before {
    content: ' ';
  }

  .home-hero__lede {
    max-width: 500px;
    font-size: 1.25rem;
  }

  .experience__row {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0;
    padding: 30px 0;
  }

  .experience__brand {
    min-height: 72px;
    padding-right: 24px;
  }

  .experience__description {
    min-height: 72px;
    padding: 0 0 0 28px;
    border-right: 0;
  }

  .experience__contribution {
    grid-column: 1 / -1;
    min-height: auto;
    margin-top: 22px;
    padding: 20px 0 0;
    border-top: 1px solid var(--home-rule-soft);
  }

  .services {
    grid-template-columns: 1fr;
  }

  .service {
    min-height: auto;
    grid-template-columns: 54px 1fr;
    padding: 32px 0;
  }

  .service + .service {
    padding-left: 0;
    border-top: 1px solid var(--home-rule-soft);
    border-left: 0;
  }

  .process {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .process__intro h2 {
    max-width: 420px;
  }

  .process__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 34px 20px;
  }

  .systems ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .systems li,
  .systems li:nth-child(4) {
    padding: 0 16px;
    border-left: 1px solid var(--home-rule);
  }

  .systems li:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .founder {
    grid-template-columns: 1fr;
  }

  .founder__image-wrap {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }

  .founder__image-wrap img {
    object-position: center 22%;
  }

  .founder__content {
    max-width: none;
    padding: 64px 20px 72px;
  }

  .home .footer__inner {
    grid-template-columns: 1fr 1.5fr;
  }

  .home .footer__meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .home .nav__brand span {
    font-size: 0.9rem;
  }

  .home-hero__inner {
    min-height: 590px;
  }

  .home-hero__content {
    padding: 62px 0 76px;
  }

  .home-hero h1 {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
    overflow-wrap: normal;
  }

  .experience__row {
    grid-template-columns: 1fr;
  }

  .experience__brand,
  .experience__description {
    min-height: auto;
    padding: 0;
    border-right: 0;
  }

  .experience__description {
    margin-top: 20px;
  }

  .experience__contribution {
    grid-column: auto;
  }

  .service {
    grid-template-columns: 48px 1fr;
    gap: 20px;
  }

  .service__icon {
    width: 44px;
    height: 44px;
  }

  .process__steps,
  .systems ul {
    grid-template-columns: 1fr;
  }

  .process__step {
    padding-right: 0;
  }

  .systems li,
  .systems li:nth-child(4),
  .systems li:nth-child(odd) {
    padding: 12px 0;
    border-top: 1px solid var(--home-rule-soft);
    border-left: 0;
  }

  .systems li:first-child {
    border-top: 0;
  }

  .founder__image-wrap {
    aspect-ratio: 1 / 1;
  }

  .founder__content h2 {
    font-size: 2.85rem;
  }

  .home-cta {
    padding: 76px 0 84px;
  }

  .home-cta h2 {
    font-size: 3.15rem;
  }

  .home .footer__inner,
  .home .footer__nav {
    grid-template-columns: 1fr;
  }

  .home .footer__nav {
    gap: 26px;
  }

  .home .footer__bottom {
    flex-direction: column;
    gap: 14px;
  }
}

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

  .home-hero__tiles {
    display: none;
  }

  .home-cta__tiles {
    display: none;
  }
}
